Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Cabbages, Goat, and Wolf In Two Styles!!

Cabbages, Goat, and Wolf In Two Styles!!

Jason Orendorff

January 11, 2021
Tweet

More Decks by Jason Orendorff

Other Decks in Programming

Transcript

  1. X

  2. X

  3. Chapter 1 - The River The East Riverbank is a

    room. “Here a lazy river crosses your path.”
  4. Chapter 2 - The Boat The boat is an enterable

    container in the East Riverbank. “A little boat is tied to the dock.”
  5. Chapter 3 - The Treasures A treasure is a kind

    of thing. A wolf is in the East Riverbank. […]
  6. Chapter 3 - The Treasures A treasure is a kind

    of thing. The wolf, the goat, and the cabbages are treasures. A wolf is in the East Riverbank. […]
  7. DIVIDE FORCE BY MASS GIVING ACC. Given a book of

    macabre poetry is in my cart When I click "Buy" Then I should see "Checkout" COBOL (1959) Gherkin (2008) AppleScript (1993) tell application "Preview" to open "manual.pdf" activate application "Preview"
  8. A treasure is a kind of thing. The wolf, the

    goat, and the cabbages are treasures. A wolf is in the East Riverbank. […]
  9. A treasure is a kind of thing. The wolf, the

    goat, and the cabbages are treasures. A wolf is in the East Riverbank. […]
  10. A treasure is a kind of thing. The wolf, the

    goat, and the cabbages are treasures. A wolf is in the East Riverbank. […]
  11. A treasure is a kind of thing. The wolf, the

    goat, and the cabbages are treasures. A wolf is in the East Riverbank. […]
  12. East Riverbank Here a lazy river crosses your path. A

    boat is tied to a dock nearby. The "sheep" you bought at the fair is here. Your goat stands nearby, chewing on nothing in particular. >
  13. East Riverbank Here a lazy river crosses your path. A

    boat is tied to a dock nearby. The "sheep" you bought at the fair is here. Your goat stands nearby, chewing on nothing in particular. > drop the cabbages Dropped. > take goat Taken. >
  14. >

  15. You already have that. That’s hardly portable. > pick up

    the river > take the goat > pick myself up
  16. You are always self-possessed. You already have that. That’s hardly

    portable. > pick up the river > take the goat > pick myself up
  17. Carry out crossing: if the wolf and the goat are

    ashore together: say “…”; end the story saying “Someone has got your goat”; else if the goat and the cabbages… : … otherwise: move the boat to the other bank.
  18. Person A loves Person B Balin → Dwalin Óin →

    Glóin Bombur → Balin Bombur → Glóin Bombur → Bombur
  19. Balin .loves = { Dwalin } Óin .loves = {

    Glóin } Bombur.loves = { Balin, Glóin, Bombur }
  20. sig Person { loves: set Person } Love relates various

    people to various people. The verb to love means the love relation.
  21. some Bombur.loves If Bombur loves anyone… Bombur.loves everyone loved by

    Bombur Bombur.~loves everyone who loves Bombur Bombur.loves = Person Everyone loves Bombur.
  22. Part SR1 - The Physical World Model The verb to

    contain means the containment relation. The verb to be in means the reversed containment relation. The verb to carry means the carrying relation. The verb to hold means the holding relation. The verb to wear means the wearing relation.
  23. Part SR1 - The Physical World Model The verb to

    contain means the containment relation. The verb to be in means the reversed containment relation. The verb to carry means the carrying relation. The verb to hold means the holding relation. The verb to wear means the wearing relation.
  24. sig Object { eats: set Object } sig Wolf extends

    Object {} sig Goat extends Object {} sig Cabbages extends Object {} sig Boat extends Object {}
  25. abstract sig Object { eats: set Object } one sig

    Wolf extends Object {} one sig Goat extends Object {} one sig Cabbages extends Object {} one sig Boat extends Object {}