Created
August 27, 2019 02:21
-
-
Save parlarjb/6fab325a3758fec86740077c193dd397 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
one sig Person { | |
} | |
sig Resource { | |
, access: set Person | |
, parent: lone Resource | |
} | |
fact "No cycles" { | |
no r: Resource | | |
r in r.^parent | |
} | |
pred can_access[p: Person, r: Resource] { | |
p in (r.access + r.parent.access) | |
} | |
//if you can access the parent, you can access all its children | |
assert parent_implies_child { | |
all p: Person, r: Resource | | |
can_access[p, r] => all child: parent.r | can_access[p, child] | |
} | |
check parent_implies_child |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment