Skip to content

Instantly share code, notes, and snippets.

@motemen motemen/exercise-a.3.4.als
Last active Jun 26, 2016

Embed
What would you like to do?
sig Person {
shaken: set Person,
partner: Person
}
fact partnerProperties {
partner = ~partner
no p: Person | p in p.partner
}
fact shakenProperties {
shaken = ~shaken
no p: Person | p in p.shaken
no p: Person | p.partner in p.shaken
}
one sig Alice, Bob extends Person {}
fact { Alice -> Bob in partner }
fact numShakenPeopleMutuallyDiffer {
all disj p, p': Person - Alice {
#p.shaken != #p'.shaken
}
}
pred show {}
run show for exactly 10 Person
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.