Slide 1

Slide 1 text

Wolf, Goat, & Cabbages in two styles!!

Slide 2

Slide 2 text

Wolf, Goat, & Cabbages in two styles!! Jason Orendorff !!Con West 2020

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

X

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

X

Slide 15

Slide 15 text

dagnabbit X

Slide 16

Slide 16 text

Wolf, Goat, & Cabbages in two styles!!

Slide 17

Slide 17 text

Wolf, Goat, & Cabbages in two styles!! Jason Orendorff !!Con West 2020

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

Book One -

Slide 20

Slide 20 text

Book One - Inform 7

Slide 21

Slide 21 text

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

Slide 22

Slide 22 text

Chapter 1 - The River The East Riverbank is a room. “Here a lazy river crosses your path.”

Slide 23

Slide 23 text

Chapter 2 - The Boat

Slide 24

Slide 24 text

Chapter 2 - The Boat The boat is an enterable container in the East Riverbank. “A little boat is tied to the dock.”

Slide 25

Slide 25 text

Chapter 3 - The Treasures A treasure is a kind of thing.

Slide 26

Slide 26 text

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

Slide 27

Slide 27 text

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. […]

Slide 28

Slide 28 text

No content

Slide 29

Slide 29 text

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"

Slide 30

Slide 30 text

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

Slide 31

Slide 31 text

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

Slide 32

Slide 32 text

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

Slide 33

Slide 33 text

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

Slide 34

Slide 34 text

The boat is an enterable container in the East Riverbank.

Slide 35

Slide 35 text

The boat is an enterable container in the East Riverbank.

Slide 36

Slide 36 text

No content

Slide 37

Slide 37 text

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. >

Slide 38

Slide 38 text

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. >

Slide 39

Slide 39 text

Instead of taking the boat, say “There’s no point carrying a boat around.”

Slide 40

Slide 40 text

>

Slide 41

Slide 41 text

> pick up the river

Slide 42

Slide 42 text

That’s hardly portable. > pick up the river >

Slide 43

Slide 43 text

That’s hardly portable. > pick up the river > take the goat

Slide 44

Slide 44 text

You already have that. That’s hardly portable. > pick up the river > take the goat >

Slide 45

Slide 45 text

You already have that. That’s hardly portable. > pick up the river > take the goat > pick myself up

Slide 46

Slide 46 text

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

Slide 47

Slide 47 text

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.

Slide 48

Slide 48 text

No content

Slide 49

Slide 49 text

• The manual is amazing

Slide 50

Slide 50 text

• The manual is amazing • “Use the serial comma.”

Slide 51

Slide 51 text

Book Two -

Slide 52

Slide 52 text

Book Two - Alloy

Slide 53

Slide 53 text

class Person { loves: set Person }

Slide 54

Slide 54 text

class Person { loves: set Person }

Slide 55

Slide 55 text

sig Person { loves: set Person }

Slide 56

Slide 56 text

sig Person { loves: set Person } Lin = new Person

Slide 57

Slide 57 text

sig Person { loves: set Person } Lin = new Person

Slide 58

Slide 58 text

No content

Slide 59

Slide 59 text

Sig Person { loves: set Person } run {} for 3

Slide 60

Slide 60 text

No content

Slide 61

Slide 61 text

No content

Slide 62

Slide 62 text

No content

Slide 63

Slide 63 text

Person A loves Person B Balin → Dwalin Óin → Glóin Bombur → Balin Bombur → Glóin Bombur → Bombur

Slide 64

Slide 64 text

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

Slide 65

Slide 65 text

No content

Slide 66

Slide 66 text

sig Person { loves: set Person }

Slide 67

Slide 67 text

sig Person { loves: set Person } Love relates various people to various people.

Slide 68

Slide 68 text

sig Person { loves: set Person } Love relates various people to various people. The verb to love means the love relation.

Slide 69

Slide 69 text

No content

Slide 70

Slide 70 text

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.

Slide 71

Slide 71 text

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.

Slide 72

Slide 72 text

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.

Slide 73

Slide 73 text

sig Person { loves: set Person }

Slide 74

Slide 74 text

sig Object { loves: set Object }

Slide 75

Slide 75 text

sig Object { eats: set Object }

Slide 76

Slide 76 text

sig Object { eats: set Object } sig Wolf extends Object {} sig Goat extends Object {} sig Cabbages extends Object {} sig Boat extends Object {}

Slide 77

Slide 77 text

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 {}

Slide 78

Slide 78 text

No content

Slide 79

Slide 79 text

fact foodWeb { eats = (Wolf -> Goat) + (Goat -> Cabbages) }

Slide 80

Slide 80 text

No content

Slide 81

Slide 81 text

No content

Slide 82

Slide 82 text

sig Riverbank {}

Slide 83

Slide 83 text

No content

Slide 84

Slide 84 text

sig Snapshot { }

Slide 85

Slide 85 text

sig Snapshot { location: Object -> one Riverbank }

Slide 86

Slide 86 text

// first, last, prev, next open util/ordering[Snapshot] sig Snapshot { location: Object -> one Riverbank }

Slide 87

Slide 87 text

No content

Slide 88

Slide 88 text

fact twoSidesToEveryRiver { #Riverbank = 2 }

Slide 89

Slide 89 text

No content

Slide 90

Slide 90 text

fact beginningAndEnd { }

Slide 91

Slide 91 text

fact beginningAndEnd { } one first.location[Object]

Slide 92

Slide 92 text

fact beginningAndEnd { } one first.location[Object] one last.location[Object]

Slide 93

Slide 93 text

fact beginningAndEnd { } one first.location[Object] one last.location[Object] first.location[Boat] != last.location[Boat]

Slide 94

Slide 94 text

No content

Slide 95

Slide 95 text

No content

Slide 96

Slide 96 text

Why Alloy?

Slide 97

Slide 97 text

No content

Slide 98

Slide 98 text

https://playfic.com/games/jorendorff/cabbages