-
-
Save halcat0x15a/2687165 to your computer and use it in GitHub Desktop.
start alloy
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
//sig Revision {} | |
sig Repository { | |
file: set File | |
} | |
sig Local { | |
file: set File | |
} | |
sig Path {} | |
sig Content {} | |
sig File { | |
path: Path, | |
content: Content | |
} | |
fact { | |
all l: Local | | |
all disj f1, f2: l.file | | |
not (f1.path = f2.path) | |
} | |
run {} | |
pred commit (rep, rep': Repository, l: Local, f: File) { | |
f in l.file | |
rep'.file = rep.file ++ f | |
} | |
run commit for 5 but 5 Repository |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment