Skip to content

Instantly share code, notes, and snippets.

@halcat0x15a
Created May 13, 2012 09:31
Show Gist options
  • Save halcat0x15a/2687165 to your computer and use it in GitHub Desktop.
Save halcat0x15a/2687165 to your computer and use it in GitHub Desktop.
start alloy
//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