{"id": 6552, "parent": null, "code": "sig A{}\nrun {}\nrun {}", "permalink": "marshy-attest-frays-showy", "time": "2023-11-18 21:14:08.315931", "cmd": 1} {"id": 6553, "parent": null, "code": "sig A{}\nrun {} ", "permalink": "repave-green-during-evade", "time": "2023-11-18 21:33:07.116029", "cmd": 1} {"id": 6562, "parent": null, "code": "sig A{}\nrun {} ", "permalink": "lesser-flask-swoop-ship", "time": "2023-11-20 12:03:01.899296", "cmd": 1} {"id": 6563, "parent": null, "code": "sig A{}\nrun {} ", "permalink": "secret-itunes-nimble-wolf", "time": "2023-11-20 12:47:14.677969", "cmd": 1} {"id": 6564, "parent": null, "code": "sig A{}\nrun {}\nrun {}", "permalink": "yeah-masses-posing-herbal", "time": "2023-11-20 13:35:12.983786", "cmd": 1} {"id": 6566, "parent": null, "code": "sig A{}\nrun {} ", "permalink": "snitch-cling-peso-knoll", "time": "2023-11-20 13:43:33.332054", "cmd": 1} {"id": 6567, "parent": 6566, "code": "sig AB{}\nrun {}\nrun {}\nrun {}\nrun {}", "permalink": "humped-avenue-plop-elm", "time": "2023-11-20 13:44:05.351861", "cmd": 4} {"id": 6568, "parent": 6567, "code": "sig AB{}\nrun {}\nrun {}\nrun {}\nrun {}", "permalink": "rename-ruse-unwind-letter", "time": "2023-11-20 13:44:29.931119", "cmd": 1} {"id": 6569, "parent": null, "code": "sig AC{}\nrun {}", "permalink": "legacy-ditto-unclog-repave", "time": "2023-11-20 14:07:31.156984", "cmd": 1} {"id": 6586, "parent": null, "code": "sig A{}\nrun {} ", "permalink": "relive-broom-trunks-chunk", "time": "2023-11-21 06:43:09.106993", "cmd": 1} {"id": 6672, "parent": null, "code": "one sig List { header: lone Node }\nsig Node { link: lone Node }\npred acyclic(){\nno List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "deluge-thrift-oppose-unbent", "time": "2023-11-21 09:43:54.343763", "cmd": 1} {"id": 6700, "parent": null, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node } \npred acyclic(){ \nno List.header or some n : List.header.*link | no n.link\n} \nrun acyclic for 3", "permalink": "mooned-stomp-feast-shrimp", "time": "2023-11-22 08:07:54.122013", "cmd": 1} {"id": 6701, "parent": 6700, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node } \npred acyclic(){ \nno List.header or some n : List.header.*link | no n.link\n} \nrun acyclic for 1", "permalink": "other-okay-dollop-only", "time": "2023-11-22 08:12:54.836241", "cmd": 1} {"id": 6748, "parent": 6741, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Professor extends Person {}\nsig Student extends Person {}\n\n\nrun {}", "permalink": "dry-capped-garnet-spoken", "time": "2023-11-24 10:34:10.956586", "cmd": 1} {"id": 6750, "parent": 6749, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Professor extends Person {}\nsig Student extends Person {}\n\nsig Class {\n instructor : one Professor\n\n}\nsig Assignment {}\n\nrun {}", "permalink": "shaft-raft-autism-revise", "time": "2023-11-24 10:38:33.849338", "cmd": 1} {"id": 6755, "parent": 6737, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {\n //all a : Assignment | one a.associated_with\n}\n\nrun {}", "permalink": "decal-neuron-galore-sequel", "time": "2023-11-24 10:48:19.026452", "cmd": 1} {"id": 6756, "parent": 6755, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {\n all a : Assignment | one a.associated_with\n}\n\nrun {}", "permalink": "jargon-await-oaf-entail", "time": "2023-11-24 10:48:56.229170", "cmd": 1} {"id": 6757, "parent": 6756, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {\n all a : Assignment | one a.associated_with\n no Professor\n}\n\nrun {}", "permalink": "glass-lizard-guts-turban", "time": "2023-11-24 10:50:16.947342", "cmd": 1} {"id": 6758, "parent": 6757, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {\n all a : Assignment | one a.associated_with\n no Professor\n}\n\nrun {} for 4", "permalink": "icky-vegan-step-pouch", "time": "2023-11-24 10:50:47.195288", "cmd": 1} {"id": 6767, "parent": 6766, "code": "sig Node{\n next: lone Node\n}\n\nsig List {\n header : lone Node\n}\n\nrun {}", "permalink": "ashy-jargon-settle-grub", "time": "2023-11-24 11:08:40.719885", "cmd": 1} {"id": 6785, "parent": 6784, "code": "sig Node{\n next: lone Node,\n}\n\n\none sig List {\n header : lone Node\n}\n\nfact {\n some n : List.header.*next | no n.next\n //Node in List.header.*next\n}\n\nrun {}", "permalink": "supper-sway-lining-veal", "time": "2023-11-24 11:22:21.506485", "cmd": 1} {"id": 6786, "parent": 6785, "code": "sig Node{\n next: lone Node,\n}\n\n\none sig List {\n header : lone Node\n}\n\nfact {\n some n : List.header.*next | no n.next\n //Node in List.header.*next\n}\n\nrun {}", "permalink": "cried-neuter-tricky-tweed", "time": "2023-11-24 11:22:42.621288", "cmd": 1} {"id": 6795, "parent": 6780, "code": "sig Node{\n next: lone Node,\n value: one Val\n}\n\nsig Val {}\n\none sig List {\n header : lone Node\n}\n\nfact {\n no List.header.next.next\n\n Node in List.header.*next\n Val in Node.value\n}\n\nrun {}", "permalink": "spill-donut-chubby-marlin", "time": "2023-11-24 12:46:31.760840", "cmd": 1} {"id": 6797, "parent": 6796, "code": "sig Node{\n next: lone Node,\n value: one Val\n}\n\nsig Val {}\n\none sig List {\n header : lone Node\n}\n\nfact {\n no List.header.next.next\n\n Node in List.header.*next\n Val in Node.value\n}\n\nrun {}", "permalink": "yoyo-laptop-spiffy-photo", "time": "2023-11-24 12:47:08.376877", "cmd": 1} {"id": 6801, "parent": 6800, "code": "sig Student{}\nsig Teacher{}\nsig Subject{\n taught_by : Teacher,\n enrolled: Student\n}\n\nrun {} \n// for exactly 1 Subject, 2 Teacher, 1 Student", "permalink": "flaky-huddle-graph-census", "time": "2023-11-24 22:54:44.163921", "cmd": 1} {"id": 6802, "parent": 6801, "code": "sig Student{}\nsig Teacher{}\nsig Subject{\n taught_by : Teacher,\n enrolled: Student,\n pre_requisite: Subject\n}\n\nrun {} \n// for exactly 1 Subject, 2 Teacher, 1 Student", "permalink": "perky-crave-cope-slurp", "time": "2023-11-24 23:01:47.789264", "cmd": 1} {"id": 6804, "parent": 6803, "code": "sig Student{}\nsig Teacher{}\nsig Subject{\n taught_by : Teacher,\n enrolled: Student,\n pre_requisite: (Subject + Teacher)\n -- no self loops\n}\n\nrun {} \n// for exactly 1 Subject, 2 Teacher, 1 Student", "permalink": "ultra-evolve-late-letter", "time": "2023-11-24 23:08:44.026282", "cmd": 1} {"id": 6807, "parent": 6806, "code": "sig Student{\n -- no self loops\n}\nsig Teacher{\n -- no self loops\n}\nsig Subject{\n taught_by : Teacher,\n enrolled: Student- this,\n pre_requisite: Subject\n -- no self loops\n}\n\nrun {} \n// for exactly 1 Subject, 2 Teacher, 1 Student", "permalink": "status-yogurt-marine-halved", "time": "2023-11-24 23:24:13.225463", "cmd": 1} {"id": 6808, "parent": 6807, "code": "sig Student{\n -- no self loops\n}\nsig Teacher{\n -- no self loops\n}\nsig Subject{\n taught_by : Teacher,\n enrolled: Student,\n pre_requisite: Subject\n -- no self loops\n}\n\nrun {} \n// for exactly 1 Subject, 2 Teacher, 1 Student", "permalink": "return-area-steam-rubble", "time": "2023-11-24 23:24:19.598617", "cmd": 1} {"id": 6809, "parent": 6808, "code": "sig Student{\n -- no self loops\n}\nsig Teacher{\n -- no self loops\n}\nsig Subject{\n taught_by : Teacher,\n enrolled: Student,\n pre_requisite: Subject - this\n -- no self loops\n}\n\nrun {} \n// for exactly 1 Subject, 2 Teacher, 1 Student", "permalink": "tiptop-attain-army-carol", "time": "2023-11-24 23:24:34.271384", "cmd": 1} {"id": 6731, "parent": 6730, "code": "sig A{}\nrun {}", "permalink": "chuck-feisty-fall-press", "time": "2023-11-23 21:54:42.820414", "cmd": 1} {"id": 6735, "parent": 6734, "code": "module houses\n\nabstract sig House {\n major: one Major,\n color: one Color,\n}\n\none sig H1, H2, H3 extends House {}\n\nenum Major {\n Math, Phil, CS\n}\n\nenum Color {\n Blue, Red, White\n}\n\nfact {\n // all majors are in/linked by some house\n Major in House.major\n // all colors are on/used by some house\n Color in House.color\n \n // The philosophy major lives directly to the right of the red house.\n (H1.color = Red and H2.major = Phil) or ((H2.color = Red and H3.major = Phil))\n //The computer science major lives in the blue house.\n some h : House | h.color = Blue and h.major = CS\n //The math major lives in house 2.\n H2.major = Math \n}\n\nrun {} \nrun {}", "permalink": "yippee-sulfur-blurb-myself", "time": "2023-11-23 22:48:42.643640", "cmd": 2} {"id": 6737, "parent": null, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {all a : Assignment | one a.associated_with}\n\n// Predicate PolicyAllowsGrading defines the policy for allowing grading of an Assignment by a Person.\npred PolicyAllowsGrading(p: Person, a: Assignment) {\n p in a.associated_with.assistant or p in a.associated_with.instructor\n}\n\n// Assert NoOneCanGradeTheirOwnAssignment checks that no Person can grade their own Assignment.\nassert NoOneCanGradeTheirOwnAssignment {\n all p : Person, a : Assignment |\n PolicyAllowsGrading[p, a] implies not p in a.assigned_to\n}\n\ncheck NoOneCanGradeTheirOwnAssignment for 2", "permalink": "truck-impure-spider-verify", "time": "2023-11-23 23:39:49.265667", "cmd": 1} {"id": 6747, "parent": 6741, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n\nrun {}", "permalink": "maybe-almost-press-treat", "time": "2023-11-24 10:30:55.564250", "cmd": 1} {"id": 6754, "parent": 6752, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {all a : Assignment | one a.associated_with}\n\n// Predicate PolicyAllowsGrading defines the policy for allowing grading of an Assignment by a Person.\npred PolicyAllowsGrading(p: Person, a: Assignment) {\n p in a.associated_with.assistant or p in a.associated_with.instructor\n}\n\n// Assert NoOneCanGradeTheirOwnAssignment checks that no Person can grade their own Assignment.\nassert NoOneCanGradeTheirOwnAssignment {\n all p : Person, a : Assignment |\n PolicyAllowsGrading[p, a] implies not p in a.assigned_to\n}\n\ncheck NoOneCanGradeTheirOwnAssignment for 2", "permalink": "bluff-elk-blank-chest", "time": "2023-11-24 10:46:53.041446", "cmd": 1} {"id": 6759, "parent": 6758, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {\n all a : Assignment | one a.associated_with\n no Student\n}\n\nrun {} for 4", "permalink": "papaya-theme-trunks-atop", "time": "2023-11-24 10:53:35.398940", "cmd": 1} {"id": 6760, "parent": 6759, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {\n all a : Assignment | one a.associated_with\n}\n\nrun {} for 4", "permalink": "revert-left-boxer-nectar", "time": "2023-11-24 10:54:11.509659", "cmd": 1} {"id": 6762, "parent": 6761, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {\n all a : Assignment | one a.associated_with\n}\n\nrun {} for 4 but exactly 10 Student", "permalink": "robin-urban-chaos-pug", "time": "2023-11-24 10:55:41.325595", "cmd": 1} {"id": 6763, "parent": 6762, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {\n all a : Assignment | one a.associated_with\n}\n\nrun {} for 4 but exactly 4 Student", "permalink": "union-shore-trout-spooky", "time": "2023-11-24 10:56:46.970395", "cmd": 1} {"id": 6765, "parent": null, "code": "sig Node{}\nsig List {}\n\nrun {}", "permalink": "headed-rash-dipped-canopy", "time": "2023-11-24 11:06:19.237067", "cmd": 1} {"id": 6772, "parent": 6771, "code": "sig Node{\n next: lone Node,\n value: one Val\n}\n\nsig Val {}\n\nsig List {\n header : lone Node\n}\n\nrun {}", "permalink": "proofs-plank-yippee-fled", "time": "2023-11-24 11:10:54.427917", "cmd": 1} {"id": 6774, "parent": 6773, "code": "sig Node{\n next: lone Node,\n value: one Val\n}\n\nsig Val {}\n\none sig List {\n header : lone Node\n}\n\nfact {\n\n}\n\nrun {}", "permalink": "slinky-bagged-jet-curse", "time": "2023-11-24 11:13:33.423338", "cmd": 1} {"id": 6777, "parent": 6776, "code": "sig Node{\n next: lone Node,\n value: one Val\n}\n\nsig Val {}\n\none sig List {\n header : lone Node\n}\n\nfact {\n no List.header.next \n\n Node in List.header.*next\n}\n\nrun {}", "permalink": "scary-chute-phony-shabby", "time": "2023-11-24 11:17:22.818458", "cmd": 1} {"id": 6778, "parent": 6777, "code": "sig Node{\n next: lone Node,\n value: one Val\n}\n\nsig Val {}\n\none sig List {\n header : lone Node\n}\n\nfact {\n no List.header.next \n\n Node in List.header.*next\n Val in Node.value\n}\n\nrun {}", "permalink": "kiwi-golf-amid-tacky", "time": "2023-11-24 11:17:44.342169", "cmd": 1} {"id": 6780, "parent": 6779, "code": "sig Node{\n next: lone Node,\n value: one Val\n}\n\nsig Val {}\n\none sig List {\n header : lone Node\n}\n\nfact {\n no List.header.next.next\n\n Node in List.header.*next\n Val in Node.value\n}\n\nrun {}", "permalink": "jacket-ocelot-sitcom-alive", "time": "2023-11-24 11:18:28.925890", "cmd": 1} {"id": 6781, "parent": 6780, "code": "sig Node{\n next: lone Node,\n value: one Val\n}\n\nsig Val {}\n\none sig List {\n header : lone Node\n}\n\nfact {\n no List.header.next.next.next\n\n Node in List.header.*next\n Val in Node.value\n}\n\nrun {}", "permalink": "skype-ruckus-exhale-sheet", "time": "2023-11-24 11:18:42.313516", "cmd": 1} {"id": 6782, "parent": 6781, "code": "sig Node{\n next: lone Node,\n value: one Val\n}\n\nsig Val {}\n\none sig List {\n header : lone Node\n}\n\nfact {\n some n : Node | no n.next\n\n Node in List.header.*next\n Val in Node.value\n}\n\nrun {}", "permalink": "erupt-cleft-dove-trace", "time": "2023-11-24 11:20:07.324599", "cmd": 1} {"id": 6783, "parent": 6782, "code": "sig Node{\n next: lone Node,\n}\n\n\none sig List {\n header : lone Node\n}\n\nfact {\n some n : Node | no n.next\n\n Node in List.header.*next\n}\n\nrun {}", "permalink": "pager-salon-snare-taps", "time": "2023-11-24 11:20:56.238233", "cmd": 1} {"id": 6787, "parent": 6786, "code": "sig Node{\n nextNode: lone Node,\n}\n\n\none sig List {\n header : lone Node\n}\n\nfact {\n some n : List.header.*nextNode | no n.nextNode\n //Node in List.header.*nextNode\n}\n\nrun {}", "permalink": "smile-jigsaw-skater-fondue", "time": "2023-11-24 11:23:20.917656", "cmd": 1} {"id": 6790, "parent": 6751, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\nrun {} for 5", "permalink": "upon-syrup-paving-clamor", "time": "2023-11-24 11:30:28.961652", "cmd": 1} {"id": 6791, "parent": 6790, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\nrun {} for 10", "permalink": "brunch-giggly-crease-banner", "time": "2023-11-24 11:30:34.515399", "cmd": 1} {"id": 6792, "parent": 6791, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\nrun {} for 20", "permalink": "capped-nag-dipper-puppy", "time": "2023-11-24 11:30:39.073367", "cmd": 1} {"id": 6796, "parent": 6795, "code": "sig Node{\n next: lone Node,\n value: one Val\n}\n\nsig Val {}\n\none sig List {\n header : lone Node\n}\n\nfact {\n no List.header.next.next\n\n Node in List.header.*next\n Val in Node.value\n}\n\nrun {}", "permalink": "last-chess-flap-daybed", "time": "2023-11-24 12:47:01.168690", "cmd": 1} {"id": 6799, "parent": null, "code": "sig Student{}\nsig Teacher{}\n\nrun {}", "permalink": "thorn-baton-nuclei-mutt", "time": "2023-11-24 22:40:42.574014", "cmd": 1} {"id": 6800, "parent": 6799, "code": "sig Student{}\nsig Teacher{}\n\nsig Subject{\n taught_by : Teacher,\n enrolled: Student\n}\nrun {} for exactly 1 Subject, 2 Teacher, 1 Student", "permalink": "wreath-hurler-lumber-sweep", "time": "2023-11-24 22:41:42.696108", "cmd": 1} {"id": 6805, "parent": 6804, "code": "sig Student{\n -- no self loops\n}\nsig Teacher{\n -- no self loops\n}\nsig Subject{\n taught_by : Teacher,\n enrolled: Student,\n pre_requisite: (Subject + Teacher)\n -- no self loops\n}\n\nrun {} \n// for exactly 1 Subject, 2 Teacher, 1 Student", "permalink": "pastor-hulk-gopher-lugged", "time": "2023-11-24 23:09:15.071315", "cmd": 1} {"id": 6733, "parent": null, "code": "module houses\n\nabstract sig House {\n major: one Major,\n color: one Color,\n}\n\none sig H1, H2, H3 extends House {}\n\nenum Major {\n Math, Phil, CS\n}\n\nenum Color {\n Blue, Red, White\n}\n\nfact {\n // all majors are in/linked by some house\n Major in House.major\n // all colors are on/used by some house\n Color in House.color\n \n // The philosophy major lives directly to the right of the red house.\n (H1.color = Red and H2.major = Phil) or ((H2.color = Red and H3.major = Phil))\n //The computer science major lives in the blue house.\n some h : House | h.color = Blue and h.major = CS\n //The math major lives in house 2.\n H2.major = Math \n}\n\nrun {} ", "permalink": "marine-apple-gave-rarity", "time": "2023-11-23 22:47:04.622520", "cmd": 1} {"id": 6739, "parent": 6738, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\nrun {}", "permalink": "making-yield-awaken-mouse", "time": "2023-11-23 23:41:17.660270", "cmd": 1} {"id": 6741, "parent": 6739, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n\nrun {}", "permalink": "clause-ditzy-rival-prong", "time": "2023-11-23 23:45:48.480776", "cmd": 1} {"id": 6744, "parent": null, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "raisin-given-unsafe-shank", "time": "2023-11-23 23:58:47.823362", "cmd": 1} {"id": 6746, "parent": null, "code": "sig A{}\nrun {} ", "permalink": "geek-lanky-bats-boots", "time": "2023-11-24 08:56:55.411232", "cmd": 1} {"id": 6753, "parent": 6737, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {all a : Assignment | one a.associated_with}\n\n// Predicate PolicyAllowsGrading defines the policy for allowing grading of an Assignment by a Person.\npred PolicyAllowsGrading(p: Person, a: Assignment) {\n p in a.associated_with.assistant or p in a.associated_with.instructor\n}\n\n// Assert NoOneCanGradeTheirOwnAssignment checks that no Person can grade their own Assignment.\nassert NoOneCanGradeTheirOwnAssignment {\n all p : Person, a : Assignment |\n PolicyAllowsGrading[p, a] implies not p in a.assigned_to\n}\n\ncheck NoOneCanGradeTheirOwnAssignment for 2", "permalink": "sneer-upwind-acre-lifter", "time": "2023-11-24 10:46:16.387419", "cmd": 1} {"id": 6766, "parent": 6765, "code": "sig Node{}\nsig List {\n header : lone Node\n}\n\nrun {}", "permalink": "mud-patio-molar-mammal", "time": "2023-11-24 11:07:32.943434", "cmd": 1} {"id": 6768, "parent": 6767, "code": "sig Node{\n next: lone Node\n value: one Int\n}\n\n\nsig List {\n header : lone Node\n}\n\nrun {}", "permalink": "stove-reuse-launch-legume", "time": "2023-11-24 11:09:37.057484", "cmd": 1} {"id": 6770, "parent": 6769, "code": "sig Node{\n next: lone Node,\n value: one Int\n}\n\n\nsig List {\n header : lone Node\n}\n\nrun {}", "permalink": "awry-gamma-laurel-zips", "time": "2023-11-24 11:10:18.295663", "cmd": 1} {"id": 6776, "parent": 6775, "code": "sig Node{\n next: lone Node,\n value: one Val\n}\n\nsig Val {}\n\none sig List {\n header : lone Node\n}\n\nfact {\n no List.header.next \n}\n\nrun {}", "permalink": "clay-duplex-quote-truth", "time": "2023-11-24 11:16:47.067527", "cmd": 1} {"id": 6779, "parent": 6778, "code": "sig Node{\n next: lone Node,\n value: one Val\n}\n\nsig Val {}\n\none sig List {\n header : lone Node\n}\n\nfact {\n no List.header.next.next\n\n Node in List.header.*next\n Val in Node.value\n}\n\nrun {}", "permalink": "partly-agile-pecan-grasp", "time": "2023-11-24 11:18:02.925718", "cmd": 1} {"id": 6793, "parent": 6792, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\nrun {} for 50", "permalink": "nimble-sprint-barbed-widget", "time": "2023-11-24 11:30:45.968267", "cmd": 1} {"id": 6806, "parent": 6805, "code": "sig Student{\n -- no self loops\n}\nsig Teacher{\n -- no self loops\n}\nsig Subject{\n taught_by : Teacher,\n enrolled: Student-this,\n pre_requisite: Subject\n -- no self loops\n}\n\nrun {} \n// for exactly 1 Subject, 2 Teacher, 1 Student", "permalink": "prefix-simile-jumbo-errand", "time": "2023-11-24 23:24:01.768653", "cmd": 1} {"id": 6730, "parent": null, "code": "sig A{}\nrun {} ", "permalink": "squeak-wife-chomp-quirk", "time": "2023-11-23 21:54:24.311283", "cmd": 1} {"id": 6732, "parent": null, "code": "sig A{\n link: A\n}\nrun {}", "permalink": "mauve-purr-morale-ebook", "time": "2023-11-23 22:43:11.819848", "cmd": 1} {"id": 6734, "parent": 6733, "code": "module houses\n\nabstract sig House {\n major: one Major,\n color: one Color,\n}\n\none sig H1, H2, H3 extends House {}\n\nenum Major {\n Math, Phil, CS\n}\n\nenum Color {\n Blue, Red, White\n}\n\nfact {\n // all majors are in/linked by some house\n Major in House.major\n // all colors are on/used by some house\n Color in House.color\n \n // The philosophy major lives directly to the right of the red house.\n (H1.color = Red and H2.major = Phil) or ((H2.color = Red and H3.major = Phil))\n //The computer science major lives in the blue house.\n some h : House | h.color = Blue and h.major = CS\n //The math major lives in house 2.\n H2.major = Math \n}\n\nrun {} \nrun ", "permalink": "curly-afar-scared-lure", "time": "2023-11-23 22:48:16.674000", "cmd": 2} {"id": 6736, "parent": 6735, "code": "module houses\n\nabstract sig House {\n major: one Major,\n color: one Color,\n}\n\none sig H1, H2, H3 extends House {}\n\nenum Major {\n Math, Phil, CS\n}\n\nenum Color {\n Blue, Red, White\n}\n\nfact {\n // all majors are in/linked by some house\n Major in House.major\n // all colors are on/used by some house\n Color in House.color\n \n // The philosophy major lives directly to the right of the red house.\n (H1.color = Red and H2.major = Phil) or ((H2.color = Red and H3.major = Phil))\n //The computer science major lives in the blue house.\n some h : House | h.color = Blue and h.major = CS\n //The math major lives in house 2.\n H2.major = Math \n}\n\nrun {} \nrun {}", "permalink": "amuser-dangle-huddle-anvil", "time": "2023-11-23 22:48:48.234971", "cmd": 1} {"id": 6738, "parent": 6737, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\nrun {}", "permalink": "bonus-elope-engulf-police", "time": "2023-11-23 23:41:01.841263", "cmd": 1} {"id": 6740, "parent": 6739, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\nrun {}", "permalink": "relax-rocket-cement-grit", "time": "2023-11-23 23:41:46.520538", "cmd": 1} {"id": 6749, "parent": 6748, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Professor extends Person {}\nsig Student extends Person {}\n\nsig Class {}\n\nrun {}", "permalink": "thorn-silly-sleek-granny", "time": "2023-11-24 10:36:45.357279", "cmd": 1} {"id": 6751, "parent": 6739, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\nrun {}", "permalink": "shorts-wad-visa-equate", "time": "2023-11-24 10:39:54.008787", "cmd": 1} {"id": 6752, "parent": 6737, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {all a : Assignment | one a.associated_with}\n\n// Predicate PolicyAllowsGrading defines the policy for allowing grading of an Assignment by a Person.\npred PolicyAllowsGrading(p: Person, a: Assignment) {\n p in a.associated_with.assistant or p in a.associated_with.instructor\n}\n\n// Assert NoOneCanGradeTheirOwnAssignment checks that no Person can grade their own Assignment.\nassert NoOneCanGradeTheirOwnAssignment {\n all p : Person, a : Assignment |\n PolicyAllowsGrading[p, a] implies not p in a.assigned_to\n}\n\ncheck NoOneCanGradeTheirOwnAssignment for 2", "permalink": "tumble-ocean-shrink-filth", "time": "2023-11-24 10:45:35.319080", "cmd": 1} {"id": 6761, "parent": 6760, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {\n all a : Assignment | one a.associated_with\n}\n\nrun {}", "permalink": "dotted-screen-truth-amuck", "time": "2023-11-24 10:54:35.890794", "cmd": 1} {"id": 6764, "parent": 6763, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {\n all a : Assignment | one a.associated_with\n}\n\nrun {} for 4 but exactly 3 Student", "permalink": "creme-flaky-palm-yield", "time": "2023-11-24 10:57:07.016125", "cmd": 1} {"id": 6769, "parent": 6768, "code": "sig Node{\n next: lone Node,\n value: one Int\n}\n\n\nsig List {\n header : lone Node\n}\n\nrun {}", "permalink": "cinema-dock-deploy-moaner", "time": "2023-11-24 11:09:44.296692", "cmd": 1} {"id": 6771, "parent": 6770, "code": "sig Node{\n next: lone Node,\n value: one Int\n}\n\n\nsig List {\n header : lone Node\n}\n\nrun {}", "permalink": "ferris-easter-cedar-pagan", "time": "2023-11-24 11:10:26.659263", "cmd": 1} {"id": 6773, "parent": 6772, "code": "sig Node{\n next: lone Node,\n value: one Val\n}\n\nsig Val {}\n\nsig List {\n header : lone Node\n}\n\nfact {\n \n}\n\nrun {}", "permalink": "fever-even-padded-paying", "time": "2023-11-24 11:13:05.325262", "cmd": 1} {"id": 6775, "parent": 6774, "code": "sig Node{\n next: lone Node,\n value: one Val\n}\n\nsig Val {}\n\none sig List {\n header : lone Node\n}\n\nfact {\n no List.header.next \n}\n\nrun {}", "permalink": "utter-frosty-nephew-delta", "time": "2023-11-24 11:14:33.978224", "cmd": 1} {"id": 6784, "parent": 6783, "code": "sig Node{\n next: lone Node,\n}\n\n\none sig List {\n header : lone Node\n}\n\nfact {\n some n : Node | no n.next\n //Node in List.header.*next\n}\n\nrun {}", "permalink": "fridge-unwed-return-obtain", "time": "2023-11-24 11:21:30.654679", "cmd": 1} {"id": 6788, "parent": 6787, "code": "sig Node{\n nextNode: lone Node,\n}\n\n\none sig List {\n header : lone Node\n}\n\nfact {\n some n : List.header.*nextNode | no n.nextNode\n Node in List.header.*nextNode\n}\n\nrun {}", "permalink": "cache-tidy-pawing-trough", "time": "2023-11-24 11:23:41.341733", "cmd": 1} {"id": 6789, "parent": 6788, "code": "sig Node{\n nextNode: lone Node,\n}\n\n\none sig List {\n header : lone Node\n}\n\nfact {\n no List.header or some n : List.header.*nextNode | no n.nextNode\n Node in List.header.*nextNode\n}\n\nrun {}", "permalink": "linked-skied-evict-raging", "time": "2023-11-24 11:26:10.161710", "cmd": 1} {"id": 6794, "parent": 6789, "code": "sig Node{\n nextNode: lone Node,\n}\n\n\none sig List {\n header : lone Node\n}\n\nfact {\n no List.header or some n : List.header.*nextNode | no n.nextNode\n Node in List.header.*nextNode\n}\n\nrun {} for 20", "permalink": "zap-tables-art-nappy", "time": "2023-11-24 11:30:46.714613", "cmd": 1} {"id": 6803, "parent": 6802, "code": "sig Student{}\nsig Teacher{}\nsig Subject{\n taught_by : Teacher,\n enrolled: Student,\n pre_requisite: (Subject + Teacher)\n}\n\nrun {} \n// for exactly 1 Subject, 2 Teacher, 1 Student", "permalink": "amigo-cope-floss-eggnog", "time": "2023-11-24 23:08:11.134731", "cmd": 1} {"id": 6948, "parent": 6947, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\nfact noDanglingNodes {\n Node in List.header.*link\n}\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "cash-create-lurch-paper", "time": "2023-11-27 19:57:23.258432", "cmd": 1} {"id": 6949, "parent": 6948, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\n\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "flying-cosmic-mating-deacon", "time": "2023-11-27 19:57:44.010041", "cmd": 1} {"id": 6951, "parent": 6950, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\n\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "outlet-blush-mug-gothic", "time": "2023-11-27 19:59:09.586969", "cmd": 1} {"id": 6952, "parent": 6951, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\n\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "twisty-revert-anthem-eating", "time": "2023-11-27 19:59:29.849597", "cmd": 1} {"id": 6954, "parent": 6953, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\n\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "unkind-posted-catchy-alias", "time": "2023-11-27 19:59:37.994749", "cmd": 1} {"id": 6956, "parent": 6955, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "calm-slang-poem-neon", "time": "2023-11-27 20:55:23.378060", "cmd": 1} {"id": 6957, "parent": 6955, "code": "one sig List { \n header: lone Node,\n size : Int\n} \n\nsig Node {\n link: lone Node \n}\n\nfact sizeOk {\n size = #List.header.*link \n}\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3", "permalink": "arise-evict-garden-ultra", "time": "2023-11-27 20:58:42.954256", "cmd": 1} {"id": 6958, "parent": 6957, "code": "one sig List { \n header: lone Node,\n size : Int\n} \n\nsig Node {\n link: lone Node \n}\n\nfact sizeOk {\n List.size = #List.header.*link \n}\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3", "permalink": "tartar-finer-bagful-debit", "time": "2023-11-27 20:59:32.866194", "cmd": 1} {"id": 6960, "parent": 6959, "code": "one sig List { \n header: lone Node,\n} \n\nsig Node {\n link: lone Node \n elem : Int\n}\n\nfact ordered {\n all disj n1, n2: some n.link implies n.elem < n.link.elem\n}\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3", "permalink": "wilt-bagful-buffer-public", "time": "2023-11-27 21:01:10.898672", "cmd": 1} {"id": 6967, "parent": 6966, "code": "one sig List { \n header: lone Node,\n} \n\nsig Node {\n link: lone Node,\n elem : Int\n}\n\nfact ordered {\n all n : Node | \n some n.link implies \n n.elem < n.link.elem\n}\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3", "permalink": "tulip-clover-cramp-alone", "time": "2023-11-27 21:20:50.721276", "cmd": 1} {"id": 6972, "parent": null, "code": "sig A{}\nrun {}", "permalink": "bunt-sleep-crust-worry", "time": "2023-11-27 21:25:03.824290", "cmd": 1} {"id": 6982, "parent": null, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n //no List.header or some n : List.header.*link | no n.link\n some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "trunks-refute-claw-pastor", "time": "2023-11-27 21:42:27.253065", "cmd": 1} {"id": 6984, "parent": null, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n //no List.header or some n : List.header.*link | no n.link\n no List.header or some n : Node | no n.link\n}\nrun {} for 1", "permalink": "snowy-sponge-sporty-tavern", "time": "2023-11-27 21:45:00.925850", "cmd": 1} {"id": 6990, "parent": null, "code": "one sig List { header : lone Node }\nsig Node { link : lone Node }\npred Acyclic {\n no List.header or some n : List.header.*link | no n.link\n}\nassert links_equal_size { Acyclic => #List.header.^link = #link }\ncheck links_equal_size ", "permalink": "replay-garden-exes-canola", "time": "2023-11-27 22:03:44.825077", "cmd": 1} {"id": 6997, "parent": 6996, "code": "sig Guest {}\nsig Drunk in Guest {}\n\npred drinkers {\n some x : Guest |\n x in Drunk implies \n all y : Guest |\n z in Drunk\n}\n\nrun drinkers for 3", "permalink": "purge-botany-unify-glare", "time": "2023-11-27 22:36:48.129746", "cmd": 1} {"id": 6999, "parent": 6998, "code": "sig Guest {}\nsig Drunk in Guest {}\n\npred drinkers {\n some x : Guest |\n (x in Drunk implies \n all y : Guest |\n y in Drunk)\n}\n\nrun drinkers for 3", "permalink": "nerd-aorta-guts-factor", "time": "2023-11-27 22:37:35.458382", "cmd": 1} {"id": 7001, "parent": 7000, "code": "sig Guest {}\nsig Drunk in Guest {}\n\npred drinkers {\n some x : Guest |\n (x in Drunk implies \n all y : Guest | y in Drunk)\n}\n\nrun drinkers for 5", "permalink": "amaze-decaf-chess-moaner", "time": "2023-11-27 22:38:20.261329", "cmd": 1} {"id": 7005, "parent": 7004, "code": "one sig List {\n header: lone Node \n} \nsig Node {\n link: lone Node \n}\nfact noDanglingNodes {\n Node in List.header.*link\n}\n\nrun { all n : List.header.*link | no n.link } for 3", "permalink": "skied-mayday-exert-equal", "time": "2023-11-28 07:59:52.095877", "cmd": 1} {"id": 7006, "parent": 6744, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "amends-lurk-ruby-step", "time": "2023-11-28 08:35:43.571349", "cmd": 1} {"id": 7011, "parent": 7010, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\nfact allNodesInList {\n //Node = List.header.*link\n}\nrun acyclic for 10", "permalink": "clone-aging-charm-hush", "time": "2023-11-28 08:42:21.135065", "cmd": 1} {"id": 7015, "parent": 7014, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\nfact allNodesInList {\n Node = List.header.*link\n}\nrun acyclic for 10", "permalink": "coming-same-drudge-strung", "time": "2023-11-28 08:44:48.946212", "cmd": 1} {"id": 7017, "parent": 7016, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\nrun {} for 10", "permalink": "crying-arena-droop-grid", "time": "2023-11-28 08:47:25.323501", "cmd": 1} {"id": 7021, "parent": 7020, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\nfact allNodesInList {\n //Node = List.header.*link\n}\n\npred emptyList {\n no List.header\n}\n\nrun acyclic for 10\n\nrun emptyList for 3", "permalink": "plated-powwow-sermon-cozy", "time": "2023-11-28 08:54:32.180879", "cmd": 2} {"id": 7028, "parent": 7027, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {\n friends : lone Person\n}\nsig Student, Professor extends Person {}\n\n\nrun {} for 3 but exactly 1 Professor", "permalink": "finer-veggie-sneeze-awry", "time": "2023-11-28 09:03:38.570694", "cmd": 1} {"id": 7034, "parent": 7033, "code": "// A Person can be either a Student or a Professor.\nsig Person {\n friends : some Person\n}\nsig Student, Professor extends Person {}\n\npred noRegularPerson {\n not (Person = Professor + Student)\n}\n\nsig Staff in Person {}\n\nfact {\n Professor in Staff\n}\n\nrun noRegularPerson\nrun {} for 3 but exactly 1 Professor", "permalink": "sturdy-navy-simply-aids", "time": "2023-11-28 09:11:39.513990", "cmd": 2} {"id": 7040, "parent": 7039, "code": "sig List { header: set Node } \n\nsig Node { link: set Node }\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nfact allNodesInList {\n Node = List.header.*link\n}\n\nfact {\n one List\n //(all l : List | \n //lone l.header)\n //(all n : Node | \n //lone n.link)\n\n}\n\nrun acyclic for 3", "permalink": "buddy-recent-issue-glory", "time": "2023-11-28 09:28:12.751061", "cmd": 1} {"id": 7043, "parent": 7042, "code": "one sig List { header: lone Node } \n\nsig Node { link: lone Node }\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nfact allNodesInList {\n Node = List.header.*link\n}\n\nrun acyclic for 10", "permalink": "creme-deduce-issue-stout", "time": "2023-11-28 10:30:15.578387", "cmd": 1} {"id": 7046, "parent": 7018, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\nrun {} for 2", "permalink": "mute-boggle-affair-afford", "time": "2023-11-28 10:56:28.675542", "cmd": 1} {"id": 7056, "parent": null, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nrun {}", "permalink": "dawn-june-blah-luxury", "time": "2023-11-28 14:10:33.957690", "cmd": 1} {"id": 7058, "parent": 7057, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\nrun {}", "permalink": "lumber-flinch-dart-relic", "time": "2023-11-28 14:11:14.301003", "cmd": 1} {"id": 7059, "parent": 7058, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nsig Person {\n friend: set Person,\n\n}\nsig Student, Professor extends Person {}\nsig Class {\n students : some Student,\n lecturer : one Professor\n}\n\nrun {}", "permalink": "dab-shrimp-revert-sadly", "time": "2023-11-28 14:12:48.565296", "cmd": 1} {"id": 7060, "parent": 7059, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nsig Person {\n friend : set Person,\n family : set Person \n}\n\nsig Student, Professor extends Person {}\n\nsig Class {\n students : some Student,\n lecturer : one Professor\n}\n\nrun {}", "permalink": "untrue-unwary-curvy-dwarf", "time": "2023-11-28 14:13:21.073426", "cmd": 1} {"id": 7062, "parent": 7061, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nsig Person {\n friend : set Person,\n family : set Person \n}\n\nsig Student, Professor extends Person {\n classes : set Class,\n name : one String\n}\n\nsig Class {\n students : some Student,\n lecturer : one Professor\n}\n\nfact f1 {\n all s : Student | s.classes in Professor.classes\n}\n\nfact f2 {\n Class = Professor.classes\n}\n\nrun {some Professor}", "permalink": "swirl-recess-stump-singer", "time": "2023-11-28 15:03:56.059560", "cmd": 1} {"id": 7070, "parent": null, "code": "abstract sig Person {\n killed: some Person,\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n Agatha.killed.killed.Agatha\n}\n\nrun puzzle for 3", "permalink": "corny-neatly-sprig-botany", "time": "2023-11-28 15:42:29.937122", "cmd": 1} {"id": 6950, "parent": 6949, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\n\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "civil-zen-veggie-powwow", "time": "2023-11-27 19:57:51.615086", "cmd": 1} {"id": 6959, "parent": 6958, "code": "one sig List { \n header: lone Node,\n size : Int\n} \n\nsig Node {\n link: lone Node \n}\n\nfact sizeOk {\n List.size = #List.header.*link \n}\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3", "permalink": "purify-primal-reverb-rise", "time": "2023-11-27 20:59:50.817176", "cmd": 1} {"id": 6968, "parent": 6967, "code": "one sig List { \n header: lone Node,\n} \n\nsig Node {\n link: lone Node,\n elem : Int\n}\n\nfact ordered {\n all n : Node | \n some n.link implies \n n.elem < n.link.elem\n}\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3", "permalink": "defy-cyclic-clumsy-atop", "time": "2023-11-27 21:21:50.864544", "cmd": 1} {"id": 6971, "parent": 6970, "code": "one sig List { \n header: lone Node,\n} \n\nsig Node {\n link: lone Node,\n elem : Int\n}\n\nfact ordered {\n all n : Node | \n some n.link implies \n n.elem < n.link.elem\n}\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3", "permalink": "wheat-flask-manual-emcee", "time": "2023-11-27 21:22:11.975781", "cmd": 1} {"id": 6980, "parent": 6979, "code": "one sig List {\n header: lone Node \n} \nsig Node {\n link: lone Node \n}\nfact noDanglingNodes {\n Node in List.header.*link\n}\n\nrun { lone n : List.header.*link | no n.link } for 3", "permalink": "strife-cosmic-clean-cusp", "time": "2023-11-27 21:41:09.338811", "cmd": 1} {"id": 6983, "parent": 6982, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n //no List.header or some n : List.header.*link | no n.link\n some n : List.header.*link | no n.link\n}\nrun acyclic for 1", "permalink": "raffle-deduce-flashy-saggy", "time": "2023-11-27 21:43:24.264243", "cmd": 1} {"id": 6988, "parent": 6987, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n //no List.header or some n : List.header.*link | no n.link\n no List.header or some n : Node | no n.link\n}\nrun acyclic for 2", "permalink": "embark-catsup-speed-elf", "time": "2023-11-27 21:59:23.789553", "cmd": 1} {"id": 6989, "parent": 6988, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n //no List.header or some n : List.header.*link | no n.link\n no List.header or some n : Node | no n.link\n}\nrun acyclic for 1 but exactly 2 Node", "permalink": "hardy-boots-aspect-chatty", "time": "2023-11-27 21:59:38.333506", "cmd": 1} {"id": 6993, "parent": 6992, "code": "sig Guest {}\n// subset signature\nsig Drunk in Guest {}\n\nrun {Guest = Drunk}", "permalink": "halt-shout-douche-matron", "time": "2023-11-27 22:31:52.509942", "cmd": 1} {"id": 7010, "parent": 7009, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\nfact allNodesInList {\n Node = List.header.*link\n}\nrun acyclic for 10", "permalink": "erupt-avenge-jacket-galley", "time": "2023-11-28 08:41:41.613099", "cmd": 1} {"id": 7016, "parent": 6739, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\nrun {}", "permalink": "aloof-gown-sporty-yo-yo", "time": "2023-11-28 08:47:16.796892", "cmd": 1} {"id": 7020, "parent": 7019, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\nfact allNodesInList {\n Node = List.header.*link\n}\n\npred emptyList {\n no List.header\n}\n\nrun acyclic for 10\n\nrun emptyList for 3", "permalink": "grout-canola-poser-edge", "time": "2023-11-28 08:53:52.786355", "cmd": 2} {"id": 7024, "parent": 7023, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\nfact allNodesInList {\n Node = List.header.*link\n}\n\npred emptyList {\n no List.header\n}\n\nrun acyclic for 10\n\nrun emptyList for 3", "permalink": "elm-danger-retool-reset", "time": "2023-11-28 08:55:46.875346", "cmd": 2} {"id": 7026, "parent": 7025, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {\n friends : set Person\n}\nsig Student, Professor extends Person {}\n\n\nrun {}", "permalink": "puma-dance-shorty-nimble", "time": "2023-11-28 09:01:39.404731", "cmd": 1} {"id": 7027, "parent": 7026, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {\n friends : set Person\n}\nsig Student, Professor extends Person {}\n\n\nrun {} for 3 but exactly 1 Professor", "permalink": "lunar-equity-emote-amount", "time": "2023-11-28 09:02:25.706248", "cmd": 1} {"id": 7029, "parent": 7028, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {\n friends : some Person\n}\nsig Student, Professor extends Person {}\n\n\nrun {} for 3 but exactly 1 Professor", "permalink": "tray-race-oval-pastel", "time": "2023-11-28 09:04:05.936187", "cmd": 1} {"id": 7030, "parent": 7029, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {\n friends : some Person\n}\nsig Student, Professor extends Person {}\n\npred noRegularPerson {\n Person = Professor + Student\n}\n\n\nrun noRegularPerson\nrun {} for 3 but exactly 1 Professor", "permalink": "awhile-chase-dugout-curry", "time": "2023-11-28 09:07:32.283988", "cmd": 1} {"id": 7031, "parent": 7030, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {\n friends : some Person\n}\nsig Student, Professor extends Person {}\n\npred noRegularPerson {\n not (Person = Professor + Student)\n}\n\n\nrun noRegularPerson\nrun {} for 3 but exactly 1 Professor", "permalink": "truck-gout-phoney-onion", "time": "2023-11-28 09:09:16.416389", "cmd": 1} {"id": 7033, "parent": 7032, "code": "// A Person can be either a Student or a Professor.\nsig Person {\n friends : some Person\n}\nsig Student, Professor extends Person {}\n\npred noRegularPerson {\n not (Person = Professor + Student)\n}\n\nsig Staff in Person {}\n\nrun noRegularPerson\nrun {} for 3 but exactly 1 Professor", "permalink": "self-mule-axis-sector", "time": "2023-11-28 09:11:16.225855", "cmd": 2} {"id": 7041, "parent": 7040, "code": "sig List { header: set Node } \n\nsig Node { link: set Node }\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nfact allNodesInList {\n Node = List.header.*link\n}\n\nfact {\n one List\n (all l : List | \n lone l.header)\n (all n : Node | \n lone n.link)\n\n}\n\nrun acyclic for 3", "permalink": "fever-tarmac-suffix-hazing", "time": "2023-11-28 09:28:26.486396", "cmd": 1} {"id": 7042, "parent": 7041, "code": "sig List { header: set Node } \n\nsig Node { link: set Node }\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nfact allNodesInList {\n Node = List.header.*link\n}\n\nfact {\n one List\n (all l : List | \n lone l.header)\n (all n : Node | \n lone n.link)\n\n}\n\nrun acyclic for 10", "permalink": "litmus-petted-oil-earful", "time": "2023-11-28 09:28:39.897687", "cmd": 1} {"id": 7057, "parent": 7056, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n//run {}", "permalink": "yin-cause-cache-crane", "time": "2023-11-28 14:10:40.793279", "cmd": 1} {"id": 7065, "parent": 7064, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nsig Person {\n friend : set Person,\n family : set Person \n}\n\nsig Student, Professor extends Person {\n classes : set Class,\n name : set String\n}\n\nsig Class {\n students : some Student,\n lecturer : one Professor\n}\n\nfact f1 {\n all s : Student | s.classes in Professor.classes\n}\n\nfact f2 {\n Class = Professor.classes\n}\n\nrun {some Student} for 5", "permalink": "thread-zoom-ecard-sitcom", "time": "2023-11-28 15:04:22.047640", "cmd": 1} {"id": 7066, "parent": 7065, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nsig Person {\n friend : set Person,\n family : set Person \n}\n\nsig Student, Professor extends Person {\n classes : set Class,\n name : set String\n}\n\nsig Class {\n students : some Student,\n lecturer : one Professor\n}\n\nfact f1 {\n all s : Student | s.classes in Professor.classes\n}\n\nfact f2 {\n Class = Professor.classes\n}\n\nrun {some Student} ", "permalink": "juror-squall-snarl-civic", "time": "2023-11-28 15:04:50.666789", "cmd": 1} {"id": 7068, "parent": null, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\nrun {}", "permalink": "even-echo-sprig-narrow", "time": "2023-11-28 15:17:32.911415", "cmd": 1} {"id": 7071, "parent": 7070, "code": "abstract sig Person {\n killed: some Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n Agatha.killed.killed = Agatha\n}\n\nrun puzzle for 3", "permalink": "frisk-clutch-august-ashy", "time": "2023-11-28 15:42:57.216170", "cmd": 1} {"id": 7072, "parent": 7071, "code": "sig Person {\n killed: some Person\n}\n\npred puzzle {\n Agatha.killed.killed.killed = Agatha\n}\n\nrun puzzle for 3", "permalink": "dodgy-voter-switch-unzip", "time": "2023-11-28 15:43:22.485369", "cmd": 1} {"id": 7078, "parent": 7077, "code": "sig Person {\n killed: some Person\n}\none sig Agatha extends Person {}\npred puzzle {\n Agatha.killed.killed.killed = Agatha\n no (iden & *killed)\n}\n\nrun puzzle for 6", "permalink": "afford-unclad-motion-skinny", "time": "2023-11-28 15:45:11.709665", "cmd": 1} {"id": 7079, "parent": 7078, "code": "sig Person {\n killed: some Person\n}\none sig Agatha extends Person {}\npred puzzle {\n some Agatha.killed.killed.killed\n no (iden & ^killed)\n}\n\nrun puzzle for 6", "permalink": "query-poker-shrine-coming", "time": "2023-11-28 15:45:38.376699", "cmd": 1} {"id": 7081, "parent": 7080, "code": "sig S {}\nsig A extends S {\n b : one B\n}\nsig B extends S {\n c : one C\n}\nsig C extends S {\n d : one D\n}\n\nsig D extends S{\n\n}\n\n\nrun {} for 3", "permalink": "snout-liquid-cobalt-strict", "time": "2023-11-28 15:48:43.303403", "cmd": 1} {"id": 7083, "parent": 7082, "code": "sig S {}\nsig A extends S {\n b : one B\n}\nsig B extends S {\n c : one C\n}\nsig C extends S {\n d : one D\n}\n\nsig D extends S{\n\n}\n\n\nrun {some A} for 3", "permalink": "ultra-waving-filter-clay", "time": "2023-11-28 15:48:55.445460", "cmd": 1} {"id": 7084, "parent": 7083, "code": "sig S {}\nsig A extends S {\n b : one B\n}\nsig B extends S {\n c : one C\n}\nsig C extends S {\n d : one D\n}\n\nsig D extends S{\n\n}\n\n\nrun {some A} for 5", "permalink": "curdle-emit-chaos-clench", "time": "2023-11-28 15:48:59.731427", "cmd": 1} {"id": 7088, "parent": 7087, "code": "sig S {}\nsig A extends S {\n b : one B,\n c : one C,\n d : one D\n}\nsig B extends S {\n c : one C\n}\nsig C extends S {\n d : one D\n}\n\nsig D extends S{\n\n}\n\n\nrun {some A} for 3", "permalink": "case-cramp-onto-action", "time": "2023-11-28 15:50:02.447694", "cmd": 1} {"id": 7090, "parent": 7089, "code": "sig S {}\nsig A extends S {\n b : one B,\n c : one C,\n d : one D\n}\nsig B, C, D extends S {\n}\n\n\n\nrun {some A} for 4", "permalink": "alive-coil-resale-joyous", "time": "2023-11-28 15:50:22.452979", "cmd": 1} {"id": 7091, "parent": 7090, "code": "sig S {}\nsig A extends S {\n b : one B,\n c : one C,\n d : one D\n}\nsig B, C, D extends S {\n}\n\n\n\nrun {some A} for 3", "permalink": "satin-outwit-cattle-shove", "time": "2023-11-28 15:50:28.287371", "cmd": 1} {"id": 7094, "parent": 7060, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nsig Person {\n friend : set Person,\n family : set Person \n}\n\nsig Student, Professor extends Person {\n classes : set Class,\n name : set String\n}\n\nsig Class {\n students : some Student,\n lecturer : one Professor\n}\n\nfact f1 {\n all s : Student | s.classes in Professor.classes\n}\n\nfact f2 {\n Class = Professor.classes\n}\n\npred p1 { \n some Student\n}\npred p2 {\n no Person\n some Professor\n}\nrun p1\nrun p2", "permalink": "moody-manger-glass-lego", "time": "2023-11-28 19:12:58.276658", "cmd": 1} {"id": 7095, "parent": 7094, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\n\npred puzzle {\n some x : Person | Agatha in x.killed\n all x, y : Person | \n y in x.killed implies (y in x.hates and y not in x.richer)\n all x : Person | \n x in Agatha.hates implies x not in Charles.hates\n Agatha in Agatha.hates and Charles in Agatha.hates\n all x : Person | \n Agatha not in x.richer implies x in Butler.hates\n all x : Person | \n x in Agatha.hates implies x in Butler.hates\n all x : Person | \n some y : Person | \n y not in x.hates\n}\n\nrun puzzle", "permalink": "slacks-rewash-music-tree", "time": "2023-11-28 19:13:42.904458", "cmd": 1} {"id": 7097, "parent": 7096, "code": "// A Person can be either a Student or a Professor.\nsig Person {}\nsig Student, Professor extends Person {}\n\n\nrun {}", "permalink": "daily-grub-cyclic-retake", "time": "2023-11-28 20:28:03.865498", "cmd": 1} {"id": 7099, "parent": 7098, "code": "// A Person can be either a Student or a Professor.\nabstract Person {}\n\nsig Student, Professor extends Person{}\n\nrun {}", "permalink": "eagle-deport-verse-sift", "time": "2023-11-28 20:28:43.405019", "cmd": 1} {"id": 7100, "parent": 7099, "code": "// A Person can be either a Student or a Professor.\nabstract Person{}\n\nsig Student, Professor extends Person{}\n\nrun {}", "permalink": "starry-husked-gown-lagged", "time": "2023-11-28 20:28:59.449495", "cmd": 1} {"id": 7101, "parent": 7100, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person{}\n\nsig Student, Professor extends Person{}\n\nrun {}", "permalink": "primal-lazy-modify-impure", "time": "2023-11-28 20:29:18.287683", "cmd": 1} {"id": 7102, "parent": 7101, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person{}\n\nsig Student, Professor extends Person{}\n\nrun {} for 3", "permalink": "clad-lazily-thaw-sweat", "time": "2023-11-28 20:29:31.679666", "cmd": 1} {"id": 6946, "parent": null, "code": "sig A{n}\nrun {}", "permalink": "oppose-ducky-buffer-vowel", "time": "2023-11-27 08:55:38.373108", "cmd": 1} {"id": 6947, "parent": 6744, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "perm-turtle-recess-cane", "time": "2023-11-27 19:55:37.788376", "cmd": 1} {"id": 6953, "parent": 6952, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\n\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "curly-scouts-facing-septum", "time": "2023-11-27 19:59:34.862200", "cmd": 1} {"id": 6955, "parent": 6744, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "sled-mouth-opt-croak", "time": "2023-11-27 20:45:18.419165", "cmd": 1} {"id": 6964, "parent": 6963, "code": "one sig List { \n header: lone Node,\n} \n\nsig Node {\n link: lone Node,\n elem : Int\n}\n\nfact ordered {\n all n : Node | \n some n.link implies \n n.elem < n.link.elem\n}\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3", "permalink": "stew-racoon-zoom-booted", "time": "2023-11-27 21:03:04.386598", "cmd": 1} {"id": 6966, "parent": 6965, "code": "one sig List { \n header: lone Node,\n} \n\nsig Node {\n link: lone Node,\n elem : Int\n}\n\nfact ordered {\n all n : Node | \n some n.link implies \n n.elem < n.link.elem\n}\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3", "permalink": "hacker-clash-speech-pusher", "time": "2023-11-27 21:20:08.345625", "cmd": 1} {"id": 6969, "parent": 6968, "code": "one sig List { \n header: lone Node,\n} \n\nsig Node {\n link: lone Node,\n elem : Int\n}\n\nfact ordered {\n all n : Node | \n some n.link implies \n n.elem < n.link.elem\n}\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3", "permalink": "magma-lilac-rewind-sandy", "time": "2023-11-27 21:22:02.428143", "cmd": 1} {"id": 6970, "parent": 6969, "code": "one sig List { \n header: lone Node,\n} \n\nsig Node {\n link: lone Node,\n elem : Int\n}\n\nfact ordered {\n all n : Node | \n some n.link implies \n n.elem < n.link.elem\n}\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3", "permalink": "snugly-sandy-squire-boxy", "time": "2023-11-27 21:22:05.380810", "cmd": 1} {"id": 6973, "parent": 6972, "code": "sig A{\n size : Int \n}\nrun {}", "permalink": "dean-ounce-ground-exes", "time": "2023-11-27 21:26:02.691170", "cmd": 1} {"id": 6977, "parent": 6976, "code": "one sig List {\n header: lone Node \n} \nsig Node {\n link: lone Node \n}\nfact noDanglingNodes {\n Node in List.header.*link\n}\n\nrun { all n : List.header.*link | no n.link } for 3", "permalink": "tag-ebook-brush-smite", "time": "2023-11-27 21:39:50.587844", "cmd": 1} {"id": 6978, "parent": 6977, "code": "one sig List {\n header: lone Node \n} \nsig Node {\n link: lone Node \n}\nfact noDanglingNodes {\n Node in List.header.*link\n}\n\nrun { some n : List.header.*link | no n.link } for 3", "permalink": "friend-frying-gilled-wad", "time": "2023-11-27 21:40:13.481123", "cmd": 1} {"id": 6979, "parent": 6978, "code": "one sig List {\n header: lone Node \n} \nsig Node {\n link: lone Node \n}\nfact noDanglingNodes {\n Node in List.header.*link\n}\n\nrun { no n : List.header.*link | no n.link } for 3", "permalink": "sturdy-aloe-twirl-deceit", "time": "2023-11-27 21:40:41.091372", "cmd": 1} {"id": 6987, "parent": 6986, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n //no List.header or some n : List.header.*link | no n.link\n no List.header or some n : Node | no n.link\n}\nrun acyclic for 1 but exactly 2 Node", "permalink": "scribe-trifle-untrue-skiing", "time": "2023-11-27 21:58:46.100690", "cmd": 1} {"id": 6991, "parent": null, "code": "sig Guest {}\n// subset signature\nsig Drunk subset Guest {}\n\nrun {}", "permalink": "relic-bash-ferris-stir", "time": "2023-11-27 22:30:55.875165", "cmd": 1} {"id": 6995, "parent": 6994, "code": "sig Guest {}\nsig Drunk in Guest {}\n\npred drinkers {\n no Drunk\n}\n\nrun drinkers for 3", "permalink": "bonnet-ruckus-laurel-unease", "time": "2023-11-27 22:32:52.006332", "cmd": 1} {"id": 6998, "parent": 6997, "code": "sig Guest {}\nsig Drunk in Guest {}\n\npred drinkers {\n some x : Guest |\n x in Drunk implies \n all y : Guest |\n y in Drunk\n}\n\nrun drinkers for 3", "permalink": "tidy-bovine-attire-snazzy", "time": "2023-11-27 22:36:54.658382", "cmd": 1} {"id": 7008, "parent": 7006, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\nfact allNodesInList {\n Node = List.header.*link\n}\nrun acyclic for 3", "permalink": "stylus-stays-cacti-rubble", "time": "2023-11-28 08:36:55.930052", "cmd": 1} {"id": 7014, "parent": 7013, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\nfact allNodesInList {\n Node = List.header.*link\n}\nrun acyclic for 10", "permalink": "stung-gray-define-hurler", "time": "2023-11-28 08:43:00.060987", "cmd": 1} {"id": 7018, "parent": 7017, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\nrun {} for 2", "permalink": "quiver-ramble-luxury-cherub", "time": "2023-11-28 08:47:45.627139", "cmd": 1} {"id": 7022, "parent": 7021, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\nfact allNodesInList {\n Node = List.header.*link\n}\n\npred emptyList {\n no List.header\n}\n\nrun acyclic for 10\n\nrun emptyList for 3", "permalink": "yahoo-affirm-yoyo-truck", "time": "2023-11-28 08:55:03.262985", "cmd": 2} {"id": 7032, "parent": 7031, "code": "// A Person can be either a Student or a Professor.\nsig Person {\n friends : some Person\n}\nsig Student, Professor extends Person {}\n\npred noRegularPerson {\n not (Person = Professor + Student)\n}\n\n\nrun noRegularPerson\nrun {} for 3 but exactly 1 Professor", "permalink": "roamer-brush-carry-rash", "time": "2023-11-28 09:09:58.469262", "cmd": 1} {"id": 7035, "parent": 7024, "code": "sig List { header: lone Node } \n\nsig Node { link: lone Node }\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nfact allNodesInList {\n Node = List.header.*link\n}\n\nfact {\n one List\n}\n\nrun acyclic for 3", "permalink": "repent-lurk-hangup-staple", "time": "2023-11-28 09:25:40.657578", "cmd": 1} {"id": 7036, "parent": 7035, "code": "sig List { header: Node } \n\nsig Node { link: Node }\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nfact allNodesInList {\n Node = List.header.*link\n}\n\nfact {\n one List\n all l : List | \n lone l.header\n all n : Node | \n lone n.link\n\n}\n\nrun acyclic for 3", "permalink": "debit-each-clad-shadow", "time": "2023-11-28 09:26:57.587039", "cmd": 1} {"id": 7037, "parent": 7036, "code": "sig List { header: Node } \n\nsig Node { link: Node }\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nfact allNodesInList {\n Node = List.header.*link\n}\n\nfact {\n one List\n (all l : List | \n lone l.header)\n (all n : Node | \n lone n.link)\n\n}\n\nrun acyclic for 3", "permalink": "recede-jargon-aged-oxygen", "time": "2023-11-28 09:27:25.741576", "cmd": 1} {"id": 7061, "parent": 7060, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nsig Person {\n friend : set Person,\n family : set Person \n}\n\nsig Student, Professor extends Person {\n classes : set Class,\n name : one String\n}\n\nsig Class {\n students : some Student,\n lecturer : one Professor\n}\n\nfact f1 {\n all s : Student | s.classes in Professor.classes\n}\n\nfact f2 {\n Class = Professor.classes\n}\n\nrun {}", "permalink": "facing-awning-jargon-dowry", "time": "2023-11-28 15:03:41.260788", "cmd": 1} {"id": 7069, "parent": 7068, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "poncho-wanted-single-legume", "time": "2023-11-28 15:22:17.636430", "cmd": 1} {"id": 7075, "parent": 7074, "code": "sig Person {\n killed: some Person\n}\none sig Agatha extends Person {}\npred puzzle {\n Agatha.killed.killed.killed = Agatha\n no (iden & ^killed)\n}\n\nrun puzzle for 3", "permalink": "chafe-ship-sister-budget", "time": "2023-11-28 15:44:44.629215", "cmd": 1} {"id": 7076, "parent": 7075, "code": "sig Person {\n killed: some Person\n}\none sig Agatha extends Person {}\npred puzzle {\n Agatha.killed.killed.killed = Agatha\n no (iden & ^killed)\n}\n\nrun puzzle for 6", "permalink": "lumber-deface-swore-bacon", "time": "2023-11-28 15:44:51.333855", "cmd": 1} {"id": 7077, "parent": 7076, "code": "sig Person {\n killed: some Person\n}\none sig Agatha extends Person {}\npred puzzle {\n Agatha.killed.killed.killed = Agatha\n no (iden & killed)\n}\n\nrun puzzle for 6", "permalink": "curvy-kiwi-graves-phobia", "time": "2023-11-28 15:45:00.901517", "cmd": 1} {"id": 7082, "parent": 7081, "code": "sig S {}\nsig A extends S {\n b : one B\n}\nsig B extends S {\n c : one C\n}\nsig C extends S {\n d : one D\n}\n\nsig D extends S{\n\n}\n\n\nrun {A} for 3", "permalink": "sleep-only-suing-swore", "time": "2023-11-28 15:48:50.281501", "cmd": 1} {"id": 7086, "parent": 7085, "code": "sig S {}\nsig A extends S {\n b : one B\n}\nsig B extends S {\n c : one C\n}\nsig C extends S {\n d : one D\n}\n\nsig D extends S{\n\n}\n\n\nrun {some A} for 3", "permalink": "wrench-tweak-legume-cannon", "time": "2023-11-28 15:49:21.264200", "cmd": 1} {"id": 7092, "parent": 7091, "code": "sig S {}\nsig A extends S {\n b : one B,\n c : one C,\n d : one D\n}\nsig B, C, D extends S {\n}\n\n\n\nrun {} for 3", "permalink": "tux-nephew-chrome-slate", "time": "2023-11-28 15:50:39.945854", "cmd": 1} {"id": 7098, "parent": 7097, "code": "// A Person can be either a Student or a Professor.\nabstract Person{}\n\nsig Student, Professor extends Person{}\n\nrun {}", "permalink": "bribe-daily-ramrod-heat", "time": "2023-11-28 20:28:36.226312", "cmd": 1} {"id": 7103, "parent": 7102, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person{}\n\nsig Student, Professor extends Person{}\n\nrun {} for 3 but exactly 1 Student", "permalink": "pebble-womb-seduce-thinly", "time": "2023-11-28 20:29:51.303960", "cmd": 1} {"id": 7104, "parent": 7103, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person{}\n\nsig Student, Professor extends Person{}\n\nrun {} for 3 but exactly 1 Professor", "permalink": "shorty-pogo-wince-silica", "time": "2023-11-28 20:31:30.284345", "cmd": 1} {"id": 7105, "parent": 7104, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person{}\n\nlone sig Student, Professor extends Person{}\n\nrun {} for 3 but exactly 1 Professor", "permalink": "puppy-among-reuse-sudoku", "time": "2023-11-28 20:31:47.734649", "cmd": 1} {"id": 7106, "parent": 7105, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person{}\n\nlone sig Student, Professor extends Person{}\n\nrun {} for 3 but exactly 2 Professor", "permalink": "crowd-peso-tilt-stick", "time": "2023-11-28 20:31:55.542446", "cmd": 1} {"id": 7107, "parent": 7106, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person{}\n\nlone sig Student, Professor extends Person{}\n\nrun {} for 3 but exactly 1 Professor", "permalink": "aspire-envy-fever-shale", "time": "2023-11-28 20:32:03.684575", "cmd": 1} {"id": 7108, "parent": 7107, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person{}\n\nlone sig Student, Professor extends Person{}\n\nrun {} for 3 exactly 1 Professor", "permalink": "film-swoosh-posing-folk", "time": "2023-11-28 20:32:31.324507", "cmd": 1} {"id": 7109, "parent": 7108, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person{}\n\nlone sig Student, Professor extends Person{}\n\nrun {} for 3 but exactly 1 Professor", "permalink": "corny-recess-gnarly-slot", "time": "2023-11-28 20:32:42.126021", "cmd": 1} {"id": 7110, "parent": 7109, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person{}\n\nsig Student, Professor extends Person{}\n\nrun {} for 3 but exactly 1 Professor", "permalink": "gating-april-giggly-eats", "time": "2023-11-28 20:33:00.920458", "cmd": 1} {"id": 6961, "parent": 6960, "code": "one sig List { \n header: lone Node,\n} \n\nsig Node {\n link: lone Node,\n elem : Int\n}\n\nfact ordered {\n all disj n1, n2: some n.link implies n.elem < n.link.elem\n}\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3", "permalink": "spout-mangle-collie-robe", "time": "2023-11-27 21:01:20.879741", "cmd": 1} {"id": 6962, "parent": 6961, "code": "one sig List { \n header: lone Node,\n} \n\nsig Node {\n link: lone Node,\n elem : Int\n}\n\nfact ordered {\n all disj n1, n2 | some n.link implies n.elem < n.link.elem\n}\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3", "permalink": "frolic-olive-body-iguana", "time": "2023-11-27 21:01:27.665657", "cmd": 1} {"id": 6963, "parent": 6962, "code": "one sig List { \n header: lone Node,\n} \n\nsig Node {\n link: lone Node,\n elem : Int\n}\n\nfact ordered {\n all disj n1, n2 : Node | some n.link implies n.elem < n.link.elem\n}\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3", "permalink": "clammy-duly-froth-twins", "time": "2023-11-27 21:01:52.933266", "cmd": 1} {"id": 6965, "parent": 6964, "code": "one sig List { \n header: lone Node,\n} \n\nsig Node {\n link: lone Node,\n elem : Int\n}\n\nfact ordered {\n all n : Node | \n some n.link implies \n n.elem < n.link.elem\n}\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3", "permalink": "affair-ocelot-entomb-crepe", "time": "2023-11-27 21:03:27.566781", "cmd": 1} {"id": 6974, "parent": 6744, "code": "one sig List {\n header: lone Node \n} \nsig Node {\n link: lone Node \n}\n\nrun {all n : List.header.*link | no n.link} for 3", "permalink": "cure-drool-raven-jovial", "time": "2023-11-27 21:39:01.096586", "cmd": 1} {"id": 6975, "parent": 6974, "code": "one sig List {\n header: lone Node \n} \nsig Node {\n link: lone Node \n}\nfact noDanglingNodes {\n Node in List.header.*.link\n}\n\nrun {all n : List.header.*link | no n.link} for 3", "permalink": "pogo-dweeb-lisp-emu", "time": "2023-11-27 21:39:29.341566", "cmd": 1} {"id": 6976, "parent": 6975, "code": "one sig List {\n header: lone Node \n} \nsig Node {\n link: lone Node \n}\nfact noDanglingNodes {\n Node in List.header.*link\n}\n\nrun {all n : List.header.*link | no n.link} for 3", "permalink": "study-feline-bolt-sitter", "time": "2023-11-27 21:39:34.704750", "cmd": 1} {"id": 6981, "parent": 6980, "code": "one sig List {\n header: lone Node \n} \nsig Node {\n link: lone Node \n}\nfact noDanglingNodes {\n Node in List.header.*link\n}\n\nrun { one n : List.header.*link | no n.link } for 3", "permalink": "dusk-sludge-manual-half", "time": "2023-11-27 21:41:41.436345", "cmd": 1} {"id": 6985, "parent": 6984, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n //no List.header or some n : List.header.*link | no n.link\n no List.header or some n : Node | no n.link\n}\nrun {} for 1 ", "permalink": "cancel-county-envy-avid", "time": "2023-11-27 21:45:58.126098", "cmd": 1} {"id": 6986, "parent": 6985, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n //no List.header or some n : List.header.*link | no n.link\n no List.header or some n : Node | no n.link\n}\nrun acyclic for 1 ", "permalink": "graph-garter-bobcat-gorged", "time": "2023-11-27 21:58:22.147427", "cmd": 1} {"id": 6992, "parent": 6991, "code": "sig Guest {}\n// subset signature\nsig Drunk in Guest {}\n\nrun {}", "permalink": "replay-crying-bottom-puppy", "time": "2023-11-27 22:31:04.065338", "cmd": 1} {"id": 6994, "parent": 6993, "code": "sig Guest {}\nsig Drunk in Guest {}\n\npred drinkers {\n \n}\n\nrun drinkers for 3", "permalink": "cache-ensure-lagoon-ample", "time": "2023-11-27 22:32:42.193378", "cmd": 1} {"id": 6996, "parent": 6995, "code": "sig Guest {}\nsig Drunk in Guest {}\n\npred drinkers {\n \n}\n\nrun drinkers for 3", "permalink": "jigsaw-civil-phobia-dial", "time": "2023-11-27 22:33:01.638528", "cmd": 1} {"id": 7000, "parent": 6999, "code": "sig Guest {}\nsig Drunk in Guest {}\n\npred drinkers {\n some x : Guest |\n (x in Drunk implies \n all y : Guest | y in Drunk)\n}\n\nrun drinkers for 3", "permalink": "babied-small-sloppy-washer", "time": "2023-11-27 22:38:13.641136", "cmd": 1} {"id": 7002, "parent": 7001, "code": "sig Guest {}\nsig Drunk in Guest {}\n\npred drinkers {\n some x : Guest |\n (x in Drunk implies \n all y : Guest | y in Drunk)\n}\n\nrun drinkers for 5", "permalink": "spongy-niece-choosy-flier", "time": "2023-11-27 22:51:05.877288", "cmd": 1} {"id": 7003, "parent": null, "code": "one sig List {\n header: lone Node \n} \nsig Node {\n link: lone Node \n}\nfact noDanglingNodes {\n Node in List.header.*link\n}\n\nrun { all n : List.header.*link | no n.link } for 3", "permalink": "grower-nearby-avert-retype", "time": "2023-11-28 07:58:59.430286", "cmd": 1} {"id": 7004, "parent": 7003, "code": "one sig List {\n header: lone Node \n} \nsig Node {\n link: lone Node \n}\nfact noDanglingNodes {\n Node in List.header.*link\n}\n\nrun { all n : List.header.*link | no n.link } for 3 ", "permalink": "spud-tweet-device-crook", "time": "2023-11-28 07:59:13.988595", "cmd": 1} {"id": 7007, "parent": 6744, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "ruby-tables-crying-chevy", "time": "2023-11-28 08:36:26.436799", "cmd": 1} {"id": 7009, "parent": 7008, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\nfact allNodesInList {\n Node = List.header.*link\n}\n//run acyclic for 3", "permalink": "primal-remark-radar-talon", "time": "2023-11-28 08:38:22.374567", "cmd": 1} {"id": 7012, "parent": 7011, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\nfact allNodesInList {\n Node = List.header.*link\n}\nrun acyclic for 10", "permalink": "rinse-cola-ashen-gauze", "time": "2023-11-28 08:42:44.233933", "cmd": 1} {"id": 7013, "parent": 7012, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\nfact allNodesInList {\n Node = List.header.*link\n}\nrun acyclic for 3", "permalink": "emboss-palm-old-define", "time": "2023-11-28 08:42:53.176145", "cmd": 1} {"id": 7019, "parent": 7015, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\nfact allNodesInList {\n Node = List.header.*link\n}\nrun acyclic for 10\n\nrun emptyList for 3", "permalink": "rising-perish-paper-frown", "time": "2023-11-28 08:50:54.454279", "cmd": 2} {"id": 7023, "parent": 7022, "code": "one sig List { header: one Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\nfact allNodesInList {\n Node = List.header.*link\n}\n\npred emptyList {\n no List.header\n}\n\nrun acyclic for 10\n\nrun emptyList for 3", "permalink": "jovial-sushi-spinal-arrive", "time": "2023-11-28 08:55:13.782770", "cmd": 2} {"id": 7025, "parent": 6741, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n\nrun {}", "permalink": "stood-rubber-floss-garlic", "time": "2023-11-28 09:00:40.734629", "cmd": 1} {"id": 7038, "parent": 7037, "code": "sig List { header: Node } \n\nsig Node { link: Node }\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nfact allNodesInList {\n Node = List.header.*link\n}\n\nfact {\n one List\n (all l : List | \n lone l.header)\n //(all n : Node | \n //lone n.link)\n\n}\n\nrun acyclic for 3", "permalink": "chunk-payee-cover-blip", "time": "2023-11-28 09:27:46.446617", "cmd": 1} {"id": 7039, "parent": 7038, "code": "sig List { header: Node } \n\nsig Node { link: Node }\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nfact allNodesInList {\n Node = List.header.*link\n}\n\nfact {\n one List\n //(all l : List | \n //lone l.header)\n //(all n : Node | \n //lone n.link)\n\n}\n\nrun acyclic for 3", "permalink": "good-wiry-dad-dinghy", "time": "2023-11-28 09:27:56.389087", "cmd": 1} {"id": 7044, "parent": 7043, "code": "one sig List { header: lone Node } \n\nsig Node { link: lone Node }\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nfact allNodesInList {\n Node = List.header.*link\n}\n\nrun acyclic for 10", "permalink": "shanty-xbox-upward-bleach", "time": "2023-11-28 10:30:24.577140", "cmd": 1} {"id": 7045, "parent": 7044, "code": "one sig List { header: lone Node } \n\nsig Node { link: lone Node }\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nfact allNodesInList {\n Node = List.header.*link\n}\n\nrun acyclic for 20", "permalink": "grip-owl-blurry-brush", "time": "2023-11-28 10:31:08.024863", "cmd": 1} {"id": 7047, "parent": 7046, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\nrun {} for 2", "permalink": "dander-cupid-gangly-sheet", "time": "2023-11-28 10:56:57.970380", "cmd": 1} {"id": 7063, "parent": 7062, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nsig Person {\n friend : set Person,\n family : set Person \n}\n\nsig Student, Professor extends Person {\n classes : set Class,\n name : one String\n}\n\nsig Class {\n students : some Student,\n lecturer : one Professor\n}\n\nfact f1 {\n all s : Student | s.classes in Professor.classes\n}\n\nfact f2 {\n Class = Professor.classes\n}\n\nrun {some Student}", "permalink": "thank-sash-falcon-verify", "time": "2023-11-28 15:04:00.311310", "cmd": 1} {"id": 7064, "parent": 7063, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nsig Person {\n friend : set Person,\n family : set Person \n}\n\nsig Student, Professor extends Person {\n classes : set Class,\n name : one String\n}\n\nsig Class {\n students : some Student,\n lecturer : one Professor\n}\n\nfact f1 {\n all s : Student | s.classes in Professor.classes\n}\n\nfact f2 {\n Class = Professor.classes\n}\n\nrun {some Student} for 5", "permalink": "wifi-amulet-poison-sepia", "time": "2023-11-28 15:04:04.526188", "cmd": 1} {"id": 7067, "parent": 7066, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nsig Person {\n friend : set Person,\n family : set Person \n}\n\nsig Student, Professor extends Person {\n classes : set Class,\n name : one String\n}\n\nsig Class {\n students : some Student,\n lecturer : one Professor\n}\n\nfact f1 {\n all s : Student | s.classes in s.lecturer.classes\n}\n\n\nrun {}", "permalink": "shove-wrath-riches-untie", "time": "2023-11-28 15:05:14.545277", "cmd": 1} {"id": 7073, "parent": 7072, "code": "sig Person {\n killed: some Person\n}\none sig Agatha extends Person {}\npred puzzle {\n Agatha.killed.killed.killed = Agatha\n}\n\nrun puzzle for 3", "permalink": "phoney-lilac-grimy-bauble", "time": "2023-11-28 15:43:34.204411", "cmd": 1} {"id": 7074, "parent": 7073, "code": "sig Person {\n killed: some Person\n}\none sig Agatha extends Person {}\npred puzzle {\n Agatha.killed.killed.killed = Agatha\n not (iden in ^killed)\n}\n\nrun puzzle for 3", "permalink": "gawk-pusher-rebuff-thrive", "time": "2023-11-28 15:44:13.745535", "cmd": 1} {"id": 7080, "parent": 7079, "code": "sig Person {\n killed: some Person\n}\none sig Agatha extends Person {}\npred puzzle {\n some Agatha.killed.killed.killed\n no (iden & ^killed)\n}\n\nrun puzzle for 9", "permalink": "chase-saint-sugar-clash", "time": "2023-11-28 15:46:26.785342", "cmd": 1} {"id": 7085, "parent": 7084, "code": "sig S {}\nsig A extends S {\n b : one B\n}\nsig B extends S {\n c : one C\n}\nsig C extends S {\n d : one D\n}\n\nsig D extends S{\n\n}\n\n\nrun {some A} for 4", "permalink": "living-sugar-fervor-unsent", "time": "2023-11-28 15:49:18.432509", "cmd": 1} {"id": 7087, "parent": 7086, "code": "sig S {}\nsig A extends S {\n b : one B\n c : one C\n d : one D\n}\nsig B extends S {\n c : one C\n}\nsig C extends S {\n d : one D\n}\n\nsig D extends S{\n\n}\n\n\nrun {some A} for 3", "permalink": "anyone-paver-cringe-yam", "time": "2023-11-28 15:49:56.277571", "cmd": 1} {"id": 7089, "parent": 7088, "code": "sig S {}\nsig A extends S {\n b : one B,\n c : one C,\n d : one D\n}\nsig B extends S {\n c : one C\n}\nsig C extends S {\n d : one D\n}\n\nsig D extends S{\n\n}\n\n\nrun {some A} for 4", "permalink": "xerox-garden-spleen-ogle", "time": "2023-11-28 15:50:07.107024", "cmd": 1} {"id": 7096, "parent": 6741, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n\nrun {}", "permalink": "gothic-washer-drum-grief", "time": "2023-11-28 20:22:55.244849", "cmd": 1} {"id": 7111, "parent": 7110, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person{}\n\nsig Student extends Person{\n\n}\n\nsig Professor extends Person{\n\n}\n\nrun {}", "permalink": "zombie-arose-sublet-trowel", "time": "2023-11-28 20:42:46.697758", "cmd": 1} {"id": 7112, "parent": 7111, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person{}\n\nsig Student extends Person{\n \n}\n\nsig Professor extends Person{\n\n}\n\nrun {}", "permalink": "voter-march-rehire-bulk", "time": "2023-11-28 20:45:01.677504", "cmd": 1} {"id": 7252, "parent": 7251, "code": "sig List{\n header: lone Node\n}\nsig Node {\n next: lone Node\n\n}\n\npred acyclic{\n some n: List.header.*next | no n.next\n}\n\nrun{}", "permalink": "napped-decal-stir-elixir", "time": "2023-11-29 23:20:47.664434", "cmd": 1} {"id": 7255, "parent": 7254, "code": "sig List{\n header: lone Node\n}\nsig Node {\n next: lone Node\n}\n\npred acyclic{\n some n : List.header.*next | no n.next\n}\nrun acyclic for 3", "permalink": "tusk-annex-surfer-viral", "time": "2023-11-29 23:23:00.006222", "cmd": 1} {"id": 7261, "parent": 6744, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "aware-maimed-july-wool", "time": "2023-11-29 23:25:54.778379", "cmd": 1} {"id": 7266, "parent": 7264, "code": "one sig List{\n header: lone Node\n}\n\nsig Node {\n link: lone Node,\n}\n\nfact {\n no List.header or some n : List.header.*next | no n.link,\n Node in List.header.*next\n}\n\nrun{}", "permalink": "dean-dude-bagful-strict", "time": "2023-11-29 23:31:34.723908", "cmd": 1} {"id": 7267, "parent": 7266, "code": "one sig List{\n header: lone Node\n}\n\nsig Node {\n link: lone Node,\n}\n\nfact {\n no List.header or some n : List.header.*next | no n.link,\n Node in List.header.*link\n}\n\nrun{}", "permalink": "evil-cape-antler-refund", "time": "2023-11-29 23:32:37.317687", "cmd": 1} {"id": 7274, "parent": 7273, "code": "one sig List{\n header: lone Node\n}\n\nsig Node {\n next: lone Node\n}\n\nfact {\n some n : Node | no n.next\n Node in List.header.*next\n}\n\n\nrun{}", "permalink": "upheld-laurel-shale-grader", "time": "2023-11-29 23:35:57.840593", "cmd": 1} {"id": 7276, "parent": 7275, "code": "one sig List{\n header: lone Node\n}\n\nsig Node {\n nextNode: lone Node\n}\n\nfact {\n no List.header or some n : ist.header.*nextNode | no n.nextNode\n // Node in List.header.*nextNode\n}\n\n\nrun{}", "permalink": "twelve-emote-expel-angled", "time": "2023-11-29 23:39:12.056662", "cmd": 1} {"id": 7277, "parent": 7276, "code": "one sig List{\n header: lone Node\n}\n\nsig Node {\n nextNode: lone Node\n}\n\nfact {\n no List.header or some n : List.header.*nextNode | no n.nextNode\n // Node in List.header.*nextNode\n}\n\n\nrun{}", "permalink": "petty-vista-dangle-saga", "time": "2023-11-29 23:39:19.563932", "cmd": 1} {"id": 7280, "parent": 7279, "code": "one sig List{\n header: lone Node\n}\n\nsig Node {\n nextNode: lone Node\n}\n\nfact {\n no List.header or some n : List.header.*nextNode | no n.nextNode\n Node in List.header.*nextNode\n}\n\nrun{}", "permalink": "goon-ploy-clumsy-query", "time": "2023-11-29 23:48:20.598854", "cmd": 1} {"id": 7281, "parent": 6990, "code": "one sig List { header : lone Node }\nsig Node { link : lone Node }\npred Acyclic {\n no List.header or some n : List.header.*link | no n.link\n}\nassert links_equal_size { Acyclic => #List.header.^link = #link }\ncheck links_equal_size", "permalink": "sank-elf-good-fabric", "time": "2023-11-30 14:57:32.239053", "cmd": 1} {"id": 7113, "parent": 7112, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person{}\n\nsig Student extends Person{\n\n}\n\nsig Professor extends Person{\n\n}\n\nsig Class{\n \n}\n\nrun {}", "permalink": "unripe-sepia-judo-urging", "time": "2023-11-28 20:45:56.267668", "cmd": 1} {"id": 7247, "parent": 6737, "code": "one sig List{\n\n}\nsig Node {\n\n}\n\nrun{}", "permalink": "ovary-trance-quill-swab", "time": "2023-11-29 23:13:57.256171", "cmd": 1} {"id": 7254, "parent": 7253, "code": "sig List{\n header: lone Node\n}\nsig Node {\n next: lone Node\n}\n\npred acyclic{\n some n : List.header.*next | no n.next\n}\n\nrun acyclic for 3", "permalink": "urgent-task-rack-silk", "time": "2023-11-29 23:21:53.362404", "cmd": 1} {"id": 7258, "parent": 7257, "code": "sig List{\n header: lone Node\n}\nsig Node {\n next: lone Node\n}\n\nfact{\n no List.header or some n : List.header.*next | no n.next\n}\nrun{}", "permalink": "eraser-kindly-bulgur-stamp", "time": "2023-11-29 23:24:10.682108", "cmd": 1} {"id": 7264, "parent": 7263, "code": "one sig List{\n header: lone Node\n}\n\nsig Node {\n link: lone Node,\n}\n\nfact {\n no List.header or some n : List.header.*next | no n.link\n}\n\nrun{}", "permalink": "comic-decaf-elk-geiger", "time": "2023-11-29 23:29:32.794071", "cmd": 1} {"id": 7269, "parent": 7268, "code": "one sig List{\n header: lone Node\n}\n\nsig Node {\n link: lone Node,\n}\n\nfact {\n no List.header or some n : List.header.*next | no n.link\n Node in List.header.*next\n}\n\n\nrun{}", "permalink": "spider-hurry-squad-blitz", "time": "2023-11-29 23:33:23.436247", "cmd": 1} {"id": 7270, "parent": 7269, "code": "one sig List{\n header: lone Node\n}\n\nsig Node {\n next: lone Node,\n}\n\nfact {\n no List.header or some n : List.header.*next | no n.link\n Node in List.header.*next\n}\n\n\nrun{}", "permalink": "sizing-shown-babble-aloof", "time": "2023-11-29 23:35:06.247989", "cmd": 1} {"id": 7279, "parent": 7278, "code": "one sig List{\n header: lone Node\n}\n\nsig Node {\n nextNode: lone Node\n}\n\nfact {\n no List.header or some n : List.header.*nextNode | no n.nextNode\n // Node in List.header.*nextNode\n}\n\nrun{}", "permalink": "bless-doodle-prior-deftly", "time": "2023-11-29 23:41:24.359453", "cmd": 1} {"id": 7114, "parent": 7113, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person{}\n\nsig Student extends Person{\n\n}\n\nsig Professor extends Person{\n\n}\n\nsig Class{\n instructor : one Professor\n}\n\nsig Assignment{\n\n}\n\nrun {}", "permalink": "spoken-sinner-helmet-little", "time": "2023-11-28 20:47:27.649103", "cmd": 1} {"id": 7116, "parent": 7115, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person{}\n\nsig Student extends Person{\n\n}\n\nsig Professor extends Person{\n instructor : one Professor\n}\n\nsig Class{\n // instructor : one Professor\n\n}\n\nsig Assignment{\n\n}\n\nrun {}", "permalink": "uphill-pleat-hertz-dowry", "time": "2023-11-28 20:48:13.193423", "cmd": 1} {"id": 7117, "parent": 7116, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person{}\n\nsig Student extends Person{\n\n}\n\nsig Professor extends Person{\n \n}\n\nsig Class{\n instructor : one Professor\n\n}\n\nsig Assignment{\n\n}\n\nrun {}", "permalink": "purple-gents-canola-showy", "time": "2023-11-28 20:48:30.447352", "cmd": 1} {"id": 7119, "parent": 7118, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person{}\n\nsig Student extends Person{\n\n}\n\nsig Professor extends Person{\n \n}\n\nsig Class{\n instructor : one Professor,\n assistant : set Student\n\n}\n\nsig Assignment{\n associated_with: set Class,\n assigned_to: some Student\n}\n\nrun {}", "permalink": "change-legal-mold-niece", "time": "2023-11-28 20:49:25.363452", "cmd": 1} {"id": 7120, "parent": 6744, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "barge-bring-await-yummy", "time": "2023-11-29 07:27:22.452403", "cmd": 1} {"id": 7259, "parent": 7258, "code": "sig Node {\n next: lone Node\n}\nsig List{\n header: lone Node\n}\n\nfact{\n no List.header or some n : List.header.*next | no n.next\n}\nrun{}", "permalink": "syrup-lather-ascent-ranger", "time": "2023-11-29 23:24:30.170459", "cmd": 1} {"id": 7260, "parent": 7259, "code": "sig Node {\n next: lone Node\n}\nsig List{\n header: lone Node\n}\n\nfact {\n no List.header or some n : List.header.*next | no n.next\n}\n\nrun{}", "permalink": "strung-relish-speech-public", "time": "2023-11-29 23:24:38.661177", "cmd": 1} {"id": 7262, "parent": 7260, "code": "one sig List{\n header: lone Node\n}\n\nsig Node {\n next: lone Node\n}\n\n\nfact {\n no List.header or some n : List.header.*next | no n.next\n}\n\nrun{}", "permalink": "fondue-stoke-spry-matrix", "time": "2023-11-29 23:26:18.057670", "cmd": 1} {"id": 7268, "parent": 7267, "code": "one sig List{\n header: lone Node\n}\n\nsig Node {\n link: lone Node,\n}\n\nfact {\n no List.header or some n : List.header.*next | no n.link\n Node in List.header.*next\n}\n\nrun{}", "permalink": "radar-dose-deftly-script", "time": "2023-11-29 23:32:47.530839", "cmd": 1} {"id": 7271, "parent": 7270, "code": "one sig List{\n header: lone Node\n}\n\nsig Node {\n next: lone Node,\n}\n\nfact {\n no List.header or some n : List.header.*next | no n.next\n Node in List.header.*next\n}\n\n\nrun{}", "permalink": "yin-flinch-whiff-jot", "time": "2023-11-29 23:35:15.293519", "cmd": 1} {"id": 7272, "parent": 7271, "code": "one sig List{\n header: lone Node\n}\n\nsig Node {\n next: lone Node,\n}\n\nfact {\n some n : List.header.*next | no n.next\n Node in List.header.*next\n}\n\n\nrun{}", "permalink": "spree-bony-balmy-widen", "time": "2023-11-29 23:35:29.222292", "cmd": 1} {"id": 7273, "parent": 7272, "code": "one sig List{\n header: lone Node\n}\n\nsig Node {\n next: lone Node\n}\n\nfact {\n some n : List.header.*next | no n.next\n Node in List.header.*next\n}\n\n\nrun{}", "permalink": "ditzy-vest-lived-sinner", "time": "2023-11-29 23:35:43.470177", "cmd": 1} {"id": 7275, "parent": 7274, "code": "one sig List{\n header: lone Node\n}\n\nsig Node {\n nextNode: lone Node\n}\n\nfact {\n some n : Node | no n.nextNode\n Node in List.header.*nextNode\n}\n\n\nrun{}", "permalink": "sequel-hyphen-raving-wasabi", "time": "2023-11-29 23:38:39.181800", "cmd": 1} {"id": 7278, "parent": 7277, "code": "one sig List{\n header: lone Node\n}\n\nsig Node {\n nextNode: lone Node\n}\n\nfact {\n no List.header or some n : List.header.*nextNode | no n.nextNode\n Node in List.header.*nextNode\n}\n\n\nrun{}", "permalink": "jailer-chevy-exhume-grime", "time": "2023-11-29 23:39:31.076601", "cmd": 1} {"id": 7115, "parent": 7114, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person{}\n\nsig Student extends Person{\n\n}\n\nsig Professor extends Person{\n\n}\n\nsig Class{\n instructor : one Professor\n \n}\n\nsig Assignment{\n\n}\n\nrun {}", "permalink": "front-snort-polar-goon", "time": "2023-11-28 20:47:40.793702", "cmd": 1} {"id": 7118, "parent": 7117, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person{}\n\nsig Student extends Person{\n\n}\n\nsig Professor extends Person{\n \n}\n\nsig Class{\n instructor : one Professor,\n assistant : set Student\n\n}\n\nsig Assignment{\n\n}\n\nrun {}", "permalink": "deny-paddle-eskimo-slick", "time": "2023-11-28 20:48:52.765398", "cmd": 1} {"id": 7248, "parent": 7247, "code": "one sig List{\n link: Node\n}\nsig Node {\n\n}\n\nrun{}", "permalink": "turban-from-entail-banish", "time": "2023-11-29 23:14:16.008832", "cmd": 1} {"id": 7249, "parent": 7248, "code": "one sig List{\n Node: header\n}\nsig Node {\n\n}\n\nrun{}", "permalink": "puppy-supper-plod-stench", "time": "2023-11-29 23:14:52.658009", "cmd": 1} {"id": 7250, "parent": 7249, "code": "one sig List{\n header: lone Node\n}\nsig Node {\n\n}\n\nrun{}", "permalink": "tank-phony-squint-jab", "time": "2023-11-29 23:15:25.468455", "cmd": 1} {"id": 7251, "parent": 7250, "code": "sig List{\n header: lone Node\n}\nsig Node {\n next: lone Node\n}\n\nrun{}", "permalink": "yummy-zips-able-winter", "time": "2023-11-29 23:17:49.240702", "cmd": 1} {"id": 7253, "parent": 7252, "code": "sig List{\n header: lone Node\n}\nsig Node {\n next: lone Node\n\n}\n\npred acyclic{\n some n: List.header.*next | no n.next\n}\n\nrun acyclic for 3", "permalink": "tabby-system-roping-native", "time": "2023-11-29 23:21:21.606334", "cmd": 1} {"id": 7256, "parent": 7255, "code": "sig List{\n header: lone Node\n}\nsig Node {\n next: lone Node\n}\n\npred acyclic(){\n some n : List.header.*next | no n.next\n}\nrun acyclic for 3", "permalink": "good-gown-frays-marrow", "time": "2023-11-29 23:23:14.652563", "cmd": 1} {"id": 7257, "parent": 7256, "code": "sig List{\n header: lone Node\n}\nsig Node {\n next: lone Node\n}\n\npred acyclic(){\n no List.header or some n : List.header.*next | no n.next\n}\nrun acyclic for 3", "permalink": "golf-stood-snort-filler", "time": "2023-11-29 23:23:59.539141", "cmd": 1} {"id": 7263, "parent": 7262, "code": "one sig List{\n header: lone Node\n}\n\nsig Node {\n link: lone Node\n}\n\nfact {\n no List.header or some n : List.header.*next | no n.link\n}\n\nrun{}", "permalink": "march-decree-throat-groggy", "time": "2023-11-29 23:26:49.104166", "cmd": 1} {"id": 7265, "parent": 6744, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "accent-buggy-buggy-fedora", "time": "2023-11-29 23:30:05.612113", "cmd": 1} {"id": 7286, "parent": 7095, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\n\npred puzzle {\n some x : Person | Agatha in x.killed\n all x, y : Person | \n y in x.killed implies (y in x.hates and y not in x.richer)\n all x : Person | \n x in Agatha.hates implies x not in Charles.hates\n Agatha in Agatha.hates and Charles in Agatha.hates\n all x : Person | \n Agatha not in x.richer implies x in Butler.hates\n all x : Person | \n x in Agatha.hates implies x in Butler.hates\n all x : Person | \n some y : Person | \n y not in x.hates\n}\n\nrun puzzle", "permalink": "hull-pawing-sultry-ducky", "time": "2023-11-30 20:42:37.138769", "cmd": 1} {"id": 7287, "parent": null, "code": "/**\n * Relational logic revision exercises based on a simple model of a \n * file system trash can.\n * \n * The model has 3 unary predicates (sets), File, Trash and\n * Protected, the latter two a sub-set of File. There is a binary \n * predicate, link, a sub-set of File x File.\n *\n * Solve the following exercises using Alloy's relational logic, which\n * extends first-order logic with:\n *\t- expression comparisons 'e1 in e2' and 'e1 = e2'\n *\t- expression multiplicity tests 'some e', 'lone e', 'no e' and 'one e'\n *\t- binary relational operators '.', '->', '&', '+', '-', ':>' and '<:' \n *\t- unary relational operators '~', '^' and '*'\n *\t- definition of relations by comprehension\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\n/* All files are deleted. */\npred inv2 {\n File in Trash\n}\n\n/* Some file is deleted. */\npred inv3 {\n some Trash \n}\n\n/* Protected files cannot be deleted. */\npred inv4 {\n\tProtected\n}\n\n/* All unprotected files are deleted.. */\npred inv5 {\n\n}\n\n/* A file links to at most one file. */\npred inv6 {\n\n}\n\n/* There is no deleted link. */\npred inv7 {\n\n}\n\n/* There are no links. */\npred inv8 {\n\n}\n\n/* A link does not link to another link. */\npred inv9 {\n\n}\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n\n}\n\nrun {}", "permalink": "gooey-sleek-poison-likely", "time": "2023-11-30 20:44:39.302769", "cmd": 1} {"id": 7288, "parent": 7287, "code": "/**\n * Relational logic revision exercises based on a simple model of a \n * file system trash can.\n * \n * The model has 3 unary predicates (sets), File, Trash and\n * Protected, the latter two a sub-set of File. There is a binary \n * predicate, link, a sub-set of File x File.\n *\n * Solve the following exercises using Alloy's relational logic, which\n * extends first-order logic with:\n *\t- expression comparisons 'e1 in e2' and 'e1 = e2'\n *\t- expression multiplicity tests 'some e', 'lone e', 'no e' and 'one e'\n *\t- binary relational operators '.', '->', '&', '+', '-', ':>' and '<:' \n *\t- unary relational operators '~', '^' and '*'\n *\t- definition of relations by comprehension\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\n/* All files are deleted. */\npred inv2 {\n File in Trash\n}\n\n/* Some file is deleted. */\npred inv3 {\n some Trash \n}\n\n/* Protected files cannot be deleted. */\npred inv4 {\n\tno (Protected & Trash)\n}\n\n/* All unprotected files are deleted.. */\npred inv5 {\n\n}\n\n/* A file links to at most one file. */\npred inv6 {\n\n}\n\n/* There is no deleted link. */\npred inv7 {\n\n}\n\n/* There are no links. */\npred inv8 {\n\n}\n\n/* A link does not link to another link. */\npred inv9 {\n\n}\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n\n}\n\nrun {inv4}", "permalink": "nacho-unbent-fossil-maroon", "time": "2023-11-30 20:45:15.353379", "cmd": 1} {"id": 7289, "parent": 7288, "code": "/**\n * Relational logic revision exercises based on a simple model of a \n * file system trash can.\n * \n * The model has 3 unary predicates (sets), File, Trash and\n * Protected, the latter two a sub-set of File. There is a binary \n * predicate, link, a sub-set of File x File.\n *\n * Solve the following exercises using Alloy's relational logic, which\n * extends first-order logic with:\n *\t- expression comparisons 'e1 in e2' and 'e1 = e2'\n *\t- expression multiplicity tests 'some e', 'lone e', 'no e' and 'one e'\n *\t- binary relational operators '.', '->', '&', '+', '-', ':>' and '<:' \n *\t- unary relational operators '~', '^' and '*'\n *\t- definition of relations by comprehension\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n File in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash \n}\n\n/* Protected files cannot be deleted. */\npred inv4 {\n\tno (Protected & Trash)\n}\n\n/* All unprotected files are deleted.. */\npred inv5 {\n\n}\n\n/* A file links to at most one file. */\npred inv6 {\n\n}\n\n/* There is no deleted link. */\npred inv7 {\n\n}\n\n/* There are no links. */\npred inv8 {\n\n}\n\n/* A link does not link to another link. */\npred inv9 {\n\n}\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n\n}\n", "permalink": "flip-reps-askew-lurch", "time": "2023-11-30 20:46:04.158398", "cmd": 2} {"id": 7290, "parent": 7289, "code": "/**\n * Relational logic revision exercises based on a simple model of a \n * file system trash can.\n * \n * The model has 3 unary predicates (sets), File, Trash and\n * Protected, the latter two a sub-set of File. There is a binary \n * predicate, link, a sub-set of File x File.\n *\n * Solve the following exercises using Alloy's relational logic, which\n * extends first-order logic with:\n *\t- expression comparisons 'e1 in e2' and 'e1 = e2'\n *\t- expression multiplicity tests 'some e', 'lone e', 'no e' and 'one e'\n *\t- binary relational operators '.', '->', '&', '+', '-', ':>' and '<:' \n *\t- unary relational operators '~', '^' and '*'\n *\t- definition of relations by comprehension\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n File in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n\tno (Protected & Trash)\n}\n\nrun inv4\n\n/* All unprotected files are deleted.. */\npred inv5 {\n File = Protected + Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f : File | lone f.link\n}\n\n/* There no linked file is deleted. */\npred inv7 {\n no link.Trash\n}\n\n/* There are no links. */\npred inv8 {\n no link\n}\n\n/* A link does not link to another link. */\npred inv9 {\n no link.link\n}\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n Trash.link in Trash\n}\n", "permalink": "triage-movie-secret-mural", "time": "2023-11-30 20:54:22.848448", "cmd": 2} {"id": 7291, "parent": 7290, "code": "/**\n * Relational logic revision exercises based on a simple model of a \n * file system trash can.\n * \n * The model has 3 unary predicates (sets), File, Trash and\n * Protected, the latter two a sub-set of File. There is a binary \n * predicate, link, a sub-set of File x File.\n *\n * Solve the following exercises using Alloy's relational logic, which\n * extends first-order logic with:\n *\t- expression comparisons 'e1 in e2' and 'e1 = e2'\n *\t- expression multiplicity tests 'some e', 'lone e', 'no e' and 'one e'\n *\t- binary relational operators '.', '->', '&', '+', '-', ':>' and '<:' \n *\t- unary relational operators '~', '^' and '*'\n *\t- definition of relations by comprehension\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n File in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n\tno (Protected & Trash)\n}\n\nrun inv4\n\n/* All unprotected files are deleted.. */\npred inv5 {\n File = Protected + Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f : File | lone f.link\n}\n\nrun inv6\n\n/* There no linked file is deleted. */\npred inv7 {\n no link.Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n Trash.link in Trash\n}\n\nrun inv10", "permalink": "dial-chafe-rover-antics", "time": "2023-11-30 20:55:02.875458", "cmd": 10} {"id": 7292, "parent": 7291, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n File in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n\tno (Protected & Trash)\n}\n\nrun inv4\n\n/* All unprotected files are deleted.. */\npred inv5 {\n File = Protected + Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f : File | lone f.link\n}\n\nrun inv6\n\n/* There no linked file is deleted. */\npred inv7 {\n no link.Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n Trash.link in Trash\n}\n\nrun inv10", "permalink": "compel-angler-bottom-macaw", "time": "2023-11-30 20:58:07.010414", "cmd": 1} {"id": 7293, "parent": 7292, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n File in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n\tno (Protected & Trash)\n}\n\nrun inv4\n\n/* All unprotected files are deleted.. */\npred inv5 {\n File = Protected + Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f : File | lone f.link\n}\n\nrun inv6\n\n/* There no linked file is deleted. */\npred inv7 {\n no link.Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n Trash.link in Trash\n}\n\nrun inv10", "permalink": "prepay-kelp-cold-robin", "time": "2023-11-30 20:58:26.651646", "cmd": 10} {"id": 7294, "parent": 7001, "code": "sig Guest {}\nsig Drunk in Guest {}\n\npred drinkers {\n some x : Guest |\n (x in Drunk implies \n all y : Guest | y in Drunk)\n}\n\nrun drinkers for 5", "permalink": "debtor-napped-grasp-rink", "time": "2023-11-30 21:16:50.146880", "cmd": 1} {"id": 7295, "parent": 7293, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n File in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n\tno (Protected & Trash)\n}\n\nrun inv4\n\n/* All unprotected files are deleted.. */\npred inv5 {\n File = Protected + Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f : File | lone f.link\n}\n\nrun inv6\n\n/* There no linked file is deleted. */\npred inv7 {\n no link.Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n Trash.link in Trash\n}\n\nrun inv10", "permalink": "java-paltry-mossy-judo", "time": "2023-11-30 21:24:53.990180", "cmd": 1} {"id": 7296, "parent": 7295, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted.. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* There no linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "sliced-thorn-slurp-case", "time": "2023-11-30 21:26:07.279925", "cmd": 1} {"id": 7297, "parent": 7296, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "thirty-fog-cackle-jacket", "time": "2023-11-30 22:12:59.253653", "cmd": 1} {"id": 7378, "parent": 7377, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\n\npred puzzle {\n some x : Person | Agatha in x.killed\n all x, y : Person | \n y in x.killed implies (y in x.hates and y not in x.richer)\n all x : Person | \n x in Agatha.hates implies x not in Charles.hates\n Agatha in Agatha.hates and Charles in Agatha.hates\n all x : Person | \n Agatha not in x.richer implies x in Butler.hates\n all x : Person | \n x in Agatha.hates implies x in Butler.hates\n all x : Person | \n some y : Person | \n y not in x.hates\n}\n\nfact agathaKiller{\n Agatha in Agatha.killed\n}\n\nrun puzzle", "permalink": "perky-gab-dart-blame", "time": "2023-12-01 09:42:26.188708", "cmd": 1} {"id": 7402, "parent": 7387, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\nrun {}", "permalink": "lurk-racoon-twerp-tidbit", "time": "2023-12-01 10:39:24.819461", "cmd": 1} {"id": 7409, "parent": 7399, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\nabstract sig Person {}\nsig buyer,seller extends Person{}\nsig Restaurent {\n selling : one seller,\n buying : one buyer\n}\nsig Coupons {\n associated_to : one Restaurent,\n associated_with : some buyer\n}\nrun {}", "permalink": "glider-deftly-earwig-retool", "time": "2023-12-01 10:40:30.506277", "cmd": 1} {"id": 7413, "parent": 7412, "code": "abstract sig Person {}\nsig Student, Professor extends Person {}\nsig Class {\ninstructor: one Professor, \n// assistant: one Student\n}\nsig Assignment { associated_with: set Class, assigned_to: some Student\n}\n\nrun{}", "permalink": "even-punk-humped-sash", "time": "2023-12-01 10:43:13.968915", "cmd": 1} {"id": 7414, "parent": 7413, "code": "abstract sig Person {}\nsig Student, Professor extends Person {}\nsig Class {\ninstructor: one Professor, \nassistant: one Student\n}\nsig Assignment { associated_with: set Class, assigned_to: some Student\n}\n\nrun{}", "permalink": "player-yogurt-kennel-busboy", "time": "2023-12-01 10:43:41.641914", "cmd": 1} {"id": 7418, "parent": 7416, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n one x: Person | Agatha in x.killed\n \n all x: Person | all y: Person | (y in x.killed) implies \n ((y in x.hates) and not (y in x.richer)) \n\n all x: Person | (x in Agatha.hates) implies not (x in Charles.hates)\n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates)\n\n all x: Person | not (Agatha in x.richer) implies (Butler in x.hates)\n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates)\n\n all x: Person | one y: Person | not (y in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "cache-citrus-numbly-choice", "time": "2023-12-01 10:46:18.685639", "cmd": 1} {"id": 7420, "parent": 7414, "code": " abstract sig Person {}\n sig Student, Professor extends Person {}\n sig Class {\n instructor: one Professor,\nassistant: set Student} sig Assignment {\n associated_with: set Class,\n assigned_to: some Student}\n fact {all a : Assignment | one a.associated_with}\n pred PolicyAllowsGrading(p: Person, a: Assignment) {\np in a.associated_with.assistant or p in a.associated_with.instructor}\nassert NoOneCanGradeTheirOwnAssignment {\n all p : Person, a : Assignment |\n PolicyAllowsGrading[p, a] implies not p in a.assigned_to}\ncheck NoOneCanGradeTheirOwnAssignment for 2", "permalink": "gargle-lint-crop-opt", "time": "2023-12-01 10:46:19.958950", "cmd": 1} {"id": 7432, "parent": 7429, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {all a : Assignment | one a.associated_with}\n\n//run{}// Predicate PolicyAllowsGrading defines the policy for allowing grading of an Assignment by a Person.\npred PolicyAllowsGrading(p: Person, a: Assignment) {\n p in a.associated_with.assistant or p in a.associated_with.instructor\n}\n\nrun{}", "permalink": "nervy-proofs-pellet-lily", "time": "2023-12-01 10:50:00.614069", "cmd": 1} {"id": 7435, "parent": 7434, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n one x: Person | Agatha in x.killed\n \n all x: Person | all y: Person | (y in x.killed) implies \n ((y in x.hates) and (y not in x.richer)) \n\n all x: Person | (x in Agatha.hates) implies (x not in Charles.hates)\n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates)\n\n all x: Person | not (Agatha in x.richer) implies (Butler in x.hates)\n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates)\n\n //all x: Person | one y: Person | (y not in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "rigid-agile-slurp-vacate", "time": "2023-12-01 10:51:09.956059", "cmd": 1} {"id": 7446, "parent": 7436, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n one x: Person | Agatha in x.killed\n \n all x: Person | all y: Person | (y in x.killed) implies \n ((y in x.hates) and (y not in x.richer)) \n\n all x: Person | (x in Agatha.hates) implies (x not in Charles.hates)\n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates)\n\n all x: Person | not (Agatha in x.richer) implies (Butler in x.hates)\n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates)\n\n //all x: Person | one y: Person | (y not in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "hermit-crispy-status-borax", "time": "2023-12-01 10:55:24.448362", "cmd": 1} {"id": 7460, "parent": 7459, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n one x: Person | Agatha in x.killed\n \n all x: Person | all y: Person | (y in x.killed) implies \n ((y in x.hates) and (y not in x.richer)) \n\n all x: Person | (x in Agatha.hates) implies (x not in Charles.hates)\n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates)\n\n all x: Person | not (Agatha in x.richer) implies (Butler in x.hates)\n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates)\n\n all x: Person | one y: Person | (y not in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "anyone-paced-unpaid-ferris", "time": "2023-12-01 11:00:04.207342", "cmd": 1} {"id": 7468, "parent": 7467, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n some x: Person | Agatha in x.killed\n \n all x: Person | all y: Person | (y in x.killed) implies \n ((y in x.hates) and (y not in x.richer)) \n\n all x: Person | (x in Agatha.hates) implies (x not in Charles.hates)\n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates)\n\n all x: Person | not (Agatha in x.richer) implies (Butler in x.hates)\n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates)\n\n all x: Person | some y: Person | (y not in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "skirt-agile-matted-encode", "time": "2023-12-01 11:04:13.582006", "cmd": 1} {"id": 7501, "parent": 7500, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // TODO Implement the constraints here\n // Formula 1\n some person: Person | Agatha in person.killed\n\n // Formula 2\n all x, y: Person | x.killed = y implies (x.hates = y and not x.richer = y)\n \n // Formula 3\n all x: Person | Agatha.hates = x implies not Charles.hates = x\n\n // Formula 4\n Agatha in Agatha.hates and Agatha in Charles.hates\n}\n\nrun puzzle", "permalink": "parish-chess-sudden-unroll", "time": "2023-12-01 16:00:13.321169", "cmd": 1} {"id": 7510, "parent": 7509, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\nabstract sig Person {}\nsig buyer,seller extends Person{}\nsig Restaurent {\n selling : one seller,\n buying : one buyer\n}\nsig Coupons {\n associated_to : one Restaurent,\n associated_with : some buyer\n}\npred couponaallowingforbuying(p.Person,c : Coupons){\n p in c.associated_with.buying or p in c.associated_with.selling\n}\nfact{ all c : Coupons | one c.associated_with }\nrun {}", "permalink": "celtic-briar-visa-shadow", "time": "2023-12-01 18:08:00.565483", "cmd": 1} {"id": 7514, "parent": 7513, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\nabstract sig Person {}\nsig buyer,seller extends Person{}\nsig Restaurent {\n selling : one seller,\n buying : one buyer\n}\nsig Coupons {\n associated_to : one Restaurent,\n associated_with : some buyer\n}\nfact { all c : Coupons | one c.associated_with }\npred couponallowingforbuying(p : Person,c : Coupons){\n p in c.associated_with.buying or p in c.associated_with.selling\n}\n\nassert NoOneCreatetheirowncoupon {\n all p : Person, c : Coupons |\n couponallowingforbuying[p, c] implies not p in c.assigned_to\n}\ncheck NoOneCreatetheirowncoupon ", "permalink": "suave-paltry-subtly-reply", "time": "2023-12-01 18:12:27.074557", "cmd": 1} {"id": 7515, "parent": 7514, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\nabstract sig Person {}\nsig buyer,seller extends Person{}\nsig Restaurent {\n selling : one seller,\n buying : one buyer\n}\nsig Coupons {\n associated_to : one Restaurent,\n associated_with : some buyer\n}\nfact { all c : Coupons | one c.associated_with }\npred PolicyAllowsGrading(p: Person, a: Coupons) {\n p in a.associated_with.assistant or p in a.associated_with.instructor\n}\n\n// Assert NoOneCanGradeTheirOwnAssignment checks that no Person can grade their own Assignment.\nassert NoOneCanGradeTheirOwnAssignment {\n all p : Person, a : Coupons |\n PolicyAllowsGrading[p, a] implies not p in a.assigned_to\n}\n\ncheck NoOneCanGradeTheirOwnAssignment for 2", "permalink": "spotty-scorer-karma-aware", "time": "2023-12-01 18:14:16.122102", "cmd": 1} {"id": 7518, "parent": 6978, "code": "one sig List {\n header: lone Node \n} \nsig Node {\n link: lone Node \n}\nfact noDanglingNodes {\n Node in List.header.*link\n}\n\nrun { some n : List.header.*link | no n.link } for 3", "permalink": "silo-radial-dizzy-author", "time": "2023-12-01 18:22:27.768793", "cmd": 1} {"id": 7522, "parent": 7521, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n some x: Person | Agatha in x.killed\n \n all x: Person | all y: Person | (y in x.killed) implies \n ((y in x.hates) and (y not in x.richer)) \n\n all x: Person | (x in Agatha.hates) implies (x not in Charles.hates)\n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates)\n\n all x: Person | not (Agatha in x.richer) implies (Butler in x.hates)\n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates)\n\n all x: Person | some y: Person | (y not in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "mushy-verse-bakery-stomp", "time": "2023-12-02 06:41:12.445489", "cmd": 1} {"id": 7531, "parent": 7530, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n some x: Person | Agatha in x.killed \n \n all x: Person and all y: Person | (y in x.killed) implies \n ((y in x.hates) and (not y in x.richer)) \n\n all x: Person | (x in Agatha.hates) implies (not x in Charles.hates) \n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates) \n\n all x: Person | (not Agatha in x.richer) implies (Butler in x.hates) \n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates) \n\n all x: Person | some y: Person | (not y in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "timid-tables-canine-uncork", "time": "2023-12-02 07:02:05.864608", "cmd": 1} {"id": 7533, "parent": 7532, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n some x: Person | Agatha in x.killed \n \n all x: Person all y: Person | (y in x.killed) implies \n ((y in x.hates) and (not y in x.richer)) \n\n all x: Person | (x in Agatha.hates) implies (not x in Charles.hates) \n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates) \n\n all x: Person | (not Agatha in x.richer) implies (Butler in x.hates) \n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates) \n\n all x: Person | some y: Person | (not y in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "snuff-debug-shaded-ebay", "time": "2023-12-02 07:02:23.350973", "cmd": 1} {"id": 7536, "parent": 7535, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n some x: Person | Agatha in x.killed \n \n all x: Person | all y: Person | \n (y in x.killed) implies \n (y in x.hates and not y in x.richer) \n\n all x: Person | (x in Agatha.hates) implies (not x in Charles.hates) \n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates) \n\n all x: Person | (not Agatha in x.richer) implies (Butler in x.hates) \n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates) \n\n all x: Person | some y: Person | (not y in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "sheet-bundle-kindle-food", "time": "2023-12-02 07:03:53.204805", "cmd": 1} {"id": 7537, "parent": 7536, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n some x: Person | Agatha in x.killed \n \n all x: Person | all y: Person | \n (y in x.killed) implies \n (y in x.hates and not y in x.richer) \n\n all x: Person | (x in Agatha.hates) implies (not x in Charles.hates) \n\n Agatha in Agatha.hates and Charles in Agatha.hates \n\n all x: Person | (not Agatha in x.richer) implies (Butler in x.hates) \n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates) \n\n all x: Person | some y: Person | (not y in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "erupt-runt-candy-legend", "time": "2023-12-02 07:04:08.220464", "cmd": 1} {"id": 7538, "parent": 7537, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n some x: Person | Agatha in x.killed \n \n all x: Person | all y: Person | \n (y in x.killed) implies \n (y in x.hates and not y in x.richer) \n\n all x: Person | (x in Agatha.hates) implies (not x in Charles.hates) \n\n Agatha in Agatha.hates and Charles in Agatha.hates \n\n all x: Person | (not Agatha in x.richer) implies (Butler in x.hates) \n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates) \n\n //all x: Person | some y: Person | (not y in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "zap-eclair-pouch-spotty", "time": "2023-12-02 07:04:13.776180", "cmd": 1} {"id": 7539, "parent": 7538, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n some x: Person | Agatha in x.killed \n \n all x: Person | all y: Person | \n (y in x.killed) implies \n (y in x.hates and not y in x.richer) \n\n all x: Person | (x in Agatha.hates) implies (not x in Charles.hates) \n\n Agatha in Agatha.hates and Charles in Agatha.hates \n\n all x: Person | (not Agatha in x.richer) implies (Butler in x.hates) \n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates) \n\n all x: Person | lone y: Person | (not y in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "coral-proved-sliced-catnap", "time": "2023-12-02 07:05:05.803528", "cmd": 1} {"id": 7542, "parent": 7541, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n one x: Person | Agatha in x.killed \n \n set x: Person | some y: Person | \n (y in x.killed) implies \n (y in x.hates and not y in x.richer) \n\n some x: Person | (x in Agatha.hates) implies (not x in Charles.hates) \n\n Agatha in Agatha.hates and Charles in Agatha.hates \n\n some x: Person | (not Agatha in x.richer) implies (Butler in x.hates) \n\n some x: Person | (x in Agatha.hates) implies (x in Butler.hates) \n\n some x: Person | one y: Person | (not y in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "yogurt-frenzy-linked-wildly", "time": "2023-12-02 07:07:31.251367", "cmd": 1} {"id": 7544, "parent": 7543, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n some x: Person | Agatha in x.killed \n \n all x: Person | all y: Person | \n (y in x.killed) implies \n (y in x.hates and not y in x.richer) \n\n all x: Person | (x in Agatha.hates) implies (not x in Charles.hates) \n\n Agatha in Agatha.hates and Charles in Agatha.hates \n\n all x: Person | (not Agatha in x.richer) implies (Butler in x.hates) \n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates) \n\n all x: Person | some y: Person | (not y in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "yogurt-entrap-stilt-buffer", "time": "2023-12-02 07:08:33.579555", "cmd": 1} {"id": 7552, "parent": 7551, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "stem-getup-mulled-aloe", "time": "2023-12-02 07:23:23.889551", "cmd": 1} {"id": 7555, "parent": 7554, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all t: Trash | all f: File | f in t\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n all f: \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "script-finch-foster-yen", "time": "2023-12-02 07:27:54.213866", "cmd": 2} {"id": 7559, "parent": 7558, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all Files in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n all f: \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "borax-sacred-getup-scarce", "time": "2023-12-02 07:30:44.566831", "cmd": 2} {"id": 7565, "parent": 7564, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n \n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n all f: \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "hug-sponge-kosher-upper", "time": "2023-12-02 07:33:40.785145", "cmd": 1} {"id": 7566, "parent": 7565, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "cherub-depose-gutter-batch", "time": "2023-12-02 07:33:52.642077", "cmd": 2} {"id": 7380, "parent": 7058, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\nrun {}", "permalink": "skewed-boxer-plural-pauper", "time": "2023-12-01 10:16:45.468970", "cmd": 1} {"id": 7381, "parent": 7297, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "oppose-smith-prance-avatar", "time": "2023-12-01 10:19:13.549645", "cmd": 1} {"id": 7385, "parent": 7383, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\n//sig Assignment {\n // associated_with: set Class, \n //assigned_to: some Student\n//}\n\nrun {}", "permalink": "flirt-tidal-rented-roman", "time": "2023-12-01 10:29:15.708691", "cmd": 1} {"id": 7393, "parent": 7389, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\nabstract sig Person {}\nsig buyer,seller extends Person{}\nsig Restaurent {\n selling : one seller,\n buying : one buyer\n}\nrun {}", "permalink": "stash-onward-clump-saggy", "time": "2023-12-01 10:34:23.005371", "cmd": 1} {"id": 7396, "parent": 7391, "code": "abstract sig Person {}\nsig Student, Professor extends Person {}\nsig Class {\ninstructor: one Professor, assistant: set Student\n}\nsig Assignment { associated_with: set Class, assigned_to: some Student\n}\n\nrun{}", "permalink": "usher-unsnap-seldom-helium", "time": "2023-12-01 10:35:20.011498", "cmd": 1} {"id": 7397, "parent": 7395, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n one x: Person | Agatha in x.killed\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "matron-kebab-anyone-steam", "time": "2023-12-01 10:36:20.222976", "cmd": 1} {"id": 7399, "parent": 7398, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\nabstract sig Person {}\nsig buyer,seller extends Person{}\nsig Restaurent {\n selling : one seller,\n buying : one buyer\n}\n\nrun {}", "permalink": "bogged-grill-tamale-marry", "time": "2023-12-01 10:38:11.457894", "cmd": 1} {"id": 7411, "parent": 7405, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n one x: Person | Agatha in x.killed\n \n all x: Person | all y: Person | (y in x.killed) implies \n ((y in x.hates) and not (y in x.richer)) \n\n all x: Person | x in Agatha.hates implies not x in Charles.hates\n\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "sneer-viewer-possum-crock", "time": "2023-12-01 10:41:25.789133", "cmd": 1} {"id": 7416, "parent": 7411, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n one x: Person | Agatha in x.killed\n \n all x: Person | all y: Person | (y in x.killed) implies \n ((y in x.hates) and not (y in x.richer)) \n\n all x: Person | x in Agatha.hates implies not x in Charles.hates\n\n Agatha in Agatha.hates and Charles in Agatha.hates\n\n all x: Person | not (Agatha in x.richer) implies Butler in x.hates\n\n all x: Person | x in Agatha.hates implies x in Butler.hates\n\n all x: Person | one y: Person | not (y in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "eaten-croon-excess-prissy", "time": "2023-12-01 10:45:33.803249", "cmd": 1} {"id": 7417, "parent": 6737, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {all a : Assignment | one a.associated_with}\n\n// Predicate PolicyAllowsGrading defines the policy for allowing grading of an Assignment by a Person.\npred PolicyAllowsGrading(p: Person, a: Assignment) {\n p in a.associated_with.assistant or p in a.associated_with.instructor\n}\n\n// Assert NoOneCanGradeTheirOwnAssignment checks that no Person can grade their own Assignment.\nassert NoOneCanGradeTheirOwnAssignment {\n all p : Person, a : Assignment |\n PolicyAllowsGrading[p, a] implies not p in a.assigned_to\n}\n\ncheck NoOneCanGradeTheirOwnAssignment for 2", "permalink": "sliced-barman-dandy-lake", "time": "2023-12-01 10:45:56.067319", "cmd": 1} {"id": 7419, "parent": 7058, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\nabstract sig Building {}\n\nsig Factory, Housing, Office extends Building {}\n\nabstract sig Day {\n previousDay: one Day\n nextDay: one Day\n}\nsig Monday, \n Tuesday, \n Wednesday,\n Thurstday,\n Friday,\n Saturday,\n Sunday \n extends Day {\n}\n\n\nrun {}", "permalink": "corny-frenzy-unreal-raven", "time": "2023-12-01 10:46:19.913749", "cmd": 1} {"id": 7429, "parent": 7425, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\n//fact {all a : Assignment | one a.associated_with}\n\nrun{}", "permalink": "eraser-lagoon-action-legged", "time": "2023-12-01 10:48:56.453108", "cmd": 1} {"id": 7433, "parent": 7419, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\nabstract sig Building {}\n\nsig Factory, Housing, Office extends Building {}\n\nabstract sig Day {\n previousDay: one Day\n nextDay: one Day\n}\n\nsig Monday, Tuesday, Wednesday, Thurstday, Friday, Saturday, Sunday extends Day {\n\n}\n\n\nrun {}", "permalink": "tamer-idiocy-celtic-pelvis", "time": "2023-12-01 10:50:49.246848", "cmd": 1} {"id": 7434, "parent": 7431, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n one x: Person | Agatha in x.killed\n \n all x: Person | all y: Person | (y in x.killed) implies \n ((y in x.hates) and (y not in x.richer)) \n\n all x: Person | (x in Agatha.hates) implies (x not in Charles.hates)\n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates)\n\n all x: Person | not (Agatha in x.richer) implies (Butler in x.hates)\n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates)\n\n all x: Person | one y: Person | (y not in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "settle-pretty-repent-deport", "time": "2023-12-01 10:51:05.518655", "cmd": 1} {"id": 7436, "parent": 7435, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n one x: Person | Agatha in x.killed\n \n all x: Person | all y: Person | (y in x.killed) implies \n ((y in x.hates) and (y not in x.richer)) \n\n all x: Person | (x in Agatha.hates) implies (x not in Charles.hates)\n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates)\n\n all x: Person | not (Agatha in x.richer) implies (Butler in x.hates)\n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates)\n\n all x: Person | one y: Person | (y not in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "feed-evolve-bounce-shield", "time": "2023-12-01 10:51:31.523813", "cmd": 1} {"id": 7437, "parent": 7433, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\nabstract sig Building {}\n\nsig Factory, Housing, Office extends Building {}\n\nabstract sig Day {}\n\nsig Monday, Tuesday, Wednesday, Thurstday, Friday, Saturday, Sunday extends Day {\n\n}\n\n\nrun {}", "permalink": "puppy-that-follow-canary", "time": "2023-12-01 10:52:27.324478", "cmd": 1} {"id": 7444, "parent": 7443, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\n//abstract sig Building {}\n\n// sig Factory, Housing, Office extends Building {}\n\nabstract sig Day {}\n\nsig Monday, Tuesday, Wednesday, Thurstday, Friday, Saturday, Sunday extends Day {\n previousDay: one Day,\n nextDay: one Day\n}\n\n\nrun {}", "permalink": "shale-dental-aside-wake", "time": "2023-12-01 10:54:29.505525", "cmd": 1} {"id": 7448, "parent": 7446, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n some x: Person | Agatha in x.killed\n \n all x: Person | all y: Person | (y in x.killed) implies \n ((y in x.hates) and (y not in x.richer)) \n\n all x: Person | (x in Agatha.hates) implies (x not in Charles.hates)\n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates)\n\n all x: Person | not (Agatha in x.richer) implies (Butler in x.hates)\n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates)\n\n all x: Person | some y: Person | (y not in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "unbent-barrel-pry-pesky", "time": "2023-12-01 10:56:15.783549", "cmd": 1} {"id": 7451, "parent": 7445, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\n//abstract sig Building {}\n\n// sig Factory, Housing, Office extends Building {}\n\nsig Worker {\n\n}\n\nsig WorkingTime {\n assignedTo : one Worker\n workingDays : set Day\n}\n\nabstract sig Day {\n previousDay: one Day,\n nextDay: one Day\n}\n\nsig Monday, Tuesday, Wednesday, Thurstday, Friday, Saturday, Sunday extends Day {\n\n}\n\n\nrun {}", "permalink": "these-askew-backed-retry", "time": "2023-12-01 10:58:17.209565", "cmd": 1} {"id": 7452, "parent": 7448, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n some x: Person | Agatha in x.killed\n \n set x: Person | set y: Person | (y in x.killed) implies \n ((y in x.hates) and (y not in x.richer)) \n\n set x: Person | (x in Agatha.hates) implies (x not in Charles.hates)\n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates)\n\n set x: Person | not (Agatha in x.richer) implies (Butler in x.hates)\n\n set x: Person | (x in Agatha.hates) implies (x in Butler.hates)\n\n set x: Person | some y: Person | (y not in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "gear-truth-rack-smirk", "time": "2023-12-01 10:58:19.538968", "cmd": 1} {"id": 7453, "parent": 7451, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\n//abstract sig Building {}\n\n// sig Factory, Housing, Office extends Building {}\n\nsig Worker {\n\n}\n\nsig WorkingTime {\n assignedTo : one Worker,\n workingDays : set Day\n}\n\nabstract sig Day {\n previousDay: one Day,\n nextDay: one Day\n}\n\nsig Monday, Tuesday, Wednesday, Thurstday, Friday, Saturday, Sunday extends Day {\n\n}\n\n\nrun {}", "permalink": "family-unused-sedan-acid", "time": "2023-12-01 10:58:20.901384", "cmd": 1} {"id": 7457, "parent": 7452, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n one x: Person | Agatha in x.killed\n \n all x: Person | set y: Person | (y in x.killed) implies \n ((y in x.hates) and (y not in x.richer)) \n\n all x: Person | (x in Agatha.hates) implies (x not in Charles.hates)\n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates)\n\n all x: Person | not (Agatha in x.richer) implies (Butler in x.hates)\n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates)\n\n all x: Person | one y: Person | (y not in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "gaffe-crazy-deduce-crane", "time": "2023-12-01 10:59:21.580514", "cmd": 1} {"id": 7458, "parent": 7457, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n one x: Person | Agatha in x.killed\n \n all x: Person | set y: Person | (y in x.killed) implies \n ((y in x.hates) and (y not in x.richer)) \n\n all x: Person | (x in Agatha.hates) implies (x not in Charles.hates)\n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates)\n\n all x: Person | not (Agatha in x.richer) implies (Butler in x.hates)\n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates)\n\n //all x: Person | one y: Person | (y not in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "silica-frill-dish-wow", "time": "2023-12-01 10:59:32.010235", "cmd": 1} {"id": 7459, "parent": 7458, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n one x: Person | Agatha in x.killed\n \n all x: Person | all y: Person | (y in x.killed) implies \n ((y in x.hates) and (y not in x.richer)) \n\n all x: Person | (x in Agatha.hates) implies (x not in Charles.hates)\n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates)\n\n all x: Person | not (Agatha in x.richer) implies (Butler in x.hates)\n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates)\n\n //all x: Person | one y: Person | (y not in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "undead-rascal-mousy-send", "time": "2023-12-01 10:59:48.022719", "cmd": 1} {"id": 7462, "parent": 7461, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n some x: Person | Agatha in x.killed\n \n all x: Person | all y: Person | (y in x.killed) implies \n ((y in x.hates) and (y not in x.richer)) \n\n all x: Person | (x in Agatha.hates) implies (x not in Charles.hates)\n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates)\n\n all x: Person | not (Agatha in x.richer) implies (Butler in x.hates)\n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates)\n\n all x: Person | lone y: Person | (y not in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "almost-curvy-robin-sugar", "time": "2023-12-01 11:01:44.839183", "cmd": 1} {"id": 7463, "parent": 7462, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n some x: Person | Agatha in x.killed\n \n all x: Person | all y: Person | (y in x.killed) implies \n ((y in x.hates) and (y not in x.richer)) \n\n all x: Person | (x in Agatha.hates) implies (x not in Charles.hates)\n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates)\n\n all x: Person | not (Agatha in x.richer) implies (Butler in x.hates)\n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates)\n\n all x: Person | some y: Person | (y not in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "tag-cider-frozen-skied", "time": "2023-12-01 11:01:49.211634", "cmd": 1} {"id": 7498, "parent": 7471, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // TODO Implement the constraints here\n // Formula 1\n some person: Person | Agatha in person.killed\n\n // Formula 2\n all x, y: Person | x.killed = y implies (x.hates = y and not x.richer = y)\n \n}\n\nrun puzzle", "permalink": "emote-turtle-salami-state", "time": "2023-12-01 15:53:50.923093", "cmd": 1} {"id": 7499, "parent": 7498, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // TODO Implement the constraints here\n // Formula 1\n some person: Person | Agatha in person.killed\n\n // Formula 2\n all x, y: Person | x.killed = y implies (x.hates = y and not x.richer = y)\n \n // Formula 3\n all x: Person | Agatha.hates = x implies not Charles.hates = x\n}\n\nrun puzzle", "permalink": "junior-silly-mantra-dry", "time": "2023-12-01 15:56:48.964006", "cmd": 1} {"id": 7503, "parent": 7502, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // TODO Implement the constraints here\n // Formula 1\n some person: Person | Agatha in person.killed\n\n // Formula 2\n all x, y: Person | x.killed = y implies (x.hates = y and not x.richer = y)\n \n // Formula 3\n all x: Person | Agatha.hates = x implies not Charles.hates = x\n\n // Formula 4\n Agatha in Agatha.hates and Agatha in Charles.hates\n\n // Formula 5\n all x: Person | not x.richer = Agatha implies Butler.hates = x\n\n // Formula 6\n all x: Person | not Agatha.hates = x implies Butler.hates = x\n}\n\nrun puzzle", "permalink": "unmade-caddy-jot-manger", "time": "2023-12-01 16:04:46.723106", "cmd": 1} {"id": 7377, "parent": 7095, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\n\npred puzzle {\n some x : Person | Agatha in x.killed\n all x, y : Person | \n y in x.killed implies (y in x.hates and y not in x.richer)\n all x : Person | \n x in Agatha.hates implies x not in Charles.hates\n Agatha in Agatha.hates and Charles in Agatha.hates\n all x : Person | \n Agatha not in x.richer implies x in Butler.hates\n all x : Person | \n x in Agatha.hates implies x in Butler.hates\n all x : Person | \n some y : Person | \n y not in x.hates\n}\n\nrun puzzle", "permalink": "bubble-skewed-twins-yield", "time": "2023-12-01 09:41:18.640365", "cmd": 1} {"id": 7379, "parent": 7378, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\n\npred puzzle {\n some x : Person | Agatha in x.killed\n all x, y : Person | \n y in x.killed implies (y in x.hates and y not in x.richer)\n all x : Person | \n x in Agatha.hates implies x not in Charles.hates\n Agatha in Agatha.hates and Charles in Agatha.hates\n all x : Person | \n Agatha not in x.richer implies x in Butler.hates\n all x : Person | \n x in Agatha.hates implies x in Butler.hates\n all x : Person | \n some y : Person | \n y not in x.hates\n}\n\nfact agathaKiller{\n Agatha not in Agatha.killed\n}\n\nrun puzzle", "permalink": "dares-legume-afraid-woven", "time": "2023-12-01 09:42:35.544505", "cmd": 1} {"id": 7383, "parent": 6739, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\nrun {}", "permalink": "rumor-facing-bless-chip", "time": "2023-12-01 10:25:29.876422", "cmd": 1} {"id": 7384, "parent": 7058, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\nrun {}", "permalink": "moving-marrow-suffix-aloha", "time": "2023-12-01 10:28:18.670961", "cmd": 1} {"id": 7387, "parent": 7386, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\n//sig Assignment {\n // associated_with: set Class, \n //assigned_to: some Student\n//}\n\nrun {}", "permalink": "flying-deduct-bunny-boozy", "time": "2023-12-01 10:31:00.847582", "cmd": 1} {"id": 7389, "parent": 7382, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\nabstract sig Person {}\nsig buyer,seller extends Person{}\nrun {}", "permalink": "wow-agenda-kabob-ice", "time": "2023-12-01 10:32:41.657501", "cmd": 1} {"id": 7390, "parent": 7069, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n one x person: x.Agatha.killed\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "gotten-pagan-shone-tablet", "time": "2023-12-01 10:33:00.531119", "cmd": 1} {"id": 7391, "parent": 7388, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {all a : Assignment | one a.associated_with}\n\n// Predicate PolicyAllowsGrading defines the policy for allowing grading of an Assignment by a Person.\npred PolicyAllowsGrading(p: Person, a: Assignment) {\n p in a.associated_with.assistant or p in a.associated_with.instructor\n}\n\n// Assert NoOneCanGradeTheirOwnAssignment checks that no Person can grade their own Assignment.\nassert NoOneCanGradeTheirOwnAssignment {\n all p : Person, a : Assignment |\n PolicyAllowsGrading[p, a] \n // implies not p in a.assigned_to\n}\n\ncheck NoOneCanGradeTheirOwnAssignment for 2", "permalink": "bright-flap-strobe-paper", "time": "2023-12-01 10:33:30.704477", "cmd": 1} {"id": 7415, "parent": 6737, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {all a : Assignment | one a.associated_with}\n\n// Predicate PolicyAllowsGrading defines the policy for allowing grading of an Assignment by a Person.\npred PolicyAllowsGrading(p: Person, a: Assignment) {\n p in a.associated_with.assistant or p in a.associated_with.instructor\n}\n\n// Assert NoOneCanGradeTheirOwnAssignment checks that no Person can grade their own Assignment.\nassert NoOneCanGradeTheirOwnAssignment {\n all p : Person, a : Assignment |\n PolicyAllowsGrading[p, a] implies not p in a.assigned_to\n}\n\ncheck NoOneCanGradeTheirOwnAssignment for 2", "permalink": "phony-user-murky-grunge", "time": "2023-12-01 10:44:06.855128", "cmd": 1} {"id": 7421, "parent": 7418, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n one x: Person | Agatha in x.killed\n \n all x: Person | all y: Person | (y in x.killed) implies \n ((y in x.hates) and not (y in x.richer)) \n\n all x: Person | (x in Agatha.hates) implies not (x in Charles.hates)\n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates)\n\n all x: Person | not (Agatha in x.richer) implies (Butler in x.hates)\n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates)\n\n //all x: Person | one y: Person | not (y in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "giggly-dime-squeak-ankle", "time": "2023-12-01 10:46:58.644751", "cmd": 1} {"id": 7422, "parent": 7421, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n one x: Person | Agatha in x.killed\n \n all x: Person | all y: Person | (y in x.killed) implies \n ((y in x.hates) and not (y in x.richer)) \n\n all x: Person | (x in Agatha.hates) implies not (x in Charles.hates)\n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates)\n\n all x: Person | not (Agatha in x.richer) implies (Butler in x.hates)\n\n //all x: Person | (x in Agatha.hates) implies (x in Butler.hates)\n\n all x: Person | one y: Person | not (y in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "cycle-delay-waving-factor", "time": "2023-12-01 10:47:10.728534", "cmd": 1} {"id": 7423, "parent": 7422, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n one x: Person | Agatha in x.killed\n \n all x: Person | all y: Person | (y in x.killed) implies \n ((y in x.hates) and not (y in x.richer)) \n\n all x: Person | (x in Agatha.hates) implies not (x in Charles.hates)\n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates)\n\n all x: Person | not (Agatha in x.richer) implies (Butler in x.hates)\n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates)\n\n all x: Person | one y: Person | not (y in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "salsa-entity-stew-tiger", "time": "2023-12-01 10:47:23.972136", "cmd": 1} {"id": 7424, "parent": 7423, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n one x: Person | Agatha in x.killed\n \n all x: Person | all y: Person | (y in x.killed) implies \n ((y in x.hates) and not (y in x.richer)) \n\n all x: Person | (x in Agatha.hates) implies not (x in Charles.hates)\n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates)\n\n all x: Person | not (Agatha in x.richer) implies (Butler in x.hates)\n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates)\n\n //all x: Person | one y: Person | not (y in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "reps-turf-trace-blog", "time": "2023-12-01 10:47:27.185683", "cmd": 1} {"id": 7431, "parent": 7430, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n one x: Person | Agatha in x.killed\n \n all x: Person | all y: Person | (y in x.killed) implies \n ((y in x.hates) and not (y in x.richer)) \n\n all x: Person | (x in Agatha.hates) implies not (x in Charles.hates)\n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates)\n\n all x: Person | not (Agatha in x.richer) implies (Butler in x.hates)\n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates)\n\n all x: Person | one y: Person | not (y in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "eagle-eclair-elite-entrap", "time": "2023-12-01 10:49:15.200695", "cmd": 1} {"id": 7440, "parent": 7437, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\n//abstract sig Building {}\n\n// sig Factory, Housing, Office extends Building {}\n\nabstract sig Day {}\n\nsig Monday, Tuesday, Wednesday, Thurstday, Friday, Saturday, Sunday extends Day {\n\n}\n\n\nrun {}", "permalink": "starch-raving-waltz-viral", "time": "2023-12-01 10:52:54.140234", "cmd": 1} {"id": 7443, "parent": 7440, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\n//abstract sig Building {}\n\n// sig Factory, Housing, Office extends Building {}\n\nabstract sig Day {}\n\nsig Monday, Tuesday, Wednesday, Thurstday, Friday, Saturday, Sunday extends Day {\n previousDay: one Day\n nextDay: one Day\n}\n\n\nrun {}", "permalink": "baggie-penny-twitch-raft", "time": "2023-12-01 10:54:19.679964", "cmd": 1} {"id": 7445, "parent": 7444, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\n//abstract sig Building {}\n\n// sig Factory, Housing, Office extends Building {}\n\nabstract sig Day {\n previousDay: one Day,\n nextDay: one Day\n}\n\nsig Monday, Tuesday, Wednesday, Thurstday, Friday, Saturday, Sunday extends Day {\n\n}\n\n\nrun {}", "permalink": "amid-grant-blob-anyone", "time": "2023-12-01 10:54:40.974308", "cmd": 1} {"id": 7461, "parent": 7460, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n lone x: Person | Agatha in x.killed\n \n all x: Person | all y: Person | (y in x.killed) implies \n ((y in x.hates) and (y not in x.richer)) \n\n all x: Person | (x in Agatha.hates) implies (x not in Charles.hates)\n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates)\n\n all x: Person | not (Agatha in x.richer) implies (Butler in x.hates)\n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates)\n\n all x: Person | lone y: Person | (y not in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "senate-thee-parlor-ditch", "time": "2023-12-01 11:00:24.190360", "cmd": 1} {"id": 7464, "parent": 7463, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n some x: Person | Agatha in x.killed\n \n all x: Person | all y: Person | (y in x.killed) implies \n ((y in x.hates) and (y not in x.richer)) \n\n all x: Person | (x in Agatha.hates) implies (x not in Charles.hates)\n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates)\n\n all x: Person | not (Agatha in x.richer) implies (Butler in x.hates)\n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates)\n\n //all x: Person | some y: Person | (y not in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "yen-canal-poison-compel", "time": "2023-12-01 11:01:55.382212", "cmd": 1} {"id": 7465, "parent": 7464, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n some x: Person | Agatha in x.killed\n \n set x: Person | set y: Person | (y in x.killed) implies \n ((y in x.hates) and (y not in x.richer)) \n\n set x: Person | (x in Agatha.hates) implies (x not in Charles.hates)\n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates)\n\n set x: Person | not (Agatha in x.richer) implies (Butler in x.hates)\n\n set x: Person | (x in Agatha.hates) implies (x in Butler.hates)\n\n set x: Person | some y: Person | (y not in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "preset-wizard-skirt-hedge", "time": "2023-12-01 11:02:20.189258", "cmd": 1} {"id": 7466, "parent": 7465, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n some x: Person | Agatha in x.killed\n \n all x: Person | all y: Person | (y in x.killed) implies \n ((y in x.hates) and (y not in x.richer)) \n\n all x: Person | (x in Agatha.hates) implies (x not in Charles.hates)\n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates)\n\n all x: Person | not (Agatha in x.richer) implies (Butler in x.hates)\n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates)\n\n all x: Person | some y: Person | (y not in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "why-small-cussed-doily", "time": "2023-12-01 11:02:44.809638", "cmd": 1} {"id": 7467, "parent": 7466, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n //some x: Person | Agatha in x.killed\n \n all x: Person | all y: Person | (y in x.killed) implies \n ((y in x.hates) and (y not in x.richer)) \n\n all x: Person | (x in Agatha.hates) implies (x not in Charles.hates)\n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates)\n\n all x: Person | not (Agatha in x.richer) implies (Butler in x.hates)\n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates)\n\n all x: Person | some y: Person | (y not in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "cure-iguana-pauper-dimmed", "time": "2023-12-01 11:02:49.766062", "cmd": 1} {"id": 7469, "parent": 7069, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // TODO Implement the constraints here\n some x: Person | x.killed Agatha\n}\n\nrun puzzle", "permalink": "pelt-twine-thing-aorta", "time": "2023-12-01 12:44:02.772236", "cmd": 1} {"id": 7471, "parent": 7470, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // TODO Implement the constraints here\n // Formula 1\n some person: Person | Agatha in person.killed\n \n}\n\nrun puzzle", "permalink": "tint-scale-muster-gerbil", "time": "2023-12-01 12:51:50.794534", "cmd": 1} {"id": 7500, "parent": 7499, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // TODO Implement the constraints here\n // Formula 1\n some person: Person | Agatha in person.killed\n\n // Formula 2\n all x, y: Person | x.killed = y implies (x.hates = y and not x.richer = y)\n \n // Formula 3\n all x: Person | Agatha.hates = x implies not Charles.hates = x\n\n // Formula 4\n Agatha.hates = Agatha and Agatha.hates = Charles\n}\n\nrun puzzle", "permalink": "squad-jailer-giant-jury", "time": "2023-12-01 15:58:30.913584", "cmd": 1} {"id": 7507, "parent": 7506, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\nabstract sig Person {}\nsig buyer,seller extends Person{}\nsig Restaurent {\n selling : one seller,\n buying : one buyer\n}\nsig Coupons {\n associated_to : one Restaurent,\n associated_with : some buyer\n}\nfact{ all c : Coupons | one c.associated_with }\nrun {}", "permalink": "clone-game-clock-thread", "time": "2023-12-01 18:02:51.195439", "cmd": 1} {"id": 7511, "parent": 7510, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\nabstract sig Person {}\nsig buyer,seller extends Person{}\nsig Restaurent {\n selling : one seller,\n buying : one buyer\n}\nsig Coupons {\n associated_to : one Restaurent,\n associated_with : some buyer\n}\npred couponallowingforbuying(p.Person,c : Coupons){\n p in c.associated_with.buying or p in c.associated_with.selling\n}\nfact{ all c : Coupons | one c.associated_with }\nassert NoOneCreatetheirowncoupon {\n all p : Person, c : Coupons |\n couponallowingforbuying[p, c] implies not p in c.assigned_to\n}\ncheck NoOneCreatetheirowncoupon for 2", "permalink": "maggot-runner-wafer-uproot", "time": "2023-12-01 18:10:23.830166", "cmd": 1} {"id": 7528, "parent": 7527, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n some x: Person | Agatha in x.killed\n \n all x: Person | all y: Person | (y in x.killed) implies \n ((y in x.hates) and (not y in x.richer)) \n\n all x: Person | (x in Agatha.hates) implies (not x in Charles.hates)\n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates)\n\n all x: Person | (not Agatha in x.richer) implies (Butler in x.hates)\n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates)\n\n all x: Person | some y: Person | (not y in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "cling-brute-popper-clever", "time": "2023-12-02 06:55:04.848475", "cmd": 1} {"id": 7529, "parent": 7528, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n some x: Person | Agatha in x.killed |\n \n all x: Person | all y: Person | (y in x.killed) implies \n ((y in x.hates) and (not y in x.richer)) |\n\n all x: Person | (x in Agatha.hates) implies (not x in Charles.hates) |\n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates) |\n\n all x: Person | (not Agatha in x.richer) implies (Butler in x.hates) |\n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates) |\n\n all x: Person | some y: Person | (not y in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "errand-plant-mold-rigid", "time": "2023-12-02 06:56:06.049714", "cmd": 1} {"id": 7532, "parent": 7531, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n some x: Person | Agatha in x.killed \n \n all x: Person , all y: Person | (y in x.killed) implies \n ((y in x.hates) and (not y in x.richer)) \n\n all x: Person | (x in Agatha.hates) implies (not x in Charles.hates) \n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates) \n\n all x: Person | (not Agatha in x.richer) implies (Butler in x.hates) \n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates) \n\n all x: Person | some y: Person | (not y in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "relic-triage-reflex-sister", "time": "2023-12-02 07:02:15.635617", "cmd": 1} {"id": 7545, "parent": 7544, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n some x: Person | Agatha in x.killed \n \n all x,y: Person | \n (y in x.killed) implies \n (y in x.hates and not y in x.richer) \n\n all x: Person | (x in Agatha.hates) implies (not x in Charles.hates) \n\n Agatha in Agatha.hates and Charles in Agatha.hates \n\n all x: Person | (not Agatha in x.richer) implies (Butler in x.hates) \n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates) \n\n all x: Person | some y: Person | (not y in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "casing-clone-snugly-mauve", "time": "2023-12-02 07:09:35.460053", "cmd": 1} {"id": 7547, "parent": 7546, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n some x: Person | Agatha in x.killed \n \n all x,y: Person | \n (y in x.killed) implies \n (y in x.hates and not y in x.richer) \n\n all x: Person | (x in Agatha.hates) implies (not x in Charles.hates) \n\n Agatha in Agatha.hates and Charles in Agatha.hates \n\n all x: Person | (not Agatha in x.richer) implies (Butler in x.hates) \n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates) \n\n all x: Person | some y: Person | (not y in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "aorta-retail-easing-yummy", "time": "2023-12-02 07:11:05.448524", "cmd": 1} {"id": 7550, "parent": 7297, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash.link or some f : Trash | no f.link\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "idiocy-utter-whiff-tumble", "time": "2023-12-02 07:22:08.384179", "cmd": 1} {"id": 7554, "parent": 7553, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | f in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n all f: \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "sudden-happy-singer-bulb", "time": "2023-12-02 07:25:50.552681", "cmd": 2} {"id": 7556, "parent": 7555, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all t: Trash | all f: File | t.link\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n all f: \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "twice-pummel-dork-keg", "time": "2023-12-02 07:28:43.361857", "cmd": 2} {"id": 7382, "parent": 7058, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\nrun {}", "permalink": "edge-dove-regime-pelt", "time": "2023-12-01 10:23:40.501166", "cmd": 1} {"id": 7386, "parent": 7385, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n //instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\n//sig Assignment {\n // associated_with: set Class, \n //assigned_to: some Student\n//}\n\nrun {}", "permalink": "friend-gusto-lip-quiet", "time": "2023-12-01 10:30:39.238669", "cmd": 1} {"id": 7388, "parent": 6737, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {all a : Assignment | one a.associated_with}\n\n// Predicate PolicyAllowsGrading defines the policy for allowing grading of an Assignment by a Person.\npred PolicyAllowsGrading(p: Person, a: Assignment) {\n p in a.associated_with.assistant or p in a.associated_with.instructor\n}\n\n// Assert NoOneCanGradeTheirOwnAssignment checks that no Person can grade their own Assignment.\nassert NoOneCanGradeTheirOwnAssignment {\n all p : Person, a : Assignment |\n PolicyAllowsGrading[p, a] implies not p in a.assigned_to\n}\n\ncheck NoOneCanGradeTheirOwnAssignment for 2", "permalink": "showy-ranch-smite-unwell", "time": "2023-12-01 10:31:07.031861", "cmd": 1} {"id": 7392, "parent": 6739, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\nrun {}", "permalink": "suave-fabric-abide-nanny", "time": "2023-12-01 10:33:58.583076", "cmd": 1} {"id": 7394, "parent": 7390, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n one x: person | x.Agatha.killed\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "gray-thinly-mossy-owl", "time": "2023-12-01 10:34:53.445404", "cmd": 1} {"id": 7395, "parent": 7394, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n one x: Person | x.Agatha.killed\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "icky-banker-prize-boots", "time": "2023-12-01 10:35:02.821434", "cmd": 1} {"id": 7398, "parent": 7393, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\nabstract sig Person {}\nsig buyer,seller extends Person{}\nsig Restaurent {\n selling : one seller,\n buying : one buyer\n}\n\nrun {}", "permalink": "unlit-grasp-update-vacate", "time": "2023-12-01 10:36:29.992322", "cmd": 1} {"id": 7404, "parent": 7397, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n one x: Person | Agatha in x.killed\n all x: Person | all y: Person | (y in x.killed) implies \n ((y in x.hates) and not y in x.richer) \n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "yeast-carrot-aware-septic", "time": "2023-12-01 10:39:41.955971", "cmd": 1} {"id": 7405, "parent": 7404, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n one x: Person | Agatha in x.killed\n all x: Person | all y: Person | (y in x.killed) implies \n ((y in x.hates) and not (y in x.richer)) \n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "cash-bleep-coerce-stump", "time": "2023-12-01 10:39:50.381560", "cmd": 1} {"id": 7406, "parent": 7069, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // TODO Implement the constraints here\n Agatha in killed\n}\n\nrun puzzle", "permalink": "husked-raffle-bonnet-rice", "time": "2023-12-01 10:40:08.973983", "cmd": 1} {"id": 7412, "parent": 7396, "code": "abstract sig Person {}\nsig Student, Professor extends Person {}\nsig Class {\ninstructor: one Professor, assistant: one Student\n}\nsig Assignment { associated_with: set Class, assigned_to: some Student\n}\n\nrun{}", "permalink": "caddy-lived-staff-sultry", "time": "2023-12-01 10:42:36.635124", "cmd": 1} {"id": 7425, "parent": 7417, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {all a : Assignment | one a.associated_with}\n\nrun{}", "permalink": "decree-ferry-snack-circle", "time": "2023-12-01 10:48:01.620514", "cmd": 1} {"id": 7426, "parent": 7424, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n lone x: Person | Agatha in x.killed\n \n all x: Person | all y: Person | (y in x.killed) implies \n ((y in x.hates) and not (y in x.richer)) \n\n all x: Person | (x in Agatha.hates) implies not (x in Charles.hates)\n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates)\n\n all x: Person | not (Agatha in x.richer) implies (Butler in x.hates)\n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates)\n\n all x: Person | lone y: Person | not (y in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "badge-spring-tulip-drench", "time": "2023-12-01 10:48:32.500263", "cmd": 1} {"id": 7428, "parent": 7426, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n one x: Person | Agatha in x.killed\n \n all x: Person | all y: Person | (y in x.killed) implies \n ((y in x.hates) and not (y in x.richer)) \n\n all x: Person | (x in Agatha.hates) implies not (x in Charles.hates)\n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates)\n\n all x: Person | not (Agatha in x.richer) implies (Butler in x.hates)\n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates)\n\n all x: Person | lone y: Person | not (y in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "chest-animal-apache-sauna", "time": "2023-12-01 10:48:50.108229", "cmd": 1} {"id": 7430, "parent": 7428, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n one x: Person | Agatha in x.killed\n \n all x: Person | all y: Person | (y in x.killed) implies \n ((y in x.hates) and not (y in x.richer)) \n\n all x: Person | (x in Agatha.hates) implies not (x in Charles.hates)\n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates)\n\n all x: Person | not (Agatha in x.richer) implies (Butler in x.hates)\n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates)\n\n //all x: Person | one y: Person | not (y in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "barbed-grout-talon-ragged", "time": "2023-12-01 10:48:58.554937", "cmd": 1} {"id": 7438, "parent": 7406, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // TODO Implement the constraints here\n // Formula 1\n Agatha in killed\n}\n\nrun puzzle", "permalink": "crumb-encore-depose-amaze", "time": "2023-12-01 10:52:33.759602", "cmd": 1} {"id": 7447, "parent": 6744, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "could-dilute-corny-denim", "time": "2023-12-01 10:55:27.377403", "cmd": 1} {"id": 7470, "parent": 7469, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // TODO Implement the constraints here\n some person: Person | Agatha in person.killed\n}\n\nrun puzzle", "permalink": "autism-cradle-hazily-groin", "time": "2023-12-01 12:48:45.673395", "cmd": 1} {"id": 7502, "parent": 7501, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // TODO Implement the constraints here\n // Formula 1\n some person: Person | Agatha in person.killed\n\n // Formula 2\n all x, y: Person | x.killed = y implies (x.hates = y and not x.richer = y)\n \n // Formula 3\n all x: Person | Agatha.hates = x implies not Charles.hates = x\n\n // Formula 4\n Agatha in Agatha.hates and Agatha in Charles.hates\n\n // Formula 5\n all x: Person | not x.richer = Agatha implies Butler.hates = x\n}\n\nrun puzzle", "permalink": "usual-humbly-nest-watch", "time": "2023-12-01 16:02:31.329021", "cmd": 1} {"id": 7504, "parent": 6737, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {all a : Assignment | one a.associated_with}\n\n// Predicate PolicyAllowsGrading defines the policy for allowing grading of an Assignment by a Person.\npred PolicyAllowsGrading(p: Person, a: Assignment) {\n p in a.associated_with.assistant or p in a.associated_with.instructor\n}\n\n// Assert NoOneCanGradeTheirOwnAssignment checks that no Person can grade their own Assignment.\nassert NoOneCanGradeTheirOwnAssignment {\n all p : Person, a : Assignment |\n PolicyAllowsGrading[p, a] implies not p in a.assigned_to\n}\n\ncheck NoOneCanGradeTheirOwnAssignment for 2", "permalink": "whiny-flying-winner-dress", "time": "2023-12-01 17:55:08.078468", "cmd": 1} {"id": 7505, "parent": 7409, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\nabstract sig Person {}\nsig buyer,seller extends Person{}\nsig Restaurent {\n selling : one seller,\n buying : one buyer\n}\nsig Coupons {\n associated_to : one Restaurent,\n associated_with : some buyer\n}\nfact{\n all c.Coupons | one a.associated_with\n}\nrun {}", "permalink": "dig-manual-vest-parcel", "time": "2023-12-01 18:02:12.934154", "cmd": 1} {"id": 7506, "parent": 7505, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\nabstract sig Person {}\nsig buyer,seller extends Person{}\nsig Restaurent {\n selling : one seller,\n buying : one buyer\n}\nsig Coupons {\n associated_to : one Restaurent,\n associated_with : some buyer\n}\nfact{\n all c.Coupons | one c.associated_with\n}\nrun {}", "permalink": "lizard-rental-helper-urging", "time": "2023-12-01 18:02:27.298958", "cmd": 1} {"id": 7508, "parent": 7507, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\nabstract sig Person {}\nsig buyer,seller extends Person{}\nsig Restaurent {\n selling : one seller,\n buying : one buyer\n}\nsig Coupons {\n associated_to : one Restaurent,\n associated_with : some buyer\n}\npred couponaallowingforbuying(p.Person,c : Coupons){\n p in c.associated_with.buyer\n}\nfact{ all c : Coupons | one c.associated_with }\nrun {}", "permalink": "grimy-sermon-aside-phrase", "time": "2023-12-01 18:06:23.507076", "cmd": 1} {"id": 7509, "parent": 7508, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\nabstract sig Person {}\nsig buyer,seller extends Person{}\nsig Restaurent {\n selling : one seller,\n buying : one buyer\n}\nsig Coupons {\n associated_to : one Restaurent,\n associated_with : some buyer\n}\npred couponaallowingforbuying(p.Person,c : Coupons){\n p in c.associated_with.buying\n}\nfact{ all c : Coupons | one c.associated_with }\nrun {}", "permalink": "action-spiffy-blip-seldom", "time": "2023-12-01 18:07:07.983780", "cmd": 1} {"id": 7512, "parent": 7511, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\nabstract sig Person {}\nsig buyer,seller extends Person{}\nsig Restaurent {\n selling : one seller,\n buying : one buyer\n}\nsig Coupons {\n associated_to : one Restaurent,\n associated_with : some buyer\n}\npred couponallowingforbuying(p : Person,c : Coupons){\n p in c.associated_with.buying or p in c.associated_with.selling\n}\nfact{ all c : Coupons | one c.associated_with }\nassert NoOneCreatetheirowncoupon {\n all p : Person, c : Coupons |\n couponallowingforbuying[p, c] implies not p in c.assigned_to\n}\ncheck NoOneCreatetheirowncoupon for 2", "permalink": "wow-roving-idiocy-ninja", "time": "2023-12-01 18:10:41.868340", "cmd": 1} {"id": 7513, "parent": 7512, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\nabstract sig Person {}\nsig buyer,seller extends Person{}\nsig Restaurent {\n selling : one seller,\n buying : one buyer\n}\nsig Coupons {\n associated_to : one Restaurent,\n associated_with : some buyer\n}\nfact { all c : Coupons | one c.associated_with }\npred couponallowingforbuying(p : Person,c : Coupons){\n p in c.associated_with.buying or p in c.associated_with.selling\n}\n\nassert NoOneCreatetheirowncoupon {\n all p : Person, c : Coupons |\n couponallowingforbuying[p, c] implies not p in c.assigned_to\n}\ncheck NoOneCreatetheirowncoupon for 2", "permalink": "stony-upwind-avid-tiling", "time": "2023-12-01 18:11:10.485529", "cmd": 1} {"id": 7517, "parent": 7516, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\nabstract sig Person {}\nsig buyer,seller extends Person{}\nsig Restaurent {\n selling : one seller,\n buying : one buyer\n}\nsig Coupons {\n associated_to : one Restaurent,\n associated_with : some buyer\n}\nfact { all c : Coupons | one c.associated_with }\npred PolicyAllowsGrading(p: Person, a: Coupons) {\n p in a.associated_with.buying or p in a.associated_with.selling\n}\n\n// Assert NoOneCanGradeTheirOwnAssignment checks that no Person can grade their own Assignment.\nassert NoOneCanGradeTheirOwnAssignment {\n all p : Person, a : Coupons |\n PolicyAllowsGrading[p, a] implies not p in a.associated_to\n}\n\ncheck NoOneCanGradeTheirOwnAssignment for 2", "permalink": "hefty-unsure-sprite-basket", "time": "2023-12-01 18:15:07.396117", "cmd": 1} {"id": 7519, "parent": 6996, "code": "sig Guest {}\nsig Drunk in Guest {}\n\npred drinkers {\n \n}\n\nrun drinkers for 3", "permalink": "punk-dipper-rubbed-nacho", "time": "2023-12-01 18:23:29.326983", "cmd": 1} {"id": 7520, "parent": 7468, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n some x: Person | Agatha in x.killed\n \n all x: Person | all y: Person | (y in x.killed) implies \n ((y in x.hates) and (y not in x.richer)) \n\n all x: Person | (x in Agatha.hates) implies (x not in Charles.hates)\n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates)\n\n all x: Person | not (Agatha in x.richer) implies (Butler in x.hates)\n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates)\n\n all x: Person | some y: Person | (y not in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "amber-capped-lurk-elk", "time": "2023-12-02 06:40:40.221061", "cmd": 1} {"id": 7523, "parent": 7522, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n some x: Person | Agatha in x.killed\n \n all x: Person | all y: Person | (y in x.killed) implies \n ((y in x.hates) and (y not in x.richer)) \n\n all x: Person | (x in Agatha.hates) implies (x not in Charles.hates)\n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates)\n\n all x: Person | not (Agatha in x.richer) implies (Butler in x.hates)\n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates)\n\n //all x: Person | some y: Person | (y not in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "myth-rural-flirt-spur", "time": "2023-12-02 06:41:25.707461", "cmd": 1} {"id": 7524, "parent": 7523, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n lone x: Person | Agatha in x.killed\n \n all x: Person | all y: Person | (y in x.killed) implies \n ((y in x.hates) and (y not in x.richer)) \n\n all x: Person | (x in Agatha.hates) implies (x not in Charles.hates)\n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates)\n\n all x: Person | not (Agatha in x.richer) implies (Butler in x.hates)\n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates)\n\n all x: Person | lone y: Person | (y not in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "cancel-ramp-demise-caviar", "time": "2023-12-02 06:42:56.204095", "cmd": 1} {"id": 7525, "parent": 7524, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n lone x: Person | Agatha in x.killed\n \n all x: Person | all y: Person | (y in x.killed) implies \n ((y in x.hates) and (not y in x.richer)) \n\n all x: Person | (x in Agatha.hates) implies (not x in Charles.hates)\n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates)\n\n all x: Person | not (Agatha in x.richer) implies (Butler in x.hates)\n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates)\n\n all x: Person | lone y: Person | (not y in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "canopy-dupe-manly-circle", "time": "2023-12-02 06:44:05.885120", "cmd": 1} {"id": 7526, "parent": 7525, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n some x: Person | Agatha in x.killed\n \n all x: Person | all y: Person | (y in x.killed) implies \n ((y in x.hates) and (not y in x.richer)) \n\n all x: Person | (x in Agatha.hates) implies (not x in Charles.hates)\n\n //(Agatha in Agatha.hates) and (Charles in Agatha.hates)\n\n all x: Person | not (Agatha in x.richer) implies (Butler in x.hates)\n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates)\n\n all x: Person | some y: Person | (not y in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "blitz-eel-afar-jazz", "time": "2023-12-02 06:45:53.890540", "cmd": 1} {"id": 7527, "parent": 7526, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n some x: Person | Agatha in x.killed\n \n all x: Person | all y: Person | (y in x.killed) implies \n ((y in x.hates) and (not y in x.richer)) \n\n all x: Person | (x in Agatha.hates) implies (not x in Charles.hates)\n\n //(Agatha in Agatha.hates) and (Charles in Agatha.hates)\n\n all x: Person | (not Agatha in x.richer) implies (Butler in x.hates)\n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates)\n\n all x: Person | some y: Person | (not y in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "cackle-earthy-snort-cramp", "time": "2023-12-02 06:54:54.476947", "cmd": 1} {"id": 7530, "parent": 7529, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n some x: Person | Agatha in x.killed \n \n all x: Person | all y: Person | (y in x.killed) implies \n ((y in x.hates) and (not y in x.richer)) \n\n all x: Person | (x in Agatha.hates) implies (not x in Charles.hates) \n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates) \n\n all x: Person | (not Agatha in x.richer) implies (Butler in x.hates) \n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates) \n\n all x: Person | some y: Person | (not y in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "upheld-dollar-oyster-uptown", "time": "2023-12-02 06:56:21.600139", "cmd": 1} {"id": 7534, "parent": 7533, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n some x: Person | Agatha in x.killed \n \n all x: Person | all y: Person | (y in x.killed) implies \n ((y in x.hates) and (not y in x.richer)) \n\n all x: Person | (x in Agatha.hates) implies (not x in Charles.hates) \n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates) \n\n all x: Person | (not Agatha in x.richer) implies (Butler in x.hates) \n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates) \n\n all x: Person | some y: Person | (not y in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "sacred-tasty-swung-squash", "time": "2023-12-02 07:02:28.676636", "cmd": 1} {"id": 7535, "parent": 7534, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n some x: Person | Agatha in x.killed \n \n all x: Person | all y: Person | \n \n (y in x.killed) implies \n ((y in x.hates) and (not y in x.richer)) \n\n all x: Person | (x in Agatha.hates) implies (not x in Charles.hates) \n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates) \n\n all x: Person | (not Agatha in x.richer) implies (Butler in x.hates) \n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates) \n\n all x: Person | some y: Person | (not y in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "grimy-thrive-ensure-curfew", "time": "2023-12-02 07:03:27.411471", "cmd": 1} {"id": 7540, "parent": 7539, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n lone x: Person | Agatha in x.killed \n \n some x: Person | some y: Person | \n (y in x.killed) implies \n (y in x.hates and not y in x.richer) \n\n some x: Person | (x in Agatha.hates) implies (not x in Charles.hates) \n\n Agatha in Agatha.hates and Charles in Agatha.hates \n\n some x: Person | (not Agatha in x.richer) implies (Butler in x.hates) \n\n some x: Person | (x in Agatha.hates) implies (x in Butler.hates) \n\n some x: Person | lone y: Person | (not y in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "dense-bulgur-graded-sketch", "time": "2023-12-02 07:05:36.302270", "cmd": 1} {"id": 7541, "parent": 7540, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n one x: Person | Agatha in x.killed \n \n some x: Person | some y: Person | \n (y in x.killed) implies \n (y in x.hates and not y in x.richer) \n\n some x: Person | (x in Agatha.hates) implies (not x in Charles.hates) \n\n Agatha in Agatha.hates and Charles in Agatha.hates \n\n some x: Person | (not Agatha in x.richer) implies (Butler in x.hates) \n\n some x: Person | (x in Agatha.hates) implies (x in Butler.hates) \n\n some x: Person | one y: Person | (not y in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "shape-cod-emote-virus", "time": "2023-12-02 07:06:55.602626", "cmd": 1} {"id": 7516, "parent": 7515, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\nabstract sig Person {}\nsig buyer,seller extends Person{}\nsig Restaurent {\n selling : one seller,\n buying : one buyer\n}\nsig Coupons {\n associated_to : one Restaurent,\n associated_with : some buyer\n}\nfact { all c : Coupons | one c.associated_with }\npred PolicyAllowsGrading(p: Person, a: Coupons) {\n p in a.associated_with.buying or p in a.associated_with.selling\n}\n\n// Assert NoOneCanGradeTheirOwnAssignment checks that no Person can grade their own Assignment.\nassert NoOneCanGradeTheirOwnAssignment {\n all p : Person, a : Coupons |\n PolicyAllowsGrading[p, a] implies not p in a.assigned_to\n}\n\ncheck NoOneCanGradeTheirOwnAssignment for 2", "permalink": "nape-ditzy-civic-thread", "time": "2023-12-01 18:14:43.769901", "cmd": 1} {"id": 7521, "parent": 7520, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n some x: Person | Agatha in x.killed\n \n all x: Person | all y: Person | (y in x.killed) implies \n ((y in x.hates) and (y not in x.richer)) \n\n all x: Person | (x in Agatha.hates) implies (x not in Charles.hates)\n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates)\n\n all x: Person | not (Agatha in x.richer) implies (Butler in x.hates)\n\n all x: Person | (x in Agatha.hates) implies (Butler in x.hates)\n\n all x: Person | some y: Person | (y not in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "grant-deity-sweat-brush", "time": "2023-12-02 06:40:51.149973", "cmd": 1} {"id": 7546, "parent": 7545, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\nassert puzzle {\n some x: Person | Agatha in x.killed \n \n all x,y: Person | \n (y in x.killed) implies \n (y in x.hates and not y in x.richer) \n\n all x: Person | (x in Agatha.hates) implies (not x in Charles.hates) \n\n Agatha in Agatha.hates and Charles in Agatha.hates \n\n all x: Person | (not Agatha in x.richer) implies (Butler in x.hates) \n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates) \n\n all x: Person | some y: Person | (not y in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "jet-wolf-rewire-undead", "time": "2023-12-02 07:10:53.875710", "cmd": 1} {"id": 7549, "parent": 7548, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n some x: Person | Agatha in x.killed \n \n all x,y: Person | \n (y in x.killed) implies \n (y in x.hates and not y in x.richer) \n\n all x: Person | (x in Agatha.hates) implies (not x in Charles.hates) \n\n Agatha in Agatha.hates and Charles in Agatha.hates \n\n all x: Person | (not Agatha in x.richer) implies (x in Butler.hates) \n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates) \n\n all x: Person | some y: Person | (not y in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "oak-usual-negate-scant", "time": "2023-12-02 07:16:33.704046", "cmd": 1} {"id": 7553, "parent": 7552, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all File in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n all f: \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "online-basket-easel-candle", "time": "2023-12-02 07:25:34.912480", "cmd": 2} {"id": 7573, "parent": 7572, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n all f: File | some t: Trash | f in t.link \n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "impart-unroll-denim-ion", "time": "2023-12-02 08:56:45.393237", "cmd": 2} {"id": 7579, "parent": 7578, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all p: Protected | one t: Trash | no p.link in t\n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "mating-phrase-taste-fervor", "time": "2023-12-02 09:02:17.393119", "cmd": 4} {"id": 7584, "parent": 7583, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all p: Protected | one t: Trash | p not in t\n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | one t: Trash | all f: File |\n f in p implies p not in t\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n \n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "darn-pried-paddle-budget", "time": "2023-12-02 09:06:03.112714", "cmd": 5} {"id": 7587, "parent": 7586, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n some p: Protected | one t: Trash | p not in t and p not in t.link and p.link not in t\n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | one t: Trash | all f: File |\n f in p implies p not in t\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "till-matrix-same-riding", "time": "2023-12-02 09:11:10.565816", "cmd": 4} {"id": 7588, "parent": 7587, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n some p: Protected | one t: Trash | p not in t and p not in t.link and t not in p.link\n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | one t: Trash | all f: File |\n f in p implies p not in t\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "astute-dipped-boney-spoils", "time": "2023-12-02 09:11:42.708753", "cmd": 4} {"id": 7600, "parent": 7599, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\n// Define the predicate that represents the puzzle constraints\npred puzzle {\n // Statement 1: There exists someone who killed Agatha\n some x: Person | Agatha in x.killed\n\n // Statement 2: For all x and y, if x killed y, then x hates y and x is not richer than y\n all x, y: Person | y in x.killed implies (y in x.hates and not y in x.richer)\n\n // Statement 3: Everybody who hates Agatha hates Charles\n all x: Person - Agatha | (Agatha in x.hates) implies (Charles in x.hates)\n\n // Statement 4: Agatha hates herself and she hates Charles\n Agatha in Agatha.hates and Charles in Agatha.hates\n\n // Statement 5: The Butler hates everyone not richer than Agatha\n all x: Person - Agatha | not (x in Agatha.richer) implies (x in Butler.hates)\n\n // Statement 6: The Butler hates everyone whom Agatha hates\n all x: Person | x in Agatha.hates implies x in Butler.hates\n\n // Statement 7: Charles hates no one\n no x: Person | x in Charles.hates\n}\n\n// Run the puzzle predicate to find a solution\nrun puzzle", "permalink": "replay-jersey-unreal-yen", "time": "2023-12-02 13:19:58.099983", "cmd": 1} {"id": 7603, "parent": 7602, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {\n // Agatha, the Butler, and Charles are not richer than themselves\n not (this in this.richer)\n}\n\n// Define the predicate that represents the puzzle constraints\npred puzzle {\n // Someone who lived in Dreadbury Mansion killed Aunt Agatha\n some x: Person - Agatha | Agatha in x.killed\n \n // A killer always hates their victim, and is never richer than their victim.\n all x, y: Person | y in x.killed implies (y in x.hates and not (y in x.richer))\n \n // Charles hates no one that Aunt Agatha hates.\n all x: Person | x in Agatha.hates implies not (x in Charles.hates)\n \n // Agatha hates everyone except the Butler.\n all x: Person - Butler | x in Agatha.hates\n not (Butler in Agatha.hates)\n \n // The Butler hates everyone not richer than Aunt Agatha.\n all x: Person - Agatha | not (x in Agatha.richer) implies x in Butler.hates\n \n // The Butler also hates everyone Agatha hates.\n all x: Person | x in Agatha.hates implies x in Butler.hates\n \n // No one hates everyone.\n no p: Person | hates[p] = Person\n \n // Additional facts to ensure consistency\n // Agatha is not richer than Butler and Charles\n not (Butler in Agatha.richer)\n not (Charles in Agatha.richer)\n \n // Agatha did not kill herself\n not (Agatha in Agatha.killed)\n}\n\n// Run the puzzle predicate to find a solution\nrun puzzle for exactly 1 Agatha, exactly 1 Butler, exactly 1 Charles", "permalink": "lash-deed-struck-pagan", "time": "2023-12-02 13:25:11.454659", "cmd": 1} {"id": 7614, "parent": 7613, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // TODO Implement the constraints here\n some x : Person | Agatha in x.killed\n\n all x,y: Person | (y in x.killed implies (y in x.hates and not y in x.richer))\n\n all x: Person | (x in Agatha.hates implies not x in Charles.hates)\n\n}\n\nrun puzzle", "permalink": "primp-wasp-mascot-perish", "time": "2023-12-02 14:08:57.513196", "cmd": 1} {"id": 7615, "parent": 7614, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // TODO Implement the constraints here\n some x : Person | Agatha in x.killed\n\n all x,y: Person | (y in x.killed implies (y in x.hates and not y in x.richer))\n\n all x: Person | (x in Agatha.hates implies not x in Charles.hates)\n\n Agatha in Agatha.hates and Charles in Agatha.hates\n\n}\n\nrun puzzle", "permalink": "lisp-thumb-aloof-fame", "time": "2023-12-02 14:11:49.177094", "cmd": 1} {"id": 7616, "parent": 7615, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // TODO Implement the constraints here\n some x : Person | Agatha in x.killed\n\n all x,y: Person | (y in x.killed implies (y in x.hates and not y in x.richer))\n\n all x: Person | (x in Agatha.hates implies not x in Charles.hates)\n\n Agatha in Agatha.hates and Charles in Agatha.hates\n\n \n\n}\n\nrun puzzle", "permalink": "change-walrus-attic-buggy", "time": "2023-12-02 14:12:05.938365", "cmd": 1} {"id": 7623, "parent": 7622, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // TODO Implement the constraints here\n // Constraint 1\n some x : Person | Agatha in x.killed\n\n // Constraint 2\n all x,y: Person | (y in x.killed implies (y in x.hates and not y in x.richer))\n\n // Constraint 3\n all x: Person | (x in Agatha.hates implies not x in Charles.hates)\n\n // Constraint 4\n (Agatha in Agatha.hates) and (Charles in Agatha.hates)\n\n // Constraint 5\n all x : Person | (not Agatha in x.richer implies x in Butler.hates)\n\n // Constraint 6\n all x:Person | (x in Agatha.hates implies x in Butler.hates)\n\n // Constraint 7\n all x :Person | some y: Person | not y in x.hates\n}\n\nrun puzzle", "permalink": "abroad-user-wow-till", "time": "2023-12-02 14:29:38.300052", "cmd": 1} {"id": 7630, "parent": 7629, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\n\nsig Worker {\n associated_with: Schedule,\n}\n\nsig Schedule {\n workingDays: set Day\n}\n\n\nabstract sig Day{} \nsig Monday, Tuesday, Wednesday, Thurstday, Friday extends Day {}\n\nfact {\n all a : Worker | one a.associated_with\n}\n\n\nrun {}", "permalink": "navy-french-shown-borax", "time": "2023-12-02 14:47:31.043229", "cmd": 1} {"id": 7638, "parent": 7637, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all x: File | x in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some x: File | x in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all x: Protected | x not in Trash\n \n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "litter-could-frisk-cacti", "time": "2023-12-02 15:24:36.488145", "cmd": 4} {"id": 7643, "parent": 7642, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all x: File | x in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some x: File | x in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all x: Protected | x not in Trash\n \n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all x: File| (x not in Protected implies x in Trash)\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "storm-bless-music-bush", "time": "2023-12-02 15:30:46.051025", "cmd": 5} {"id": 7646, "parent": 6737, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {all a : Assignment | one a.associated_with}\n\n// Predicate PolicyAllowsGrading defines the policy for allowing grading of an Assignment by a Person.\npred PolicyAllowsGrading(p: Person, a: Assignment) {\n p in a.associated_with.assistant or p in a.associated_with.instructor\n}\n\n// Assert NoOneCanGradeTheirOwnAssignment checks that no Person can grade their own Assignment.\nassert NoOneCanGradeTheirOwnAssignment {\n all p : Person, a : Assignment |\n PolicyAllowsGrading[p, a] implies not p in a.assigned_to\n}\n\ncheck NoOneCanGradeTheirOwnAssignment for 2", "permalink": "wildly-gush-cancel-radar", "time": "2023-12-02 15:36:55.379787", "cmd": 1} {"id": 7651, "parent": 7630, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\n\nsig Worker {\n associated_with: Schedule,\n}\n\n\ndsadasdasdsad\ndasdsa\nsig Schedule {\n workingDays: set Day\n}\n\n\nabstract sig Day{} \nsig Monday, Tuesday, Wednesday, Thurstday, Friday extends Day {}\n\nfact {\n all a : Worker | one a.associated_with\n}\n\n\nrun {}", "permalink": "rind-radial-proud-cavity", "time": "2023-12-02 15:41:56.217194", "cmd": 1} {"id": 7652, "parent": 7651, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\n\nsig Worker {\n associated_with: Schedule,\n}\n\nsig Schedule {\n workingDays: set Day\n}\n\n\nabstract sig Day{} \nsig Monday, Tuesday, Wednesday, Thurstday, Friday extends Day {}\n\nfact {\n all a : Worker | one a.associated_with\n}\n\n\nrun {}", "permalink": "stress-granny-bovine-never", "time": "2023-12-02 15:42:11.604668", "cmd": 1} {"id": 7656, "parent": 7655, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all x: File | x in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some x: File | x in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n// all x: Protected | x not in Trash\n no f: Protected & Trash\n\n\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all x: File| (x not in Protected implies x in Trash)\n\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n all x: File | lone x.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n no x: File | some x.link implies x not in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "showy-defy-copied-gave", "time": "2023-12-02 15:50:27.867025", "cmd": 7} {"id": 7657, "parent": 7656, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all x: File | x in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some x: File | x in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n// all x: Protected | x not in Trash\n no f: Protected & Trash\n\n\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all x: File| (x not in Protected implies x in Trash)\n\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n all x: File | lone x.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n no x: File | some x.link implies x not in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "jam-shriek-starch-rewind", "time": "2023-12-02 15:50:43.995549", "cmd": 4} {"id": 7664, "parent": 7663, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all x: File | x in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some x: File | x in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all x: Protected | x not in Trash\n\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all x: File| (x not in Protected implies x in Trash)\n\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n all x: File | lone x.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n no x: File | some x.link implies x not in Trash\n\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n all x : File | no x.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n no x: File | some x.link implies no (x.link).link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "diary-throat-sprawl-album", "time": "2023-12-02 15:58:21.835515", "cmd": 9} {"id": 7666, "parent": 7652, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\n\nsig Worker {\n hasSchedule: Schedule,\n}\n\nsig Schedule {\n workingDays: set Day\n}\n\nabstract sig Day{\n name : String,\n previousDay: Day,\n nextDay: Day,\n \n} \nsig Monday, Tuesday, Wednesday, Thurstday, Friday extends Day {}\n\nfact {\n all a : Worker | one a.associated_with\n}\n\n\nrun {}", "permalink": "cinch-garnet-bubble-marry", "time": "2023-12-02 16:03:35.348426", "cmd": 1} {"id": 7672, "parent": 7670, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all x: File | x in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some x: File | x in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all x: Protected | x not in Trash\n\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all x: File| (x not in Protected implies x in Trash)\n\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n all x: File | lone x.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n no x: File | some x.link implies x not in Trash\n\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n all x : File | no x.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n all x: File | some x.link implies no (x.link).link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n all x: File | x in Trash implies all x.link in Trash\n}\n\nrun inv10", "permalink": "pasted-replay-uncle-reseal", "time": "2023-12-02 16:06:21.021649", "cmd": 10} {"id": 7695, "parent": 7694, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all x: File | x in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some x: File | x in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all x: File | x in Protected implies x not in Trash\n\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all x: File| (x not in Protected implies x in Trash)\n\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n all x: File | lone x.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n all x,y: File | y in x.link implies y not in Trash and x not in Trash\n\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n all x : File | no x.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n all x: File | some x.link implies no (x.link).link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n all x,y: File | x in y.link and y in Trash implies x in Trash\n}\n\nrun inv10", "permalink": "matron-name-gently-cloak", "time": "2023-12-02 21:03:27.265728", "cmd": 7} {"id": 7705, "parent": 7704, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures: Person, Librarian, Student, Name, Book, Title, Membership\n\n// Person\nsig Person{\n name: one Name\n}\n\n// Name\nsig Name{}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// Title\nsig Title{}\n\n// Membership\nsig Membership{}\n\n\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n\n\nrun {}", "permalink": "phobia-cause-legend-poach", "time": "2023-12-03 00:44:11.049794", "cmd": 1} {"id": 7714, "parent": 7713, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures: Person, Librarian, Student, Name, Book, Title, Membership\n\n// Person\nsig Person{\n name: one Name,\n email: One Email\n}\n\n// Name\nsig Name{}\n\n// Email\nsig Email{}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n department: one Department\n \n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// Title\nsig Title{}\n\n// Membership\nsig Membership{}\n\n// Department\nsig Department {}\n\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists \n", "permalink": "curtly-pull-spoof-stereo", "time": "2023-12-03 01:04:51.543669", "cmd": 2} {"id": 7716, "parent": 7715, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures: Person, Librarian, Student, Name, Book, Title, Membership\n\n// Person\nsig Person{\n name: one Name,\n email: one Email\n}\n\n// Name\nsig Name{}\n\n// Email\nsig Email{}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n department: one Department\n \n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// Title\nsig Title{}\n\n// Membership\nsig Membership{}\n\n// Department\nsig Department {}\n\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists ", "permalink": "proved-circle-mulch-dilute", "time": "2023-12-03 01:05:39.197566", "cmd": 2} {"id": 7721, "parent": 7593, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all p: Protected | one t: Trash | p not in t and p not in t.link \n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | one t: Trash | all f: File |\n f in p implies (p not in t and p not in t.link)\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n one f: File| all fAll: File |\n f in fAll.link \n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "hulk-echo-canned-cursor", "time": "2023-12-03 07:13:40.763824", "cmd": 4} {"id": 7731, "parent": 7730, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all p: Protected | one t: Trash | p not in t and p not in t.link and t not in p.link\n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | one t: Trash |\n \n all f: File |\n f not in p implies (f in t)\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n one f: File| all fAll: File |\n f in fAll.link \n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "groggy-karma-zit-idly", "time": "2023-12-03 07:21:26.150591", "cmd": 4} {"id": 7733, "parent": 7732, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all p: Protected | all t: Trash | \n p not in t and p not in t.link and t not in p.link \n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | one t: Trash |\n \n all f: File |\n f not in p implies (f in t)\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n one f: File| all fAll: File |\n f in fAll.link \n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "stark-banked-paltry-groove", "time": "2023-12-03 07:54:36.831679", "cmd": 4} {"id": 7736, "parent": 7735, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all p: Protected | all t: Trash | \n p not in t and p not in t.link and t not in p.link \n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | all t: Trash | all f: File |\n f in p iff not f in t\n f not in p implies (f in t or f in t.link)\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n one f: File| all fAll: File |\n f in fAll.link \n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "cupped-rice-tattoo-cold", "time": "2023-12-03 07:56:54.109423", "cmd": 5} {"id": 7739, "parent": 7738, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all p: Protected | all t: Trash | \n p not in t and p not in t.link and t not in p.link \n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | all t: Trash | all f: File |\n f in p iff not f in t or\n f not in p implies (f in t or f in t.link)\n \n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n one f: File| all fAll: File |\n f in fAll.link \n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "nacho-tiptop-spray-uproot", "time": "2023-12-03 07:57:51.602985", "cmd": 5} {"id": 7742, "parent": 7741, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all p: Protected | all t: Trash | \n p not in t and p not in t.link and t not in p.link \n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | all t: Trash | all f: File |\n f in p iff not f in t and\n \n \n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n one f: File| all fAll: File |\n f in fAll.link \n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "letter-prone-oppose-scored", "time": "2023-12-03 08:01:18.542058", "cmd": 5} {"id": 7747, "parent": 7746, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all p: Protected | all t: Trash | \n p not in t and p not in t.link and t not in p.link \n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | all t: Trash | all f: File |\n f in p iff not f in t implies\n (f not in p) implies (f in t or f in t.link)\n \n \n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n one f: File| all fAll: File |\n f in fAll.link \n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "blank-folic-chef-gusto", "time": "2023-12-03 08:02:57.925037", "cmd": 5} {"id": 7748, "parent": 7747, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all p: Protected | all t: Trash | \n p not in t and p not in t.link and t not in p.link \n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | all t: Trash | all f: File |\n f in p iff not f in t implies\n (f not in p) implies (f in t or f in t.link)\n \n \n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n one f: File| all fAll: File |\n f in fAll.link \n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "glitch-gulf-launch-smoked", "time": "2023-12-03 08:03:16.626852", "cmd": 4} {"id": 7749, "parent": 7748, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all p: Protected | all t: Trash | \n p not in t and p not in t.link and t not in p.link \n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | all t: Trash | all f: File |\n f in p iff not f in t implies\n (f not in p and f not in t) implies (f in t or f in t.link)\n \n \n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n one f: File| all fAll: File |\n f in fAll.link \n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "reload-bribe-finer-possum", "time": "2023-12-03 08:03:45.951923", "cmd": 4} {"id": 7750, "parent": 7749, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all p: Protected | all t: Trash | \n p not in t and p not in t.link and t not in p.link \n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | all t: Trash | all f: File |\n f in p iff not f in t implies\n (f not in p and f not in t) implies (f in t or f in t.link)\n \n \n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n one f: File| all fAll: File |\n f in fAll.link \n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "gopher-quake-lapel-scorn", "time": "2023-12-03 08:03:48.495539", "cmd": 5} {"id": 7751, "parent": 7750, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all p: Protected | all t: Trash | \n p not in t and p not in t.link and t not in p.link \n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | all t: Trash | set f: File |\n f in p iff not f in t implies\n (f not in p and f not in t) implies (f in t or f in t.link)\n \n \n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n one f: File| all fAll: File |\n f in fAll.link \n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "dealt-velcro-mooned-lash", "time": "2023-12-03 08:04:05.043787", "cmd": 5} {"id": 7752, "parent": 7751, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all p: Protected | all t: Trash | \n p not in t and p not in t.link and t not in p.link \n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | all t: Trash | some f: File |\n f in p iff not f in t implies\n (f not in p and f not in t) implies (f in t or f in t.link)\n \n \n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n one f: File| all fAll: File |\n f in fAll.link \n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "safely-cosmos-quarry-flock", "time": "2023-12-03 08:04:10.066779", "cmd": 5} {"id": 7753, "parent": 7752, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all p: Protected | all t: Trash | \n p not in t and p not in t.link and t not in p.link \n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | one t: Trash | some f: File |\n f in p iff not f in t implies\n (f not in p and f not in t) implies (f in t or f in t.link)\n \n \n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n one f: File| all fAll: File |\n f in fAll.link \n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "bacon-gone-flap-recede", "time": "2023-12-03 08:04:22.597371", "cmd": 5} {"id": 7755, "parent": 7720, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nsig Person{\n name: one Name,\n email: one Email\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n department: one Department\n \n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// // Name\n// sig Name{}\n\n// // Email\n// sig Email{}\n\n// // Title\n// sig Title{}\n\n// // Membership\n// sig Membership{}\n\n// // Department\n// sig Department {}\n\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "thrill-coming-depose-grain", "time": "2023-12-03 13:18:30.016152", "cmd": 1} {"id": 7764, "parent": 7763, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nsig Person{\n name: one Name,\n email: one Email\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n department: one Department\n \n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// // Name\n// sig Name{}\n\n// // Email\n// sig Email{}\n\n// // Title\n// sig Title{}\n\n// // Membership\n// sig Membership{}\n\n// // Department\n// sig Department {}\n// Name\nsig Name {\n value: one String // added field\n}\n\n// Email\nsig Email {\n address: one String // added field\n}\n\n// Title\nsig Title {\n name: one String // added field\n}\n\n// Membership\nsig Membership {\n type: one MembershipType, // added field\n validUntil: one Date // added field\n}\n\n// Author\nsig Author {\n name: one Name, // added field\n publishedBooks: set Book // added field\n}\n\n// Department\nsig Department {\n head: one Librarian, // added field\n courses: set Course // added field\n}\n\n// Course\nsig Course {\n name: one String, // added field\n enrolledStudents: set Student // added field\n}\n\n// Date (to represent dates)\nsig Date {\n year: one Int,\n month: one Int,\n day: one Int\n}\n\n// MembershipType\nsig MembershipType {\n name: one String, // added field\n benefits: set String // added field\n}\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists for 5", "permalink": "food-other-lyrics-retold", "time": "2023-12-03 13:28:27.894327", "cmd": 2} {"id": 7766, "parent": 7765, "code": "// University Library Management System\n// Signatures\n\n// Person\nsig Person {\n name: String,\n email: String\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person {\n managedBooks: set Book,\n departmentId: Int // Department represented as an integer\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person {\n membershipStatus: Int, // Membership status represented as an integer\n borrowedBooks: set Book\n}\n\n// Book\nsig Book {\n title: String,\n availability: Int // Availability status as an integer (0 or 1)\n}\n\n// Facts\n// A student without membership cannot borrow books\nfact studentWithoutMembershipCannotBorrowBooks {\n all s: Student | s.membershipStatus = 0 implies no s.borrowedBooks\n}\n\n// Borrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing {\n all b: Book | some s: Student | b in s.borrowedBooks implies b.availability = 0\n}\n\n// Predicates\n// Check if someone has borrowed a book\npred someoneHasBorrowedABook {\n some s: Student | some s.borrowedBooks\n}\n\n// Check if at least one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// Run commands\n// The first run command should be unsatisfiable\nrun someoneHasBorrowedABook for 5 but 0 MembershipStatus\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists for 5", "permalink": "sip-path-annex-tidal", "time": "2023-12-03 13:33:24.504072", "cmd": 1} {"id": 7768, "parent": 7767, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nsig Person{\n name: one Name,\n email: one Email\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n department: one Department\n \n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// Name\nsig Name{\n firstname: one String\n lastName: one String\n}\n\n// Email\nsig Email{}\n\n// Title\nsig Title{}\n\n// Membership\nsig Membership{}\n\n// Department\nsig Department {}\n\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "sporty-violin-water-many", "time": "2023-12-03 13:35:01.445103", "cmd": 1} {"id": 7782, "parent": 7781, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nabstract sig Person{\n name: one Name,\n email: one Email\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n department: one Department\n \n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// Name\nsig Name{}\n\n// Email\nsig Email{}\n\n// Title\nsig Title{}\n\n// Membership\nsig Membership{\n\n}\n\n// Department\nsig Department {}\n\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// fact UniqueTitles {all t: Title | one name.t}\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "fondly-debate-dig-ditzy", "time": "2023-12-03 13:51:50.072661", "cmd": 2} {"id": 7785, "parent": 7784, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nabstract sig Person{\n name: one Name,\n email: one Email\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n department: one Department\n \n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// Name\nsig Name{}\n\n// Email\nsig Email{}\n\n// Title\nsig Title{\n name: Title\n}\n\n// Membership\nsig Membership{\n\n}\n\n// Department\nsig Department {}\n\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Each book has unique titles\nfact EachBookHasUniqueTitles {\n all title: Title | one name.title\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "poser-stash-spleen-spinal", "time": "2023-12-03 13:54:27.557893", "cmd": 1} {"id": 7788, "parent": 7720, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nsig Person{\n name: one Name,\n email: one Email\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n department: one Department\n \n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// Name\nsig Name{\n firstName: String,\n lastName: String\n}\n\n// Email\nsig Email{}\n\n// Title\nsig Title{}\n\n// Membership\nsig Membership{}\n\n// Department\nsig Department {}\n\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "header-tattle-aids-saga", "time": "2023-12-03 14:00:14.555776", "cmd": 1} {"id": 7798, "parent": 7727, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\nsig Person {\n likes: set Book,\n dislikes: set Book,\n}\n\n\nsome sig Librarian extends Person {\n recommends: set Book,\n sorting_in: lone Book, \n}\n\nsig Book {\n lent_to: lone Person, // if not sorting_in and not \n continuation_of: lone Book\n}\n\nsome sig Shelf {\n holds: set Book, // books which are not reserved and not in process\n assigned_to: one Librarian\n}\n\nfact ExclusiveLikesDislikes {\n all p: Person |\n p.likes & p.dislikes = none // No book should be both liked and disliked by the same person\n}\n\nfact LibrarianRules {\n all l: Librarian |\n l.dislikes & l.recommends = none\n\n}\n\nfact NoLendingWhileSortingIn {\n all l: Librarian, b: Book, p : Person |\n l.sorting_in = b implies not b.lent_to = p\n}\n\nfact NoSelfContinuation {\n all b: Book | b.continuation_of != b // A book is not allowed to be its own continuation\n}\n\nfact UniqueContinuation {\n all disj b1, b2: Book | b1.continuation_of != b2.continuation_of // One book can't have more than one continuation\n}\n\n\n// PRED - wont rent when dislikes\npred ThereIsNoLibrarian{\n no Librarian\n}\n\npred DontRentOnDislike {\n all p : Person | all b : Book | p.dislikes = b implies not b.lent_to = p\n}\n\n// PRED wont lent to librarian?\n\n// PRED - Acyclic continuation\n\nrun ThereIsNoLibrarian\nrun DontRentOnDislike", "permalink": "flirt-utmost-hankie-chain", "time": "2023-12-03 16:44:24.605740", "cmd": 1} {"id": 7799, "parent": 7798, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\nsig Person {\n likes: set Book,\n dislikes: set Book,\n}\n\n\nsome sig Librarian extends Person {\n recommends: set Book,\n sorting_in: lone Book, \n}\n\nsig Book {\n lent_to: lone Person, // if not sorting_in and not \n continuation_of: lone Book\n}\n\nsome sig Shelf {\n holds: set Book, // books which are not reserved and not in process\n assigned_to: one Librarian\n}\n\nfact ExclusiveLikesDislikes {\n all p: Person |\n p.likes & p.dislikes = none // No book should be both liked and disliked by the same person\n}\n\nfact LibrarianRules {\n all l: Librarian |\n l.dislikes & l.recommends = none\n\n}\n\nfact NoLendingWhileSortingIn {\n all l: Librarian, b: Book, p : Person |\n l.sorting_in = b implies not b.lent_to = p\n}\n\nfact NoSelfContinuation {\n all b: Book | b.continuation_of != b // A book is not allowed to be its own continuation\n}\n\nfact UniqueContinuation {\n all disj b1, b2: Book | b1.continuation_of != b2.continuation_of // One book can't have more than one continuation\n}\n\n\n// PRED - wont rent when dislikes\npred ThereIsNoLibrarian{\n no Librarian\n}\n\npred DontRentOnDislike {\n all p : Person | all b : Book | p.dislikes = b implies not b.lent_to = p\n}\n\n// PRED wont lent to librarian?\n\n// PRED - Acyclic continuation\n\nrun ThereIsNoLibrarian\nrun DontRentOnDislike", "permalink": "gaming-shape-crazy-small", "time": "2023-12-03 16:44:29.106462", "cmd": 2} {"id": 7808, "parent": 7727, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all p: Protected | one t: Trash | p not in t and p.link not in t and t.link not in p\n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | one t: Trash |\n \n all f: File |\n f not in p implies (f in t)\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n one f: File| all fAll: File |\n f in fAll.link \n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n all f : File | f.link.*link = f && f not in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "haste-cover-hasty-scouts", "time": "2023-12-03 18:00:29.647092", "cmd": 7} {"id": 7809, "parent": 7727, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all p: Protected | one t: Trash | p not in t and p.link not in t and t.link not in p\n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | one t: Trash |\n \n all f: File |\n f not in p implies (f in t)\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n one f: File| all fAll: File |\n f in fAll.link \n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n all f : File | not (f.*link = none) implies f not in Trash\n}\n\nrun inv7\n\n\n/* There are no links. */\npred inv8 {\n all f : File | f.link = none\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n all f : File | not (f.link = none) implies f.link.link = none\n // TODO\n}\n\nrun inv9\n\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n all f1, f2: File | f1 -> f2 in link implies Trash = f1 + f2\n}\nrun inv10", "permalink": "flirt-fame-malt-steep", "time": "2023-12-03 19:14:01.934619", "cmd": 10} {"id": 7816, "parent": 7815, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\nsig Person {\n likes: set Book,\n dislikes: set Book,\n}\n\n\nsome sig Librarian extends Person {\n recommends: set Book,\n sorting_in: lone Book, \n}\n\nsig Book {\n lent_to: lone Person, // if not sorting_in and not \n continuation_of: lone Book\n}\n\nsome sig Shelf {\n holds: set Book, // books which are not reserved and not in process\n assigned_to: one Librarian\n}\n\nfact ExclusiveLikesDislikes {\n all p: Person |\n p.likes & p.dislikes = none // No book should be both liked and disliked by the same person\n}\n\nfact LibrarianRules {\n all l: Librarian |\n l.dislikes & l.recommends = none\n}\n\nfact NoLendingWhileSortingIn {\n all l: Librarian, b: Book, p : Person |\n l.sorting_in = b implies not b.lent_to = p\n}\n\nfact NoSelfContinuation {\n all b: Book | b.continuation_of != b // A book is not allowed to be its own continuation\n}\n\nfact UniqueContinuation {\n all disj b1, b2: Book | b1.continuation_of != b2.continuation_of // One book can't have more than one continuation\n}\n\nfact NoBookInMoreThanOneShelf {\n all disj sh1, sh2: Shelf | all b : Book | sh1.holds = b && sh2.holds != b \n}\n\npred ThereIsNoLibrarian{\n no Librarian\n}\n\npred DontRentOnDislike {\n all p : Person | all b : Book | p.dislikes = b implies not b.lent_to = p\n}\n\n// PRED - Acyclic continuation\n\nrun ThereIsNoLibrarian\nrun DontRentOnDislike", "permalink": "false-payer-prior-watch", "time": "2023-12-04 07:09:46.831570", "cmd": 2} {"id": 7821, "parent": 6739, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\nrun {}", "permalink": "clump-mardi-gloss-cackle", "time": "2023-12-04 19:10:21.809808", "cmd": 1} {"id": 7543, "parent": 7542, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n one x: Person | Agatha in x.killed \n \n all x: Person | all y: Person | \n (y in x.killed) implies \n (y in x.hates and not y in x.richer) \n\n all x: Person | (x in Agatha.hates) implies (not x in Charles.hates) \n\n Agatha in Agatha.hates and Charles in Agatha.hates \n\n all x: Person | (not Agatha in x.richer) implies (Butler in x.hates) \n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates) \n\n all x: Person | one y: Person | (not y in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "royal-liable-quote-stucco", "time": "2023-12-02 07:08:18.333363", "cmd": 1} {"id": 7548, "parent": 7547, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\nassert puzzle {\n some x: Person | Agatha in x.killed \n \n all x,y: Person | \n (y in x.killed) implies \n (y in x.hates and not y in x.richer) \n\n all x: Person | (x in Agatha.hates) implies (not x in Charles.hates) \n\n Agatha in Agatha.hates and Charles in Agatha.hates \n\n all x: Person | (not Agatha in x.richer) implies (Butler in x.hates) \n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates) \n\n all x: Person | some y: Person | (not y in x.hates)\n // TODO Implement the constraints here\n}\n\ncheck puzzle", "permalink": "factor-swept-quiet-ship", "time": "2023-12-02 07:12:25.319172", "cmd": 1} {"id": 7551, "parent": 7550, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash.link \n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "sphinx-mocker-sassy-taps", "time": "2023-12-02 07:23:08.132992", "cmd": 1} {"id": 7562, "parent": 7561, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: Files| f in Trash.link\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n all f: \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "street-gag-stung-broom", "time": "2023-12-02 07:31:43.761241", "cmd": 2} {"id": 7563, "parent": 7562, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: Files | f in Trash.link\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n all f: \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "glitzy-streak-gawk-apron", "time": "2023-12-02 07:32:00.386447", "cmd": 2} {"id": 7567, "parent": 7566, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | some t: Trash | f in t.link \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "recent-race-booth-trio", "time": "2023-12-02 07:41:11.871930", "cmd": 2} {"id": 7572, "parent": 7571, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | all t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n all f: File | some t: Trash | f in t.link \n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "math-editor-awry-yard", "time": "2023-12-02 08:56:13.001211", "cmd": 2} {"id": 7601, "parent": 7600, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\n// Define the predicate that represents the puzzle constraints\npred puzzle {\n // Someone who lived in Dreadbury Mansion killed Aunt Agatha\n some x: Person | Agatha in x.killed\n \n // Agatha, the Butler, and Charles were the only people who lived in Dreadbury Mansion.\n // This is implicit in the model by declaring them as the only sigs extending Person.\n \n // A killer always hates their victim, and is never richer than their victim.\n all x, y: Person | y in x.killed implies (y in x.hates and not (y in x.richer))\n \n // Charles hates no one that Aunt Agatha hates.\n no x: Person | x in Agatha.hates implies x in Charles.hates\n \n // Agatha hates everyone except the Butler.\n all x: Person - Butler | x in Agatha.hates\n no x: Person | x in Butler.hates\n \n // The Butler hates everyone not richer than Aunt Agatha.\n all x: Person | not (x in Agatha.richer) implies x in Butler.hates\n \n // The Butler also hates everyone Agatha hates.\n all x: Person | x in Agatha.hates implies x in Butler.hates\n \n // No one hates everyone.\n no p: Person | hates[p] = Person\n \n // Agatha is not the Butler.\n // This is implicit in the model because Agatha and Butler are declared as separate sigs.\n}\n\n// Run the puzzle predicate to find a solution\nrun puzzle for 3", "permalink": "clutch-purist-unfold-wife", "time": "2023-12-02 13:23:24.847204", "cmd": 1} {"id": 7606, "parent": 7604, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {\n // Agatha, the Butler, and Charles are not richer than themselves\n not (this in this.richer)\n}\n\n// Define the predicate that represents the puzzle constraints\npred puzzle {\n // Someone who lived in Dreadbury Mansion killed Aunt Agatha\n some x: Person - Agatha | Agatha in x.killed\n \n // A killer always hates their victim, and is never richer than their victim.\n all x, y: Person | y in x.killed implies (y in x.hates and not (y in x.richer))\n \n // Charles hates no one that Aunt Agatha hates.\n all x: Person | x in Agatha.hates implies not (x in Charles.hates)\n \n // Agatha hates everyone except the Butler.\n all x: Person - Butler | x in Agatha.hates\n not (Butler in Agatha.hates)\n \n // The Butler hates everyone not richer than Aunt Agatha.\n all x: Person - Agatha | not (x in Agatha.richer) implies x in Butler.hates\n \n // The Butler also hates everyone Agatha hates.\n all x: Person | x in Agatha.hates implies x in Butler.hates\n \n // No one hates everyone.\n no p: Person | hates[p] = Person\n \n // Additional facts to ensure consistency\n // Agatha is not richer than Butler and Charles\n not (Butler in Agatha.richer)\n not (Charles in Agatha.richer)\n \n // Agatha did not kill herself\n not (Agatha in Agatha.killed)\n}\n\n// Run the puzzle predicate to find a solution\nrun puzzle for exactly 1 Agatha, exactly 1 Butler, exactly 1 Charles", "permalink": "recess-putt-blurt-babied", "time": "2023-12-02 13:27:45.187267", "cmd": 1} {"id": 7609, "parent": 7608, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // TODO Implement the constraints here\n // some x : Person | Agatha in x.killed\n Agatha in Person.killed\n}\n\nrun puzzle", "permalink": "okay-chain-clock-sultry", "time": "2023-12-02 13:45:30.293292", "cmd": 1} {"id": 7618, "parent": 7617, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // TODO Implement the constraints here\n some x : Person | Agatha in x.killed\n\n all x,y: Person | (y in x.killed implies (y in x.hates and not y in x.richer))\n\n all x: Person | (x in Agatha.hates implies not x in Charles.hates)\n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates)\n\n\n\n}\n\nrun puzzle", "permalink": "surely-quail-hurray-recede", "time": "2023-12-02 14:13:44.866182", "cmd": 1} {"id": 7620, "parent": 7619, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // TODO Implement the constraints here\n some x : Person | Agatha in x.killed\n\n all x,y: Person | (y in x.killed implies (y in x.hates and not y in x.richer))\n\n all x: Person | (x in Agatha.hates implies not x in Charles.hates)\n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates)\n\n all x : Person | (not Agatha in x.richer implies x in Butler.hates)\n\n all x:Person | (x in Agatha.hates implies x in Butler.hates)\n\n}\n\nrun puzzle", "permalink": "elite-screen-unripe-silly", "time": "2023-12-02 14:21:12.245761", "cmd": 1} {"id": 7625, "parent": 7624, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\n\nsig Worker {\n \n}\n\n\nabstract sig Day{ } \nsig Monday, Tuesday, Wednesday, Thurstday, Friday {}\n\nrun {}", "permalink": "swan-oink-spleen-omen", "time": "2023-12-02 14:41:49.988447", "cmd": 1} {"id": 7628, "parent": 7627, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\n\nsig Worker {\n associated_with: Schedule,\n}\n\nsig Schedule {\n workingDays: \n}\n\n\nabstract sig Day{} \nsig Monday, Tuesday, Wednesday, Thurstday, Friday {}\n\nfact {\n all a : Worker | one a.associated_with\n}\n\n\nrun {}", "permalink": "revert-pond-sprain-bats", "time": "2023-12-02 14:45:47.277933", "cmd": 1} {"id": 7629, "parent": 7628, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\n\nsig Worker {\n associated_with: Schedule,\n}\n\nsig Schedule {\n workingDays: set Day\n}\n\n\nabstract sig Day{} \nsig Monday, Tuesday, Wednesday, Thurstday, Friday {}\n\nfact {\n all a : Worker | one a.associated_with\n}\n\n\nrun {}", "permalink": "dreamt-sludge-dealt-mammal", "time": "2023-12-02 14:46:35.917265", "cmd": 1} {"id": 7631, "parent": 7297, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "aids-caress-cheer-exit", "time": "2023-12-02 14:48:00.662214", "cmd": 1} {"id": 7633, "parent": 7632, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "kept-lark-trunks-limes", "time": "2023-12-02 15:03:25.636114", "cmd": 1} {"id": 7636, "parent": 7635, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all x: File | x in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some x: File | x in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all x: Protected | x not in Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "ogle-abacus-baffle-unroll", "time": "2023-12-02 15:23:55.584259", "cmd": 4} {"id": 7639, "parent": 7638, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all x: File | x in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some x: File | x in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all x: Protected | x not in Trash\n \n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all x: not Protected | x in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "plasma-sleeve-catchy-catnap", "time": "2023-12-02 15:26:22.805186", "cmd": 5} {"id": 7641, "parent": 7640, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all x: File | x in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some x: File | x in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all x: Protected | x not in Trash\n \n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all x: Files| x not in Protected implies x in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "outage-circle-crafty-manor", "time": "2023-12-02 15:29:53.176105", "cmd": 5} {"id": 7642, "parent": 7641, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all x: File | x in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some x: File | x in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all x: Protected | x not in Trash\n \n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all x: File| x not in Protected implies x in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "mooing-mumble-tanned-drew", "time": "2023-12-02 15:30:00.554267", "cmd": 5} {"id": 7647, "parent": 7645, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all x: File | x in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some x: File | x in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all x: Protected | x not in Trash\n \n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all x: File| (x not in Protected implies x in Trash)\n\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n all x: File | lone x.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "sacred-gone-frisk-gravy", "time": "2023-12-02 15:36:58.729738", "cmd": 6} {"id": 7648, "parent": 7647, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all x: File | x in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some x: File | x in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all x: Protected | x not in Trash\n \n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all x: File| (x not in Protected implies x in Trash)\n\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n all x: File | lone x.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n all x: File |(x.link implies not x in Trash)\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "bottle-clone-boil-lend", "time": "2023-12-02 15:39:12.226331", "cmd": 7} {"id": 7649, "parent": 7648, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all x: File | x in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some x: File | x in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all x: Protected | x not in Trash\n \n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all x: File| (x not in Protected implies x in Trash)\n\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n all x: File | lone x.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n all x: File |(all x.link implies not x in Trash)\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "deepen-revise-pummel-till", "time": "2023-12-02 15:39:43.975841", "cmd": 7} {"id": 7659, "parent": 7658, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all x: File | x in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some x: File | x in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all x: Protected | x not in Trash\n\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all x: File| (x not in Protected implies x in Trash)\n\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n all x: File | lone x.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n no x: File | some x.link implies x not in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "audio-unclog-cone-glider", "time": "2023-12-02 15:52:45.622303", "cmd": 7} {"id": 7660, "parent": 7659, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all x: File | x in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some x: File | x in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all x: Protected | x not in Trash\n\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all x: File| (x not in Protected implies x in Trash)\n\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n all x: File | lone x.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n no x: File | some x.link implies x not in Trash\n \n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "monday-tassel-plod-dress", "time": "2023-12-02 15:52:59.897354", "cmd": 7} {"id": 7662, "parent": 7661, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all x: File | x in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some x: File | x in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all x: Protected | x not in Trash\n\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all x: File| (x not in Protected implies x in Trash)\n\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n all x: File | lone x.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n no x: File | some x.link implies x not in Trash\n\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n all x : File | no x.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "elude-herbs-alto-regime", "time": "2023-12-02 15:55:16.702377", "cmd": 8} {"id": 7668, "parent": 7667, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\n\nsig Worker {\n hasSchedule: Schedule,\n}\n\nsig Schedule {\n workingDays: set Day\n}\n\nabstract sig Day{\n name : String,\n previousDay: Day,\n nextDay: Day,\n \n} \nsig Monday extends Day{\n name = \"Monday\",\n previousDay = Monday,\n nextDay = Monday\n}\n\n\nrun {}", "permalink": "prance-chant-wages-crook", "time": "2023-12-02 16:04:52.554789", "cmd": 1} {"id": 7670, "parent": 7669, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all x: File | x in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some x: File | x in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all x: Protected | x not in Trash\n\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all x: File| (x not in Protected implies x in Trash)\n\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n all x: File | lone x.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n no x: File | some x.link implies x not in Trash\n\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n all x : File | no x.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n all x: File | some x.link implies no (x.link).link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n all x,y: File | (no y.link implies x in Trash)\n}\n\nrun inv10", "permalink": "audio-mammal-tripod-shifty", "time": "2023-12-02 16:05:19.344015", "cmd": 10} {"id": 7673, "parent": 7671, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\n\nsig Worker {\n hasSchedule: Schedule,\n}\n\nsig Schedule {\n workingDays: set Day\n}\n\nabstract sig Day{\n name : String,\n \n} \nsig Monday extends Day{\n name = \"Monday\",\n\n}\n\n\nrun {}", "permalink": "each-hamlet-annex-ruby", "time": "2023-12-02 16:06:37.778981", "cmd": 1} {"id": 7677, "parent": 7676, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\n\nsig Worker {\n associated_with: Schedule,\n}\n\nsig Schedule {\n workingDays: set Day\n}\n\nabstract sig Day{\n name : String,\n previousDay: Day,\n nextDay: Day,\n \n} \nsig Monday, Tuesday, Wednesday, Thurstday, Friday extends Day {}\n\nfact {\n all a : Worker | one a.associated_with\n}\n\n\nrun {}", "permalink": "femur-wreath-step-deeply", "time": "2023-12-02 16:08:29.058184", "cmd": 1} {"id": 7690, "parent": 6737, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {all a : Assignment | one a.associated_with}\n\n// Predicate PolicyAllowsGrading defines the policy for allowing grading of an Assignment by a Person.\npred PolicyAllowsGrading(p: Person, a: Assignment) {\n p in a.associated_with.assistant or p in a.associated_with.instructor\n}\n\n// Assert NoOneCanGradeTheirOwnAssignment checks that no Person can grade their own Assignment.\nassert NoOneCanGradeTheirOwnAssignment {\n all p : Person, a : Assignment |\n PolicyAllowsGrading[p, a] implies not p in a.assigned_to\n}\n\ncheck NoOneCanGradeTheirOwnAssignment for 2", "permalink": "prone-lived-skiing-amused", "time": "2023-12-02 17:02:39.275669", "cmd": 1} {"id": 7691, "parent": 7690, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {all a : Assignment | one a.associated_with}\n\n// Predicate PolicyAllowsGrading defines the policy for allowing grading of an Assignment by a Person.\npred PolicyAllowsGrading(p: Person, a: Assignment) {\n p in a.associated_with.assistant or p in a.associated_with.instructor\n}\n\n// Assert NoOneCanGradeTheirOwnAssignment checks that no Person can grade their own Assignment.\nassert NoOneCanGradeTheirOwnAssignment {\n all p : Person, a : Assignment |\n PolicyAllowsGrading[p, a] implies not p in a.assigned_to\n}\n\ncheck NoOneCanGradeTheirOwnAssignment for 2", "permalink": "yield-payer-fling-ought", "time": "2023-12-02 17:03:10.804721", "cmd": 1} {"id": 7692, "parent": 6744, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "bubbly-erupt-impish-revert", "time": "2023-12-02 18:56:44.618171", "cmd": 1} {"id": 7698, "parent": 7697, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n// Signatures\nabstract sig Person {\n name: one Name,\n email: one Email\n}\n\nsig Name, Email {}\n\nsig Attendee extends Person {\n sessionsAttending: set Session\n}\n\nsig Presenter extends Person {\n talksGiven: set Talk\n}\n\nsig Talk {\n title: one Title,\n abstract: one Abstract,\n session: one Session\n}\n\nsig Title, Abstract {}\n\nsig Session {\n scheduledTalks: set Talk,\n attendingMembers: set Attendee\n}\n\n// Facts\nfact eachTalkBelongsToOneSession {\n all t: Talk | one s: Session | t in s.scheduledTalks\n}\n\nfact presentersGiveTalksInSessionsTheyAttend {\n all p: Presenter | all t: p.talksGiven | p in t.session.attendingMembers\n}\n\n// Predicates\npred isPresenterAtSession[s: Session, p: Presenter] {\n p in s.attendingMembers and some p.talksGiven & s.scheduledTalks\n}\n\npred attendeeAttendsAllSessions[a: Attendee] {\n a.sessionsAttending = Session\n}\n\n// Run commands\nrun isPresenterAtSession for 4 but exactly 1 Session, exactly 2 Presenter // Likely unsatisfiable if we have more than one session\nrun attendeeAttendsAllSessions for 3 but exactly 1 Attendee, exactly 2 Session // Satisfiable if the attendee is attending all sessions\n\n\n\nrun {}", "permalink": "shelve-steam-ruckus-ferry", "time": "2023-12-03 00:00:03.770083", "cmd": 1} {"id": 7699, "parent": 7058, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures: Person, Librarian, Student, Name, Book, Title, Membership\n\n// Person\nsig Person{\n name: one Name\n}\n\n// Name\nsig Name{}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n available: one Bool\n}\n\n// Title\nsig Title{}\n\n// Membership\nsig Membership{}\n\n\n\n\n\nrun {}", "permalink": "extent-widely-remote-scouts", "time": "2023-12-03 00:22:19.571378", "cmd": 1} {"id": 7710, "parent": 7709, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures: Person, Librarian, Student, Name, Book, Title, Membership\n\n// Person\nsig Person{\n name: one Name\n}\n\n// Name\nsig Name{}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// Title\nsig Title{}\n\n// Membership\nsig Membership{}\n\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists \n", "permalink": "wham-catty-gore-rake", "time": "2023-12-03 00:48:15.298782", "cmd": 1} {"id": 7713, "parent": 7712, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures: Person, Librarian, Student, Name, Book, Title, Membership\n\n// Person\nsig Person{\n name: one Name\n}\n\n// Name\nsig Name{}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// Title\nsig Title{}\n\n// Membership\nsig Membership{}\n\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists \n", "permalink": "relive-bust-area-await", "time": "2023-12-03 00:58:13.332502", "cmd": 2} {"id": 7715, "parent": 7714, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures: Person, Librarian, Student, Name, Book, Title, Membership\n\n// Person\nsig Person{\n name: one Name,\n email: One Email\n}\n\n// Name\nsig Name{}\n\n// Email\nsig Email{}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n department: one Department\n \n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// Title\nsig Title{}\n\n// Membership\nsig Membership{}\n\n// Department\nsig Department {}\n\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists ", "permalink": "dizzy-pleat-region-screen", "time": "2023-12-03 01:05:11.347746", "cmd": 2} {"id": 7740, "parent": 7739, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all p: Protected | all t: Trash | \n p not in t and p not in t.link and t not in p.link \n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | all t: Trash | all f: File |\n f in p iff not f in t and\n f not in p implies (f in t or f in t.link)\n \n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n one f: File| all fAll: File |\n f in fAll.link \n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "blame-cosmos-aloe-legged", "time": "2023-12-03 07:58:24.050957", "cmd": 5} {"id": 7757, "parent": 7756, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nsig Person{\n name: one Name,\n email: one Email\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n department: one Department\n \n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// // Name\n// sig Name{}\n\n// // Email\n// sig Email{}\n\n// // Title\n// sig Title{}\n\n// // Membership\n// sig Membership{}\n\n// // Department\n// sig Department {}\n// Name\nsig Name {\n value: one String // added field\n}\n\n// Email\nsig Email {\n address: one String // added field\n}\n\n// Title\nsig Title {\n name: one String // added field\n}\n\n// Membership\nsig Membership {\n type: one MembershipType, // added field\n validUntil: one Date // added field\n}\n\n// Author\nsig Author {\n name: one Name, // added field\n publishedBooks: set Book // added field\n}\n\n// Department\nsig Department {\n head: one Librarian, // added field\n courses: set Course // added field\n}\n\n// Course\nsig Course {\n name: one String, // added field\n enrolledStudents: set Student // added field\n}\n\n// Date (to represent dates)\nsig Date {\n year: one Int,\n month: one Int,\n day: one Int\n}\n\n// MembershipType\nsig MembershipType {\n name: one String, // added field\n benefits: set String // added field\n}\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "sedate-cider-romp-blazer", "time": "2023-12-03 13:25:45.323110", "cmd": 1} {"id": 7759, "parent": 7758, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nsig Person{\n name: one Name,\n email: one Email\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n department: one Department\n \n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// // Name\n// sig Name{}\n\n// // Email\n// sig Email{}\n\n// // Title\n// sig Title{}\n\n// // Membership\n// sig Membership{}\n\n// // Department\n// sig Department {}\n// Name\nsig Name {\n value: one String // added field\n}\n\n// Email\nsig Email {\n address: one String // added field\n}\n\n// Title\nsig Title {\n name: one String // added field\n}\n\n// Membership\nsig Membership {\n type: one MembershipType, // added field\n validUntil: one Date // added field\n}\n\n// Author\nsig Author {\n name: one Name, // added field\n publishedBooks: set Book // added field\n}\n\n// Department\nsig Department {\n head: lone Librarian, // added field\n courses: set Course // added field\n}\n\n// Course\nsig Course {\n name: one String, // added field\n enrolledStudents: set Student // added field\n}\n\n// Date (to represent dates)\nsig Date {\n year: one Int,\n month: one Int,\n day: one Int\n}\n\n// MembershipType\nsig MembershipType {\n name: one String, // added field\n benefits: set String // added field\n}\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "ditzy-cozy-prong-supper", "time": "2023-12-03 13:27:02.060205", "cmd": 2} {"id": 7762, "parent": 7761, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nsig Person{\n name: one Name,\n email: one Email\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n department: one Department\n \n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// // Name\n// sig Name{}\n\n// // Email\n// sig Email{}\n\n// // Title\n// sig Title{}\n\n// // Membership\n// sig Membership{}\n\n// // Department\n// sig Department {}\n// Name\nsig Name {\n value: one String // added field\n}\n\n// Email\nsig Email {\n address: one String // added field\n}\n\n// Title\nsig Title {\n name: one String // added field\n}\n\n// Membership\nsig Membership {\n type: one MembershipType, // added field\n validUntil: one Date // added field\n}\n\n// Author\nsig Author {\n name: one Name, // added field\n publishedBooks: set Book // added field\n}\n\n// Department\nsig Department {\n head: one Librarian, // added field\n courses: set Course // added field\n}\n\n// Course\nsig Course {\n name: one String, // added field\n enrolledStudents: set Student // added field\n}\n\n// Date (to represent dates)\nsig Date {\n year: one Int,\n month: one Int,\n day: one Int\n}\n\n// MembershipType\nsig MembershipType {\n name: one String, // added field\n benefits: set String // added field\n}\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "shabby-flint-purify-hug", "time": "2023-12-03 13:27:59.001918", "cmd": 2} {"id": 7765, "parent": 7764, "code": "// University Library Management System\n// Signatures\n\n// Person\nsig Person {\n name: String,\n email: String\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person {\n managedBooks: set Book,\n departmentId: Int // Department represented as an integer\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person {\n membershipStatus: Int, // Membership status represented as an integer\n borrowedBooks: set Book\n}\n\n// Book\nsig Book {\n title: String,\n availability: Int // Availability status as an integer (0 or 1)\n}\n\n// Facts\n// A student without membership cannot borrow books\nfact studentWithoutMembershipCannotBorrowBooks {\n all s: Student | s.membershipStatus = 0 implies no s.borrowedBooks\n}\n\n// Borrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing {\n all b: Book | some s: Student | b in s.borrowedBooks implies b.availability = 0\n}\n\n// Predicates\n// Check if someone has borrowed a book\npred someoneHasBorrowedABook {\n some s: Student | some s.borrowedBooks\n}\n\n// Check if at least one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// Run commands\n// The first run command should be unsatisfiable\nrun someoneHasBorrowedABook for 5 but 0 MembershipStatus\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists for 5", "permalink": "anyone-napped-rift-kelp", "time": "2023-12-03 13:33:09.921240", "cmd": 2} {"id": 7767, "parent": 7720, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nsig Person{\n name: one Name,\n email: one Email\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n department: one Department\n \n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// Name\nsig Name{\n firstname: String\n lastName: String\n}\n\n// Email\nsig Email{}\n\n// Title\nsig Title{}\n\n// Membership\nsig Membership{}\n\n// Department\nsig Department {}\n\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "slurp-blurry-mosaic-basis", "time": "2023-12-03 13:34:52.486434", "cmd": 1} {"id": 7770, "parent": 7720, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nabstract sig Person{\n name: one Name,\n email: one Email\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n department: one Department\n \n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// Name\nsig Name{}\n\n// Email\nsig Email{}\n\n// Title\nsig Title{}\n\n// Membership\nsig Membership{}\n\n// Department\nsig Department {}\n\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "gurgle-truce-specks-entrap", "time": "2023-12-03 13:38:18.014640", "cmd": 1} {"id": 7771, "parent": 7770, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nabstract sig Person{\n name: one Name,\n email: one Email\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n department: one Department\n \n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// Name\nsig Name{}\n\n// Email\nsig Email{}\n\n// Title\nsig Title{}\n\n// Membership\nsig Membership{}\n\n// Department\nsig Department {}\n\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "corral-dodgy-salad-pout", "time": "2023-12-03 13:38:20.814940", "cmd": 2} {"id": 7772, "parent": 7771, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nabstract sig Person{\n // name: one Name,\n // email: one Email\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n department: one Department\n \n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// Name\nsig Name{}\n\n// Email\nsig Email{}\n\n// Title\nsig Title{}\n\n// Membership\nsig Membership{}\n\n// Department\nsig Department {}\n\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "deck-comic-lapdog-museum", "time": "2023-12-03 13:38:30.576240", "cmd": 2} {"id": 7773, "parent": 7772, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nabstract sig Person{\n // name: one Name,\n // email: one Email\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n department: one Department\n \n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// // Name\n// sig Name{}\n\n// // Email\n// sig Email{}\n\n// Title\nsig Title{}\n\n// Membership\nsig Membership{}\n\n// Department\nsig Department {}\n\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "comma-sprain-outbid-uphold", "time": "2023-12-03 13:38:38.886773", "cmd": 2} {"id": 7775, "parent": 7774, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nabstract sig Person{\n // name: one Name,\n // email: one Email\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n department: one Department\n \n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// // Name\n// sig Name{}\n\n// // Email\n// sig Email{}\n\n// Title\nsig Title{}\n\n// Membership\nsig Membership{}\n\n// Department\nsig Department {}\n\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "chunk-gift-fence-chant", "time": "2023-12-03 13:38:43.721118", "cmd": 2} {"id": 7776, "parent": 7775, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nabstract sig Person{\n name: one String,\n email: one String\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n department: one Department\n \n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// // Name\n// sig Name{}\n\n// // Email\n// sig Email{}\n\n// Title\nsig Title{}\n\n// Membership\nsig Membership{}\n\n// Department\nsig Department {}\n\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "thing-jimmy-skier-patrol", "time": "2023-12-03 13:41:47.805292", "cmd": 2} {"id": 7793, "parent": 7792, "code": "// Car Rental Service Model\n\n// Vehicle\nabstract sig Vehicle {\n licensePlate: one LicensePlate,\n model: one Model\n}\n\n// Car extends Vehicle\nsig Car extends Vehicle {\n fuelType: one FuelType,\n availabilityStatus: one Availability\n}\n\n// Customer\nsig Customer {\n personalInfo: one PersonalInformation,\n rentedCars: set Car\n}\n\n// RentalContract\nsig RentalContract {\n customer: one Customer,\n cars: set Car,\n contractPeriod: one ContractPeriod\n}\n\n// Enhanced Signatures with Additional Fields\nsig LicensePlate {\n plateNumber: one PlateNumber,\n issuingAuthority: one IssuingAuthority\n}\n\nsig Model {\n modelName: one ModelName,\n manufacturer: one Manufacturer\n}\n\nsig FuelType {\n fuelTypeName: one FuelTypeName,\n octaneLevel: one OctaneLevel\n}\n\nsig PersonalInformation {\n firstName: one FirstName,\n lastName: one LastName\n}\n\n// Additional Signatures with Two Fields Each\nsig Manufacturer {\n name: String,\n location: String\n}\n\nsig Availability {\n status: String,\n condition: String\n}\n\nsig ContractPeriod {\n startDate: String,\n endDate: String\n}\n\nsig PlateNumber {\n number: String,\n series: String\n}\n\nsig IssuingAuthority {\n authorityName: String,\n region: String\n}\n\nsig ModelName {\n name: String,\n version: String\n}\n\nsig FuelTypeName {\n type: String,\n usage: String\n}\n\nsig OctaneLevel {\n level: String,\n rating: String\n}\n\nsig FirstName {\n first: String,\n middle: String\n}\n\nsig LastName {\n last: String,\n suffix: String\n}\n\n// Facts\n\n// A car can only be part of one rental contract at a time\nfact carUniqueToContract {\n all c1, c2: RentalContract | no c1.cars & c2.cars\n}\n\n// Only available cars can be rented\nfact onlyAvailableCarsCanBeRented {\n all c: Customer | all car: c.rentedCars | some a: Availability | a = car.availabilityStatus\n}\n\n// Predicates\n\n// Check if any customer has rented more than one car\npred customerRentedMoreThanOneCar {\n some c: Customer | #c.rentedCars > 1\n}\n\n// Check for existence of rental contracts with more than two cars\npred contractsWithManyCars {\n some rc: RentalContract | #rc.cars > 2\n}\n\n// Run commands\n\n// This should be unsatisfiable as only available cars can be rented\nrun customerRentedMoreThanOneCar for 5\n\n// This should be satisfiable and return at least 2 instances\nrun contractsWithManyCars for 5", "permalink": "gauze-envoy-tarot-zombie", "time": "2023-12-03 14:04:51.636006", "cmd": 2} {"id": 7796, "parent": 7766, "code": "// University Library Management System\n// Signatures\n\n// Person\nsig Person {\n name: String,\n email: String\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person {\n managedBooks: set Book,\n departmentId: Int // Department represented as an integer\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person {\n membershipStatus: Int, // Membership status represented as an integer\n borrowedBooks: set Book\n}\n\n// Book\nsig Book {\n title: String,\n availability: Int // Availability status as an integer (0 or 1)\n}\n\n// Facts\n// A student without membership cannot borrow books\nfact studentWithoutMembershipCannotBorrowBooks {\n all s: Student | s.membershipStatus = 0 implies no s.borrowedBooks\n}\n\n// Borrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing {\n all b: Book | some s: Student | b in s.borrowedBooks implies b.availability = 0\n}\n\n// Predicates\n// Check if someone has borrowed a book\npred someoneHasBorrowedABook {\n some s: Student | some s.borrowedBooks\n}\n\n// Check if at least one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// Run commands\n// The first run command should be unsatisfiable\nrun someoneHasBorrowedABook for 5 but 0 MembershipStatus\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists for 5", "permalink": "streak-stole-moving-dense", "time": "2023-12-03 14:05:33.152456", "cmd": 2} {"id": 7812, "parent": 7811, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n}\n\nrun inv3\n\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all f : File | all p : Protected | all t : Trash | f in p implies not(f in t)\n} \nrun inv4\n\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all f: File | (f in Protected and not f in Trash) or (not f in Protected and f in Trash)\n}\n\nrun inv5\n\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n all f : File | lone f.link\n}\n\nrun inv6\n\n// Test\n\n\n/* No linked file is deleted. */\npred inv7 {\n all f : File | not (f.*link = none) implies f not in Trash\n}\n\nrun inv7\n\n\n/* There are no links. */\npred inv8 {\n all f : File | f.link = none\n}\n\nrun inv8\n\n\n/* A link does not link to another link. */\npred inv9 {\n all f : File | not (f.link = none) implies f.link.link = none\n // TODO\n}\n\nrun inv9\n\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n all f1, f2: File | f1 -> f2 in link implies Trash = f1 + f2\n}\nrun inv10", "permalink": "wired-cache-smock-java", "time": "2023-12-03 20:29:02.328837", "cmd": 10} {"id": 7814, "parent": 6965, "code": "one sig List { \n header: lone Node,\n} \n\nsig Node {\n link: lone Node,\n elem : Int\n}\n\nfact ordered {\n all n : Node | \n some n.link implies \n n.elem < n.link.elem\n}\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3", "permalink": "fit-wiry-justly-opal", "time": "2023-12-03 21:20:44.789377", "cmd": 1} {"id": 7817, "parent": 7812, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n}\n\nrun inv3\n\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all f : File | all p : Protected | all t : Trash | f in p implies not(f in t)\n} \nrun inv4\n\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all f: File | (f in Protected and not f in Trash) or (not f in Protected and f in Trash)\n}\n\nrun inv5\n\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n all f : File | lone f.link\n}\n\nrun inv6\n\n// Test\n\n\n/* No linked file is deleted. */\npred inv7 {\n all f : File | not (f.*link = none) implies f not in Trash\n}\n\nrun inv7\n\n\n/* There are no links. */\npred inv8 {\n all f : File | f.link = none\n}\n\nrun inv8\n\n\n/* A link does not link to another link. */\npred inv9 {\n all f : File | not (f.link = none) implies f.link.link = none\n // TODO\n}\n\nrun inv9\n\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n all f1, f2: File | f1 -> f2 in link implies Trash = f1 + f2\n}\nrun inv10", "permalink": "steed-gotten-tint-prelaw", "time": "2023-12-04 07:11:04.729417", "cmd": 10} {"id": 7557, "parent": 7556, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all t: Trash | all f: File | f in t.link \n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n all f: \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "rebate-phobia-ultra-upper", "time": "2023-12-02 07:29:18.599714", "cmd": 2} {"id": 7558, "parent": 7557, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all t: Trash | all f: File | f in t \n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n all f: \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "gout-pep-gray-hash", "time": "2023-12-02 07:29:27.119571", "cmd": 2} {"id": 7560, "parent": 7559, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: Files| f in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n all f: \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "arrive-omega-sweat-stage", "time": "2023-12-02 07:31:08.013305", "cmd": 2} {"id": 7561, "parent": 7560, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: Files| f in Trash.link\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n all f: \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "duke-quill-snowy-ought", "time": "2023-12-02 07:31:29.632169", "cmd": 2} {"id": 7564, "parent": 7563, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n \n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n all f: \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "rejoin-lumber-print-quail", "time": "2023-12-02 07:33:37.253031", "cmd": 2} {"id": 7568, "parent": 7567, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | all t: Trash | f in t.link \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "alarm-twenty-armory-ritzy", "time": "2023-12-02 07:41:46.665804", "cmd": 2} {"id": 7569, "parent": 7568, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | all t: Trash | f in t.link \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n all f: File | all t: Trash | f in t.link \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "civil-nanny-molar-angler", "time": "2023-12-02 07:42:05.946692", "cmd": 2} {"id": 7571, "parent": 7570, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | all t: Trash | f in t.link \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n all f: File | some t: Trash | f in t.link \n Trash\n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "jet-sample-babble-antsy", "time": "2023-12-02 07:44:38.198062", "cmd": 2} {"id": 7574, "parent": 7573, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "mumps-pep-used-slab", "time": "2023-12-02 08:57:33.630032", "cmd": 2} {"id": 7575, "parent": 7574, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "cornea-manger-tag-curfew", "time": "2023-12-02 08:59:05.539022", "cmd": 3} {"id": 7577, "parent": 7576, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all p: Protected | one t: Trash | no p in t\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "valid-stucco-thank-suffix", "time": "2023-12-02 09:00:55.826088", "cmd": 4} {"id": 7580, "parent": 7579, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all p: Protected | one t: Trash | p not in t\n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "engulf-baffle-simply-ground", "time": "2023-12-02 09:02:30.569679", "cmd": 4} {"id": 7583, "parent": 7582, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all p: Protected | one t: Trash | p not in t\n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | one t: Trash | all f: File |\n f in p implies p not in t\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "thee-spilt-half-petite", "time": "2023-12-02 09:05:33.156959", "cmd": 5} {"id": 7590, "parent": 7589, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n some p: Protected | one t: Trash | p not in t and p not in t.link and t not in p.link\n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | one t: Trash | all f: File |\n f in p implies (p not in t and p not in t.link)\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "dubbed-vista-phoney-wow", "time": "2023-12-02 09:12:39.536864", "cmd": 5} {"id": 7591, "parent": 7590, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n some p: Protected | one t: Trash | p not in t and p not in t.link and t not in p.link\n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | one t: Trash | all f: File |\n f in p implies (p not in t and p not in t.link)\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n one File: f| all File fAll |\n f in fAll.link \n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "fax-most-lid-most", "time": "2023-12-02 09:17:17.783422", "cmd": 5} {"id": 7592, "parent": 7591, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n some p: Protected | one t: Trash | p not in t and p not in t.link and t not in p.link\n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | one t: Trash | all f: File |\n f in p implies (p not in t and p not in t.link)\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n one File: f| all File: fAll |\n f in fAll.link \n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "nephew-zap-unify-kick", "time": "2023-12-02 09:17:25.586589", "cmd": 5} {"id": 7593, "parent": 7592, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n some p: Protected | one t: Trash | p not in t and p not in t.link and t not in p.link\n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | one t: Trash | all f: File |\n f in p implies (p not in t and p not in t.link)\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n one f: File| all fAll: File |\n f in fAll.link \n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "halved-oval-avenge-shut", "time": "2023-12-02 09:17:44.260849", "cmd": 5} {"id": 7602, "parent": 7601, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\n// Define the predicate that represents the puzzle constraints\npred puzzle {\n // Someone who lived in Dreadbury Mansion killed Aunt Agatha\n some x: Person | Agatha in x.killed\n \n // Agatha, the Butler, and Charles were the only people who lived in Dreadbury Mansion.\n // This is implicit in the model by declaring them as the only sigs extending Person.\n \n // A killer always hates their victim, and is never richer than their victim.\n all x, y: Person | y in x.killed implies (y in x.hates and not (y in x.richer))\n \n // Charles hates no one that Aunt Agatha hates.\n no x: Person | x in Agatha.hates implies x in Charles.hates\n \n // Agatha hates everyone except the Butler.\n all x: Person - Butler | x in Agatha.hates\n no x: Person | x in Butler.hates\n \n // The Butler hates everyone not richer than Aunt Agatha.\n all x: Person | not (x in Agatha.richer) implies x in Butler.hates\n \n // The Butler also hates everyone Agatha hates.\n all x: Person | x in Agatha.hates implies x in Butler.hates\n \n // No one hates everyone.\n no p: Person | hates[p] = Person\n \n // Agatha is not the Butler.\n // This is implicit in the model because Agatha and Butler are declared as separate sigs.\n}\n\n// Run the puzzle predicate to find a solution\nrun puzzle ", "permalink": "oxford-pauper-pang-glue", "time": "2023-12-02 13:23:29.161916", "cmd": 1} {"id": 7604, "parent": 7603, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {\n // Agatha, the Butler, and Charles are not richer than themselves\n not (this in this.richer)\n}\n\n// Define the predicate that represents the puzzle constraints\npred puzzle {\n // Someone who lived in Dreadbury Mansion killed Aunt Agatha\n some x: Person - Agatha | Agatha in x.killed\n \n // A killer always hates their victim, and is never richer than their victim.\n all x, y: Person | y in x.killed implies (y in x.hates and not (y in x.richer))\n \n // Charles hates no one that Aunt Agatha hates.\n all x: Person | x in Agatha.hates implies not (x in Charles.hates)\n \n // Agatha hates everyone except the Butler.\n all x: Person - Butler | x in Agatha.hates\n not (Butler in Agatha.hates)\n \n // The Butler hates everyone not richer than Aunt Agatha.\n all x: Person - Agatha | not (x in Agatha.richer) implies x in Butler.hates\n \n // The Butler also hates everyone Agatha hates.\n all x: Person | x in Agatha.hates implies x in Butler.hates\n \n // No one hates everyone.\n no p: Person | hates[p] = Person\n \n // Additional facts to ensure consistency\n // Agatha is not richer than Butler and Charles\n not (Butler in Agatha.richer)\n not (Charles in Agatha.richer)\n \n // Agatha did not kill herself\n not (Agatha in Agatha.killed)\n}\n// Run the puzzle predicate to find a solution\nrun puzzle for exactly 1 Agatha, exactly 1 Butler, exactly 1 Charles", "permalink": "wound-keg-sphere-polio", "time": "2023-12-02 13:25:35.370902", "cmd": 1} {"id": 7605, "parent": 7001, "code": "sig Guest {}\nsig Drunk in Guest {}\n\npred drinkers {\n some x : Guest |\n (x in Drunk implies \n all y : Guest | y in Drunk)\n}\n\nrun drinkers for 5", "permalink": "chubby-encode-cringe-cuddly", "time": "2023-12-02 13:27:08.046473", "cmd": 1} {"id": 7608, "parent": 7069, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // TODO Implement the constraints here\n some x : Person | Agatha in x.killed\n}\n\nrun puzzle", "permalink": "upbeat-seldom-easing-drove", "time": "2023-12-02 13:43:03.811180", "cmd": 1} {"id": 7610, "parent": 7609, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // TODO Implement the constraints here\n some x : Person | Agatha in x.killed\n}\n\nrun puzzle", "permalink": "haven-sage-idiocy-robin", "time": "2023-12-02 13:46:33.374731", "cmd": 1} {"id": 7612, "parent": 7611, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // TODO Implement the constraints here\n some x : Person | Agatha in x.killed\n\n all x,y: Person | (y in x.killed implies (y in x.hates and not y in x.richer))\n\n all x: Person | (x in Agatha.hates implies not x in Charles.hates)\n\n}\n\nrun puzzle", "permalink": "suffix-buffer-pox-oblong", "time": "2023-12-02 14:08:24.555770", "cmd": 1} {"id": 7613, "parent": 7612, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // TODO Implement the constraints here\n // some x : Person | Agatha in x.killed\n\n all x,y: Person | (y in x.killed implies (y in x.hates and not y in x.richer))\n\n all x: Person | (x in Agatha.hates implies not x in Charles.hates)\n\n}\n\nrun puzzle", "permalink": "remix-calm-fog-avid", "time": "2023-12-02 14:08:43.550365", "cmd": 1} {"id": 7617, "parent": 7616, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // TODO Implement the constraints here\n some x : Person | Agatha in x.killed\n\n all x,y: Person | (y in x.killed implies (y in x.hates and not y in x.richer))\n\n all x: Person | (x in Agatha.hates implies not x in Charles.hates)\n\n (Agatha in Agatha.hates) and Charles in Agatha.hates\n\n\n\n}\n\nrun puzzle", "permalink": "cash-broom-cupid-compel", "time": "2023-12-02 14:12:31.410395", "cmd": 1} {"id": 7621, "parent": 7620, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // TODO Implement the constraints here\n some x : Person | Agatha in x.killed\n\n all x,y: Person | (y in x.killed implies (y in x.hates and not y in x.richer))\n\n all x: Person | (x in Agatha.hates implies not x in Charles.hates)\n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates)\n\n all x : Person | (not Agatha in x.richer implies x in Butler.hates)\n\n all x:Person | (x in Agatha.hates implies x in Butler.hates)\n\n all x :Person | some y: Person | not y in x.hates\n}\n\nrun puzzle", "permalink": "dares-vest-ploy-dinghy", "time": "2023-12-02 14:22:34.695165", "cmd": 1} {"id": 7622, "parent": 7621, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // TODO Implement the constraints here\n // Constraint 1\n some x : Person | Agatha in x.killed\n\n // Constraint 2\n all x,y: Person | (y in x.killed implies (y in x.hates and not y in x.richer))\n\n // Constraint 3\n all x: Person | (x in Agatha.hates implies not x in Charles.hates)\n\n // Constraint 4\n (Agatha in Agatha.hates) and (Charles in Agatha.hates)\n\n // Constraint 5\n all x : Person | (not Agatha in x.richer implies x in Butler.hates)\n\n // Constraint 6\n all x:Person | (x in Agatha.hates implies x in Butler.hates)\n\n // Constraint 7\n all x :Person | some y: Person | not y in x.hates\n}\n\nrun puzzle", "permalink": "coil-lilac-clunky-rebuff", "time": "2023-12-02 14:26:06.780673", "cmd": 1} {"id": 7635, "parent": 7634, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all x: File | x in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some x: File | x in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "jaunt-petal-grower-visor", "time": "2023-12-02 15:14:10.367982", "cmd": 3} {"id": 7637, "parent": 7636, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all x: File | x in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some x: File | x in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n// all x: Protected | x not in Trash\n no Protected in Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "remake-envy-amiss-static", "time": "2023-12-02 15:24:28.908433", "cmd": 4} {"id": 7645, "parent": 7644, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all x: File | x in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some x: File | x in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all x: Protected | x not in Trash\n \n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all x: File| (x not in Protected implies x in Trash)\n\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n lone x: File | x.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "yen-chute-await-radial", "time": "2023-12-02 15:36:22.313765", "cmd": 6} {"id": 7650, "parent": 7649, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all x: File | x in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some x: File | x in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all x: Protected | x not in Trash\n \n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all x: File| (x not in Protected implies x in Trash)\n\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n all x: File | lone x.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n all x: File |(x.link implies x not in Trash)\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "octane-rash-crayon-salsa", "time": "2023-12-02 15:40:01.455495", "cmd": 7} {"id": 7661, "parent": 7660, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all x: File | x in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some x: File | x in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all x: Protected | x not in Trash\n\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all x: File| (x not in Protected implies x in Trash)\n\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n all x: File | lone x.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n no x: File | some x.link implies x not in Trash\n\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n no x : File | x.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "jersey-mumble-spongy-ended", "time": "2023-12-02 15:54:55.774669", "cmd": 8} {"id": 7665, "parent": 7664, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all x: File | x in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some x: File | x in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all x: Protected | x not in Trash\n\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all x: File| (x not in Protected implies x in Trash)\n\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n all x: File | lone x.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n no x: File | some x.link implies x not in Trash\n\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n all x : File | no x.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n all x: File | some x.link implies no (x.link).link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "april-parka-sprawl-pantry", "time": "2023-12-02 15:59:20.530391", "cmd": 9} {"id": 7667, "parent": 7666, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\n\nsig Worker {\n hasSchedule: Schedule,\n}\n\nsig Schedule {\n workingDays: set Day\n}\n\nabstract sig Day{\n name : String,\n previousDay: Day,\n nextDay: Day,\n \n} \nsig Monday, Tuesday, Wednesday, Thurstday, Friday extends Day {}\n\n\nrun {}", "permalink": "tarot-barbed-karma-scared", "time": "2023-12-02 16:03:47.907794", "cmd": 1} {"id": 7678, "parent": 7677, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\n\nsig Worker {\n associated_with: one Schedule,\n}\n\nsig Schedule {\n workingDays: set Day\n}\n\nabstract sig Day{\n name : String,\n previousDay: Day,\n nextDay: Day,\n \n} \nsig Monday, Tuesday, Wednesday, Thurstday, Friday extends Day {}\n\nfact {\n all a : Worker | one a.associated_with\n}\n\n\nrun {}", "permalink": "equate-raft-eats-able", "time": "2023-12-02 16:08:45.337289", "cmd": 1} {"id": 7681, "parent": 7680, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all x: File | x in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some x: File | x in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all x: Protected | x not in Trash\n\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all x: File| (x not in Protected implies x in Trash)\n\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n all x: File | lone x.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n// no x: File | some x.link implies x not in Trash\n all x,y: File | y in x.link implies x and y not in Trash\n\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n all x : File | no x.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n all x: File | some x.link implies no (x.link).link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n all x,y: File | x in y.link and y in Trash implies x in Trash\n}\n\nrun inv10", "permalink": "raking-nutmeg-getup-coping", "time": "2023-12-02 16:11:33.320949", "cmd": 7} {"id": 7682, "parent": 7681, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all x: File | x in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some x: File | x in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all x: Protected | x not in Trash\n\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all x: File| (x not in Protected implies x in Trash)\n\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n all x: File | lone x.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n// no x: File | some x.link implies x not in Trash\n all x,y: File | y in x.link implies y not in Trash\n\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n all x : File | no x.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n all x: File | some x.link implies no (x.link).link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n all x,y: File | x in y.link and y in Trash implies x in Trash\n}\n\nrun inv10", "permalink": "nebula-duh-cozily-chief", "time": "2023-12-02 16:11:44.664942", "cmd": 7} {"id": 7685, "parent": 7684, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\n\nsig Hierachy {\n root: lone GameComponent\n}\n\nsig GameComponent {\n associated_with = one Data\n}\n\nsig Data {\n associated_with: one GameComponent\n \n}\n\nsig Transform {\n}\n\n\nrun {}", "permalink": "askew-sanded-bok-earwig", "time": "2023-12-02 16:26:15.214135", "cmd": 1} {"id": 7686, "parent": 7685, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\n\nsig Hierachy {\n root: lone GameComponent\n}\n\nsig GameComponent {\n associated_with = one Data\n}\n\nsig Data {\n}\n\nsig Transform {\n}\n\n\nrun {}", "permalink": "luxury-getup-smudge-nearly", "time": "2023-12-02 16:26:40.881105", "cmd": 1} {"id": 7687, "parent": 7686, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\n\nsig Hierachy {\n root: lone GameComponent\n}\n\nsig GameComponent {\n associated_with = one Data,\n}\n\nsig Data {\n}\n\nsig Transform {\n}\n\n\nrun {}", "permalink": "slang-basil-unwind-depict", "time": "2023-12-02 16:26:56.636040", "cmd": 1} {"id": 7689, "parent": 7688, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nsig Hierachy {\n root: lone GameComponent\n}\n\nsig GameComponent {\n hasData: one Data\n}\n\nsig Data {\n}\n\nsig Transform {\n}\nrun {}", "permalink": "sudoku-feel-armory-levers", "time": "2023-12-02 16:55:15.891399", "cmd": 1} {"id": 7693, "parent": 7001, "code": "sig Guest {}\nsig Drunk in Guest {}\n\npred drinkers {\n some x : Guest |\n (x in Drunk implies \n all y : Guest | y in Drunk)\n}\n\nrun drinkers for 5", "permalink": "shrug-gift-oppose-ajar", "time": "2023-12-02 19:34:41.740225", "cmd": 1} {"id": 7696, "parent": 7695, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all x: File | x in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some x: File | x in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all x: File | x in Protected implies x not in Trash\n\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all x: File| (x not in Protected implies x in Trash)\n\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n all x: File | lone x.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n all x,y: File | y in x.link implies y not in Trash and x not in Trash\n\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n all x : File | no x.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n// all x: File | some x.link implies no (x.link).link\n all x: File | x.link implies no (x.link).link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n all x,y: File | x in y.link and y in Trash implies x in Trash\n}\n\nrun inv10", "permalink": "prewar-unworn-borax-upload", "time": "2023-12-02 21:09:32.584366", "cmd": 9} {"id": 7701, "parent": 7700, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures: Person, Librarian, Student, Name, Book, Title, Membership\n\n// Person\nsig Person{\n name: one Name\n}\n\n// Name\nsig Name{}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n available: one Bool\n}\n\n// Title\nsig Title{}\n\n// Membership\nsig Membership{}\n\n// Bool\nsig Bool{}\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n\n\n\n\nrun {}", "permalink": "paced-mutate-alike-jacket", "time": "2023-12-03 00:25:59.774941", "cmd": 1} {"id": 7707, "parent": 7706, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures: Person, Librarian, Student, Name, Book, Title, Membership\n\n// Person\nsig Person{\n name: one Name\n}\n\n// Name\nsig Name{}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// Title\nsig Title{}\n\n// Membership\nsig Membership{}\n\n\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\nrun atLeastOneLibrarianExists \n\n\nrun {}", "permalink": "repent-player-untidy-grudge", "time": "2023-12-03 00:46:54.399157", "cmd": 1} {"id": 7712, "parent": 7711, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures: Person, Librarian, Student, Name, Book, Title, Membership\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// Person\nsig Person{\n name: one Name\n}\n\n// Name\nsig Name{}\n\n\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book\n}\n\n\n\n// Title\nsig Title{}\n\n// Membership\nsig Membership{}\n\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists \n", "permalink": "panic-mashed-debunk-winter", "time": "2023-12-03 00:54:24.858903", "cmd": 2} {"id": 7717, "parent": 7716, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures: Person, Librarian, Student, Name, Book, Title, Membership\n\n// Person\nsig Person{\n name: one Name,\n email: one Email\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n department: one Department\n \n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// Name\nsig Name{}\n\n// Email\nsig Email{}\n\n// Title\nsig Title{}\n\n// Membership\nsig Membership{}\n\n// Department\nsig Department {}\n\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists ", "permalink": "denote-willed-lumber-tree", "time": "2023-12-03 01:07:14.293377", "cmd": 2} {"id": 7718, "parent": 7717, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures: Person, Librarian, Student, Name, Book, Title, Membership\n\n// Person\nsig Person{\n name: one Name,\n email: one Email\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n department: one Department\n \n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// Name\nsig Name{}\n\n// Email\nsig Email{}\n\n// Title\nsig Title{}\n\n// Membership\nsig Membership{}\n\n// Department\nsig Department {}\n\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists ", "permalink": "sprint-willed-slick-pretty", "time": "2023-12-03 01:07:20.853410", "cmd": 1} {"id": 7719, "parent": 7718, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nsig Person{\n name: one Name,\n email: one Email\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n department: one Department\n \n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// Name\nsig Name{}\n\n// Email\nsig Email{}\n\n// Title\nsig Title{}\n\n// Membership\nsig Membership{}\n\n// Department\nsig Department {}\n\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists ", "permalink": "tycoon-shrubs-paper-bulgur", "time": "2023-12-03 01:11:09.388599", "cmd": 1} {"id": 7720, "parent": 7719, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nsig Person{\n name: one Name,\n email: one Email\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n department: one Department\n \n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// Name\nsig Name{}\n\n// Email\nsig Email{}\n\n// Title\nsig Title{}\n\n// Membership\nsig Membership{}\n\n// Department\nsig Department {}\n\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists ", "permalink": "henna-itunes-smudgy-moody", "time": "2023-12-03 01:11:11.937976", "cmd": 2} {"id": 7723, "parent": 7722, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all p: Protected | one t: Trash | p not in t and p.link not in t and t.link not in p\n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | one t: Trash | all f: File |\n f in p implies (p not in t and p not in t.link)\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n one f: File| all fAll: File |\n f in fAll.link \n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "veggie-moaner-blame-flight", "time": "2023-12-03 07:14:29.996993", "cmd": 4} {"id": 7724, "parent": 7723, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all p: Protected | one t: Trash | p not in t and p.link not in t and t.link not in p\n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | one t: Trash | \n \n all f: File |\n f not in p implies (f in t )\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n one f: File| all fAll: File |\n f in fAll.link \n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "dice-cadet-violet-humped", "time": "2023-12-03 07:17:02.187427", "cmd": 5} {"id": 7726, "parent": 7725, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all p: Protected | one t: Trash | p not in t and p.link not in t and t.link not in p\n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | one t: Trash |\n \n all f: File |\n f not in p implies (f in t )\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n one f: File| all fAll: File |\n f in fAll.link \n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "demise-perch-ditto-gala", "time": "2023-12-03 07:17:35.334129", "cmd": 5} {"id": 7728, "parent": 7727, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all p: Protected | one t: Trash | p not in t and p.link not in t and t.link not in p\n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | one t: Trash |\n \n all f: File |\n not p implies (p in t)\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n one f: File| all fAll: File |\n f in fAll.link \n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "unsaid-raving-dugout-entomb", "time": "2023-12-03 07:19:22.325917", "cmd": 5} {"id": 7729, "parent": 7728, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all p: Protected | one t: Trash | p not in t and p.link not in t and t.link not in p\n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | one t: Trash |\n \n all f: File |\n f not in p implies (f in t)\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n one f: File| all fAll: File |\n f in fAll.link \n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "stoop-dilute-tinsel-city", "time": "2023-12-03 07:19:59.101665", "cmd": 5} {"id": 7730, "parent": 7729, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all p: Protected | one t: Trash | p not in t and p.link not in t and t.link not in p\n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | one t: Trash |\n \n all f: File |\n f not in p implies (f in t)\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n one f: File| all fAll: File |\n f in fAll.link \n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "porous-oyster-tinsel-woozy", "time": "2023-12-03 07:20:33.039979", "cmd": 4} {"id": 7732, "parent": 7731, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all p: Protected | one t: Trash | p not in t and p not in t.link and t not in p.link \n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | one t: Trash |\n \n all f: File |\n f not in p implies (f in t)\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n one f: File| all fAll: File |\n f in fAll.link \n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "jinx-outbid-expend-dial", "time": "2023-12-03 07:49:35.628720", "cmd": 4} {"id": 7570, "parent": 7569, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | all t: Trash | f in t.link \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n all f: File | some t: Trash | f in t.link \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "wrath-dipped-decay-paging", "time": "2023-12-02 07:42:11.319880", "cmd": 2} {"id": 7576, "parent": 7575, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all p: Protected | one t: trash | no p in t\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "tartar-shrug-dill-easing", "time": "2023-12-02 09:00:51.337711", "cmd": 4} {"id": 7578, "parent": 7577, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all p: Protected | one t: Trash | no p in t\n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "fabric-glass-obtuse-debate", "time": "2023-12-02 09:01:53.650779", "cmd": 4} {"id": 7581, "parent": 7580, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all p: Protected | one t: Trash | p not in t\n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | one t: Trash | all f: File |\n f not in p implies f in t\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "blouse-deed-data-grime", "time": "2023-12-02 09:04:27.708188", "cmd": 5} {"id": 7582, "parent": 7581, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all p: Protected | one t: Trash | p not in t\n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | one t: Trash | all f: File |\n p implies p not in t\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "reflex-refund-thrill-arose", "time": "2023-12-02 09:05:03.756490", "cmd": 5} {"id": 7585, "parent": 7584, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n some p: Protected | one t: Trash | p not in t\n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | one t: Trash | all f: File |\n f in p implies p not in t\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "glitch-snarl-mule-edge", "time": "2023-12-02 09:10:17.770863", "cmd": 4} {"id": 7586, "parent": 7585, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n some p: Protected | one t: Trash | p not in t and p not in t.link\n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | one t: Trash | all f: File |\n f in p implies p not in t\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "copy-recent-bleach-singer", "time": "2023-12-02 09:10:38.016622", "cmd": 4} {"id": 7589, "parent": 7588, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n some p: Protected | one t: Trash | p not in t and p not in t.link and t not in p.link\n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | one t: Trash | all f: File |\n f in p implies p not in t\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "sleet-versus-ferret-mace", "time": "2023-12-02 09:12:03.529849", "cmd": 5} {"id": 7599, "parent": 7503, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\n// Define the predicate that represents the puzzle constraints\npred puzzle {\n // Statement 1: There exists someone who killed Agatha\n some x: Person | Agatha in x.killed\n\n // Statement 2: For all x and y, if x killed y, then x hates y and x is not richer than y\n all x, y: Person | y in x.killed implies (y in x.hates and not y in x.richer)\n\n // Statement 3: Everybody who hates Agatha hates Charles\n all x: Person - Agatha | (Agatha in x.hates) implies (Charles in x.hates)\n\n // Statement 4: Agatha hates herself and she hates Charles\n Agatha in Agatha.hates and Charles in Agatha.hates\n\n // Statement 5: The Butler hates everyone not richer than Agatha\n all x: Person - Agatha | not (x in Agatha.richer) implies (x in Butler.hates)\n\n // Statement 6: The Butler hates everyone whom Agatha hates\n all x: Person | x in Agatha.hates implies x in Butler.hates\n\n // Statement 7: Charles hates no one\n no x: Person | x in Charles.hates\n}\n\n// Run the puzzle predicate to find a solution\nrun puzzle for 3", "permalink": "cradle-shame-blot-nape", "time": "2023-12-02 13:19:42.359951", "cmd": 1} {"id": 7607, "parent": 7606, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {\n // Agatha, the Butler, and Charles are not richer than themselves\n not (this in this.richer)\n}\n\n// Define the predicate that represents the puzzle constraints\npred puzzle {\n // Someone who lived in Dreadbury Mansion killed Aunt Agatha\n some x: Person - Agatha | Agatha in x.killed\n \n // A killer always hates their victim, and is never richer than their victim.\n all x, y: Person | y in x.killed implies (y in x.hates and not (y in x.richer))\n \n // Charles hates no one that Aunt Agatha hates.\n all x: Person | x in Agatha.hates implies not (x in Charles.hates)\n \n // Agatha hates everyone except the Butler.\n all x: Person - Butler | x in Agatha.hates\n not (Butler in Agatha.hates)\n \n // The Butler hates everyone not richer than Aunt Agatha.\n all x: Person - Agatha | not (x in Agatha.richer) implies x in Butler.hates\n \n // The Butler also hates everyone Agatha hates.\n all x: Person | x in Agatha.hates implies x in Butler.hates\n \n // No one hates everyone.\n no p: Person | hates[p] = Person\n \n // Additional facts to ensure consistency\n\n \n // Agatha did not kill herself\n not (Agatha in Agatha.killed)\n}\n\n// Run the puzzle predicate to find a solution\nrun puzzle for exactly 1 Agatha, exactly 1 Butler, exactly 1 Charles", "permalink": "deface-mango-armory-lunar", "time": "2023-12-02 13:28:12.469063", "cmd": 1} {"id": 7611, "parent": 7610, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // TODO Implement the constraints here\n some x : Person | Agatha in x.killed\n\n all x,y: Person | (y = x.killed implies (y in x.hates and not y in x.richer))\n}\n\nrun puzzle", "permalink": "self-blob-helium-little", "time": "2023-12-02 14:05:38.377069", "cmd": 1} {"id": 7619, "parent": 7618, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // TODO Implement the constraints here\n some x : Person | Agatha in x.killed\n\n all x,y: Person | (y in x.killed implies (y in x.hates and not y in x.richer))\n\n all x: Person | (x in Agatha.hates implies not x in Charles.hates)\n\n (Agatha in Agatha.hates) and (Charles in Agatha.hates)\n\n all x : Person | (not Agatha in x.richer implies x in Butler.hates)\n\n\n\n}\n\nrun puzzle", "permalink": "unroll-chafe-rogue-stream", "time": "2023-12-02 14:19:36.540955", "cmd": 1} {"id": 7624, "parent": 7058, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\n\nsig Worker {\n \n}\n\n\nabstract sig Day{ } \nsig Monday, Tuesday, Wednesday, Thurstday, Friday\n\nrun {}", "permalink": "patio-cringe-douche-skype", "time": "2023-12-02 14:41:42.185479", "cmd": 1} {"id": 7626, "parent": 7625, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\n\nsig Worker {\n \n}\n\n\nabstract sig Day{} \nsig Monday, Tuesday, Wednesday, Thurstday, Friday {}\n\nrun {}", "permalink": "clever-sprite-kite-viewer", "time": "2023-12-02 14:42:08.539984", "cmd": 1} {"id": 7627, "parent": 7626, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\n\nsig Worker {\n associated_with: Schedule\n}\n\nsig Schedule {\n workingDays: \n}\n\n\nabstract sig Day{} \nsig Monday, Tuesday, Wednesday, Thurstday, Friday {}\n\nfact {all a : Worker | one a.associated_with}\n\n\nrun {}", "permalink": "stucco-mocha-void-salon", "time": "2023-12-02 14:44:52.584588", "cmd": 1} {"id": 7632, "parent": 7631, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no File in Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "banish-chip-hangup-yodel", "time": "2023-12-02 15:00:27.955374", "cmd": 1} {"id": 7634, "parent": 7633, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all x: File | x in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "hyphen-gave-judge-mooned", "time": "2023-12-02 15:11:26.147304", "cmd": 2} {"id": 7640, "parent": 7639, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all x: File | x in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some x: File | x in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all x: Protected | x not in Trash\n \n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all x: no Protected | x in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "udder-boots-wafer-hazard", "time": "2023-12-02 15:28:33.153350", "cmd": 5} {"id": 7644, "parent": 7643, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all x: File | x in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some x: File | x in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all x: Protected | x not in Trash\n \n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all x: File| (x not in Protected implies x in Trash)\n\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "reboot-clad-spiffy-viral", "time": "2023-12-02 15:34:27.479435", "cmd": 5} {"id": 7653, "parent": 7650, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all x: File | x in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some x: File | x in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all x: Protected | x not in Trash\n \n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all x: File| (x not in Protected implies x in Trash)\n\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n all x: File | lone x.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n all x,y: File | (y in x.link implies x,y not in Trash)\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "manned-shale-stitch-power", "time": "2023-12-02 15:42:30.178580", "cmd": 7} {"id": 7654, "parent": 7653, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all x: File | x in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some x: File | x in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all x: Protected | x not in Trash\n \n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all x: File| (x not in Protected implies x in Trash)\n\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n all x: File | lone x.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n no x:File | some x.link and x in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "levers-mud-front-humbly", "time": "2023-12-02 15:43:51.118344", "cmd": 7} {"id": 7655, "parent": 7654, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all x: File | x in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some x: File | x in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all x: Protected | x not in Trash\n\n \n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all x: File| (x not in Protected implies x in Trash)\n\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n all x: File | lone x.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n no x: File | some x.link implies x not in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "yippee-rinse-nag-valid", "time": "2023-12-02 15:49:13.217809", "cmd": 7} {"id": 7658, "parent": 7657, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all x: File | x in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some x: File | x in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all x: Protected | x not in Trash\n\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all x: File| (x not in Protected implies x in Trash)\n\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n all x: File | lone x.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n no x: File | some x.link implies x not in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "outbid-outer-canopy-cacti", "time": "2023-12-02 15:52:23.269763", "cmd": 4} {"id": 7663, "parent": 7662, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all x: File | x in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some x: File | x in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all x: Protected | x not in Trash\n\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all x: File| (x not in Protected implies x in Trash)\n\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n all x: File | lone x.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n no x: File | some x.link implies x not in Trash\n\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n all x : File | no x.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n no x: File | some x.link => no (x.link).link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "tassel-gully-glue-estate", "time": "2023-12-02 15:58:05.366029", "cmd": 9} {"id": 7669, "parent": 7665, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all x: File | x in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some x: File | x in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all x: Protected | x not in Trash\n\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all x: File| (x not in Protected implies x in Trash)\n\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n all x: File | lone x.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n no x: File | some x.link implies x not in Trash\n\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n all x : File | no x.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n all x: File | some x.link implies no (x.link).link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n all x,y: File | x in y.link| (no y.link implies x in Trash)\n}\n\nrun inv10", "permalink": "xbox-hanky-gem-reboot", "time": "2023-12-02 16:05:03.630363", "cmd": 10} {"id": 7671, "parent": 7668, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\n\nsig Worker {\n hasSchedule: Schedule,\n}\n\nsig Schedule {\n workingDays: set Day\n}\n\nabstract sig Day{\n name : String,\n \n} \nsig Monday extends Day{\n name = \"Monday\",\n\n}\n\n\nrun {}", "permalink": "calm-return-muster-worry", "time": "2023-12-02 16:05:25.004158", "cmd": 1} {"id": 7674, "parent": 7672, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all x: File | x in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some x: File | x in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all x: Protected | x not in Trash\n\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all x: File| (x not in Protected implies x in Trash)\n\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n all x: File | lone x.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n no x: File | some x.link implies x not in Trash\n\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n all x : File | no x.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n all x: File | some x.link implies no (x.link).link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n all x: File | x.link in Trash implies all x.link.link in Trash\n}\n\nrun inv10", "permalink": "sprung-enzyme-green-backed", "time": "2023-12-02 16:06:54.625284", "cmd": 10} {"id": 7675, "parent": 7674, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all x: File | x in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some x: File | x in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all x: Protected | x not in Trash\n\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all x: File| (x not in Protected implies x in Trash)\n\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n all x: File | lone x.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n no x: File | some x.link implies x not in Trash\n\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n all x : File | no x.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n all x: File | some x.link implies no (x.link).link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n all x: File | x.link in Trash implies x.link.link in Trash\n}\n\nrun inv10", "permalink": "mascot-study-dry-chief", "time": "2023-12-02 16:07:21.838524", "cmd": 10} {"id": 7676, "parent": 7673, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\n\nsig Worker {\n hasSchedule: Schedule,\n}\n\nsig Schedule {\n workingDays: set Day\n}\n\nabstract sig Day{\n name : String,\n \n} \nsig Monday extends Day{\n name = \"Monday\"\n}\n\n\nrun {}", "permalink": "aim-anime-porous-hazily", "time": "2023-12-02 16:07:42.705366", "cmd": 1} {"id": 7679, "parent": 7675, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all x: File | x in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some x: File | x in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all x: Protected | x not in Trash\n\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all x: File| (x not in Protected implies x in Trash)\n\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n all x: File | lone x.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n no x: File | some x.link implies x not in Trash\n\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n all x : File | no x.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n all x: File | some x.link implies no (x.link).link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n all x,y: File | x in y.link and y in Trash implies x in Trash\n}\n\nrun inv10", "permalink": "region-fondue-unused-roster", "time": "2023-12-02 16:09:32.081598", "cmd": 10} {"id": 7680, "parent": 7679, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all x: File | x in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some x: File | x in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all x: Protected | x not in Trash\n\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all x: File| (x not in Protected implies x in Trash)\n\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n all x: File | lone x.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n// no x: File | some x.link implies x not in Trash\n all x,y: File | y in x.link implies x and y not in Trash\n\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n all x : File | no x.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n all x: File | some x.link implies no (x.link).link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n all x,y: File | x in y.link and y in Trash implies x in Trash\n}\n\nrun inv10", "permalink": "hug-gargle-barman-mom", "time": "2023-12-02 16:11:28.257826", "cmd": 10} {"id": 7683, "parent": 7682, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all x: File | x in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some x: File | x in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all x: File | x in Protected implies x not in Trash\n\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all x: File| (x not in Protected implies x in Trash)\n\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n all x: File | lone x.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n// no x: File | some x.link implies x not in Trash\n all x,y: File | y in x.link implies y not in Trash\n\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n all x : File | no x.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n all x: File | some x.link implies no (x.link).link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n all x,y: File | x in y.link and y in Trash implies x in Trash\n}\n\nrun inv10", "permalink": "thing-robust-unused-ivy", "time": "2023-12-02 16:12:40.582642", "cmd": 4} {"id": 7684, "parent": 7678, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\n\nsig Hierachy {\n root: lone GameComponent\n}\n\nsig GameComponent {\n status: one State,\n associated_with = one Transform\n}\n\nsig Data {\n associated_with: one GameComponent\n \n}\n\nsig Transform {\n}\n\n\nrun {}", "permalink": "falcon-envoy-nape-zodiac", "time": "2023-12-02 16:26:00.559379", "cmd": 1} {"id": 7688, "parent": 7687, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\n\nsig Hierachy {\n root: lone GameComponent\n}\n\nsig GameComponent {\n associated_with = set Data,\n}\n\nsig Data {\n}\n\nsig Transform {\n}\n\n\nrun {}", "permalink": "most-outfit-purr-tug", "time": "2023-12-02 16:51:09.664620", "cmd": 1} {"id": 7694, "parent": 7683, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all x: File | x in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some x: File | x in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all x: File | x in Protected implies x not in Trash\n\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all x: File| (x not in Protected implies x in Trash)\n\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n all x: File | lone x.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n all x,y: File | y in x.link implies y not in Trash\n\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n all x : File | no x.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n all x: File | some x.link implies no (x.link).link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n all x,y: File | x in y.link and y in Trash implies x in Trash\n}\n\nrun inv10", "permalink": "slain-savage-bacon-nervy", "time": "2023-12-02 21:00:52.165627", "cmd": 7} {"id": 7697, "parent": 7058, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n// Signatures\nabstract sig Person {\n name: one Name,\n borrowedBooks: set Book\n}\n\nsig Name {}\n\nsig Librarian extends Person {\n managedSections: set Section\n}\n\nsig Member extends Person {\n membershipLevel: one MembershipLevel\n}\n\nsig Book {\n title: one Title,\n section: one Section\n}\n\nsig Title {}\n\nsig Section {\n books: set Book\n}\n\nsig MembershipLevel {}\n\n// Facts\nfact eachSectionHasUniqueBooks {\n all s: Section | no disj s1, s2: Section | s1 != s2 and s1.books & s2.books\n}\n\nfact membersCanBorrowBooksFromManagedSectionsOnly {\n all m: Member, b: m.borrowedBooks | b.section in (m.^membershipLevel).managedSections\n}\n\n// Predicates\npred librarianManagesAtLeastOneSection {\n some l: Librarian | some l.managedSections\n}\n\npred membersWithNoBorrowedBooks {\n no m: Member | some m.borrowedBooks\n}\n\n// Run commands\nrun membersWithNoBorrowedBooks for 4 // This should be unsatisfiable under the assumption that all members have borrowed books\n\nrun librarianManagesAtLeastOneSection for 3 // This should be satisfiable if there's a librarian managing sections\n\n\nrun {}", "permalink": "liquid-cheer-varied-vendor", "time": "2023-12-02 23:57:25.648722", "cmd": 2} {"id": 7700, "parent": 7699, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures: Person, Librarian, Student, Name, Book, Title, Membership\n\n// Person\nsig Person{\n name: one Name\n}\n\n// Name\nsig Name{}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n available: one Bool\n}\n\n// Title\nsig Title{}\n\n// Membership\nsig Membership{}\n\n// Bool\nsig Bool{}\n\n\n\n\n\nrun {}", "permalink": "purple-dipper-slacks-nag", "time": "2023-12-03 00:23:17.617421", "cmd": 1} {"id": 7702, "parent": 7701, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures: Person, Librarian, Student, Name, Book, Title, Membership\n\n// Person\nsig Person{\n name: one Name\n}\n\n// Name\nsig Name{}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n status: one Status\n}\n\n// Title\nsig Title{}\n\n// Membership\nsig Membership{}\n\n// Status\nsig Status {\n isAvailable: Bool\n}\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.status.isAvailable = false\n}\n\n\n\n\n\nrun {}", "permalink": "survey-stack-buddy-limes", "time": "2023-12-03 00:33:53.241343", "cmd": 1} {"id": 7703, "parent": 7702, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures: Person, Librarian, Student, Name, Book, Title, Membership\n\n// Person\nsig Person{\n name: one Name\n}\n\n// Name\nsig Name{}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// Title\nsig Title{}\n\n// Membership\nsig Membership{}\n\n// Status\nsig Status {\n isAvailable: Bool\n}\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n\n\n\n\nrun {}", "permalink": "radish-carrot-tricky-egging", "time": "2023-12-03 00:42:59.036112", "cmd": 1} {"id": 7704, "parent": 7703, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures: Person, Librarian, Student, Name, Book, Title, Membership\n\n// Person\nsig Person{\n name: one Name\n}\n\n// Name\nsig Name{}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// Title\nsig Title{}\n\n// Membership\nsig Membership{}\n\n\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n\n\n\n\nrun {}", "permalink": "sway-gladly-gift-crease", "time": "2023-12-03 00:43:05.957424", "cmd": 1} {"id": 7706, "parent": 7705, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures: Person, Librarian, Student, Name, Book, Title, Membership\n\n// Person\nsig Person{\n name: one Name\n}\n\n// Name\nsig Name{}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// Title\nsig Title{}\n\n// Membership\nsig Membership{}\n\n\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n\n\nrun {}", "permalink": "papaya-prize-shame-hasty", "time": "2023-12-03 00:44:51.473394", "cmd": 1} {"id": 7708, "parent": 7707, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures: Person, Librarian, Student, Name, Book, Title, Membership\n\n// Person\nsig Person{\n name: one Name\n}\n\n// Name\nsig Name{}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// Title\nsig Title{}\n\n// Membership\nsig Membership{}\n\n\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\nrun atLeastOneLibrarianExists \n\n\nrun {}", "permalink": "sneer-unholy-ranger-drool", "time": "2023-12-03 00:46:57.694328", "cmd": 2} {"id": 7709, "parent": 7708, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures: Person, Librarian, Student, Name, Book, Title, Membership\n\n// Person\nsig Person{\n name: one Name\n}\n\n// Name\nsig Name{}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// Title\nsig Title{}\n\n// Membership\nsig Membership{}\n\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists \n", "permalink": "basil-coral-pleat-ajar", "time": "2023-12-03 00:48:13.067746", "cmd": 2} {"id": 7711, "parent": 7710, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures: Person, Librarian, Student, Name, Book, Title, Membership\n\n// Person\nsig Person{\n name: one Name\n}\n\n// Name\nsig Name{}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book\n}\n\n\n\n// Title\nsig Title{}\n\n// Membership\nsig Membership{}\n\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists \n", "permalink": "unwary-sesame-even-margin", "time": "2023-12-03 00:50:16.690756", "cmd": 1} {"id": 7722, "parent": 7721, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all p: Protected | one t: Trash | p not in t and p.link not in t \n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | one t: Trash | all f: File |\n f in p implies (p not in t and p not in t.link)\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n one f: File| all fAll: File |\n f in fAll.link \n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "clock-myself-bulk-limes", "time": "2023-12-03 07:14:07.313617", "cmd": 4} {"id": 7725, "parent": 7724, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all p: Protected | one t: Trash | p not in t and p.link not in t and t.link not in p\n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | one t: Trash | all f: File\n \n all f: File |\n f not in p implies (f in t )\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n one f: File| all fAll: File |\n f in fAll.link \n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "clad-deem-sphinx-flinch", "time": "2023-12-03 07:17:21.957569", "cmd": 5} {"id": 7727, "parent": 7726, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all p: Protected | one t: Trash | p not in t and p.link not in t and t.link not in p\n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | one t: Trash |\n \n all f: File |\n f not in p implies (f in t)\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n one f: File| all fAll: File |\n f in fAll.link \n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "chain-french-replay-tartar", "time": "2023-12-03 07:18:20.989667", "cmd": 4} {"id": 7735, "parent": 7734, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all p: Protected | all t: Trash | \n p not in t and p not in t.link and t not in p.link \n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | all t: Trash |\n \n all f: File |\n f not in p implies (f in t or f in t.link)\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n one f: File| all fAll: File |\n f in fAll.link \n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "awry-tiptop-herald-plus", "time": "2023-12-03 07:55:59.714845", "cmd": 5} {"id": 7743, "parent": 7742, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all p: Protected | all t: Trash | \n p not in t and p not in t.link and t not in p.link \n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | all t: Trash | all f: File |\n f in p iff not f in t \n \n \n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n one f: File| all fAll: File |\n f in fAll.link \n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "cube-fang-perm-yarn", "time": "2023-12-03 08:01:22.880721", "cmd": 5} {"id": 7744, "parent": 7743, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all p: Protected | all t: Trash | \n p not in t and p not in t.link and t not in p.link \n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | all t: Trash | all f: File |\n f in p iff not f in t \n (f not in p) implies (f in t or f in t.link)\n \n \n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n one f: File| all fAll: File |\n f in fAll.link \n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "getup-eats-boned-size", "time": "2023-12-03 08:02:28.806161", "cmd": 5} {"id": 7745, "parent": 7744, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all p: Protected | all t: Trash | \n p not in t and p not in t.link and t not in p.link \n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | all t: Trash | all f: File |\n f in p iff not f in t and\n (f not in p) implies (f in t or f in t.link)\n \n \n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n one f: File| all fAll: File |\n f in fAll.link \n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "shimmy-decaf-yoyo-food", "time": "2023-12-03 08:02:40.129511", "cmd": 5} {"id": 7756, "parent": 7755, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nsig Person{\n name: one Name,\n email: one Email\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n department: one Department\n \n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// Name\nsig Name{}\n\n// Email\nsig Email{}\n\n// Title\nsig Title{}\n\n// Membership\nsig Membership{}\n\n// Department\nsig Department {}\n\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "rigor-dental-cleft-thrash", "time": "2023-12-03 13:19:32.471346", "cmd": 1} {"id": 7758, "parent": 7757, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nsig Person{\n name: one Name,\n email: one Email\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n department: one Department\n \n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// // Name\n// sig Name{}\n\n// // Email\n// sig Email{}\n\n// // Title\n// sig Title{}\n\n// // Membership\n// sig Membership{}\n\n// // Department\n// sig Department {}\n// Name\nsig Name {\n value: one String // added field\n}\n\n// Email\nsig Email {\n address: one String // added field\n}\n\n// Title\nsig Title {\n name: one String // added field\n}\n\n// Membership\nsig Membership {\n type: one MembershipType, // added field\n validUntil: one Date // added field\n}\n\n// Author\nsig Author {\n name: one Name, // added field\n publishedBooks: set Book // added field\n}\n\n// Department\nsig Department {\n head: one Librarian, // added field\n courses: set Course // added field\n}\n\n// Course\nsig Course {\n name: one String, // added field\n enrolledStudents: set Student // added field\n}\n\n// Date (to represent dates)\nsig Date {\n year: one Int,\n month: one Int,\n day: one Int\n}\n\n// MembershipType\nsig MembershipType {\n name: one String, // added field\n benefits: set String // added field\n}\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "blinks-thong-edge-droop", "time": "2023-12-03 13:25:48.744047", "cmd": 2} {"id": 7777, "parent": 7776, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nabstract sig Person{\n name: one String,\n email: one String\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n department: one Department\n \n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// // Name\n// sig Name{}\n\n// // Email\n// sig Email{}\n\n// Title\nsig Title{}\n\n// Membership\nsig Membership{}\n\n// Department\nsig Department {}\n\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "gaffe-barrel-cough-heat", "time": "2023-12-03 13:41:50.521221", "cmd": 1} {"id": 7778, "parent": 7777, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nabstract sig Person{\n name: one String,\n email: one String\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n department: one Department\n \n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// // Name\n// sig Name{}\n\n// // Email\n// sig Email{}\n\n// Title\nsig Title{}\n\n// Membership\nsig Membership{}\n\n// Department\nsig Department {}\n\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "cleft-greedy-carve-busboy", "time": "2023-12-03 13:41:54.154097", "cmd": 2} {"id": 7779, "parent": 7778, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nabstract sig Person{\n name: one Name,\n email: one Email\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n department: one Department\n \n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// // Name\n// sig Name{}\n\n// // Email\n// sig Email{}\n\n// Title\nsig Title{}\n\n// Membership\nsig Membership{}\n\n// Department\nsig Department {}\n\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "helium-king-wind-smoked", "time": "2023-12-03 13:41:59.940611", "cmd": 2} {"id": 7780, "parent": 7779, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nabstract sig Person{\n name: one Name,\n email: one Email\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n department: one Department\n \n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// // Name\n// sig Name{}\n\n// // Email\n// sig Email{}\n\n// Title\nsig Title{}\n\n// Membership\nsig Membership{\n\n}\n\n// Department\nsig Department {}\n\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\nfact UniqueTitles {all t: Title | one name.t}\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "collie-ebony-lion-speak", "time": "2023-12-03 13:51:12.408924", "cmd": 2} {"id": 7783, "parent": 7782, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nabstract sig Person{\n name: one Name,\n email: one Email\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n department: one Department\n \n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// Name\nsig Name{}\n\n// Email\nsig Email{}\n\n// Title\nsig Title{\n name: Title\n}\n\n// Membership\nsig Membership{\n\n}\n\n// Department\nsig Department {}\n\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\nfact UniqueTitles {all t: Title | one name.t}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "corned-cure-cargo-mushy", "time": "2023-12-03 13:52:32.664683", "cmd": 2} {"id": 7734, "parent": 7733, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all p: Protected | all t: Trash | \n p not in t and p not in t.link and t not in p.link \n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | all t: Trash |\n \n all f: File |\n f not in p implies (f in t)\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n one f: File| all fAll: File |\n f in fAll.link \n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "sloped-resort-hungry-jawed", "time": "2023-12-03 07:55:02.028404", "cmd": 5} {"id": 7737, "parent": 7736, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all p: Protected | all t: Trash | \n p not in t and p not in t.link and t not in p.link \n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | all t: Trash | all f: File |\n f in p iff not f in t \n and\n f not in p implies (f in t or f in t.link)\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n one f: File| all fAll: File |\n f in fAll.link \n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "swirl-acts-waggle-barman", "time": "2023-12-03 07:57:06.184375", "cmd": 5} {"id": 7738, "parent": 7737, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all p: Protected | all t: Trash | \n p not in t and p not in t.link and t not in p.link \n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | all t: Trash | all f: File |\n f in p iff not f in t \n \n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n one f: File| all fAll: File |\n f in fAll.link \n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "sprint-canal-rising-molar", "time": "2023-12-03 07:57:17.708802", "cmd": 5} {"id": 7741, "parent": 7740, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all p: Protected | all t: Trash | \n p not in t and p not in t.link and t not in p.link \n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | all t: Trash | all f: File |\n f in p iff not f in t and\n p not in f implies (t in f or t.link in f)\n \n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n one f: File| all fAll: File |\n f in fAll.link \n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "disk-sierra-able-acid", "time": "2023-12-03 07:59:48.437002", "cmd": 5} {"id": 7746, "parent": 7745, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all p: Protected | all t: Trash | \n p not in t and p not in t.link and t not in p.link \n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | all t: Trash | all f: File |\n f in p iff not f in t or\n (f not in p) implies (f in t or f in t.link)\n \n \n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n one f: File| all fAll: File |\n f in fAll.link \n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "wick-ambush-survey-carbon", "time": "2023-12-03 08:02:50.568090", "cmd": 5} {"id": 7760, "parent": 7759, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nsig Person{\n name: one Name,\n email: one Email\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n department: one Department\n \n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// // Name\n// sig Name{}\n\n// // Email\n// sig Email{}\n\n// // Title\n// sig Title{}\n\n// // Membership\n// sig Membership{}\n\n// // Department\n// sig Department {}\n// Name\nsig Name {\n value: one String // added field\n}\n\n// Email\nsig Email {\n address: one String // added field\n}\n\n// Title\nsig Title {\n name: one String // added field\n}\n\n// Membership\nsig Membership {\n type: one MembershipType, // added field\n validUntil: one Date // added field\n}\n\n// Author\nsig Author {\n name: one Name, // added field\n publishedBooks: set Book // added field\n}\n\n// Department\nsig Department {\n head: one Librarian, // added field\n courses: set Course // added field\n}\n\n// Course\nsig Course {\n name: one String, // added field\n enrolledStudents: set Student // added field\n}\n\n// Date (to represent dates)\nsig Date {\n year: one Int,\n month: one Int,\n day: one Int\n}\n\n// MembershipType\nsig MembershipType {\n name: one String, // added field\n benefits: set String // added field\n}\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "elite-arrive-derail-deluxe", "time": "2023-12-03 13:27:44.896679", "cmd": 2} {"id": 7761, "parent": 7760, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nsig Person{\n name: one Name,\n email: one Email\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n department: one Department\n \n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// // Name\n// sig Name{}\n\n// // Email\n// sig Email{}\n\n// // Title\n// sig Title{}\n\n// // Membership\n// sig Membership{}\n\n// // Department\n// sig Department {}\n// Name\nsig Name {\n value: one String // added field\n}\n\n// Email\nsig Email {\n address: one String // added field\n}\n\n// Title\nsig Title {\n name: one String // added field\n}\n\n// Membership\nsig Membership {\n type: one MembershipType, // added field\n validUntil: one Date // added field\n}\n\n// Author\nsig Author {\n name: one Name, // added field\n publishedBooks: set Book // added field\n}\n\n// Department\nsig Department {\n head: set Librarian, // added field\n courses: set Course // added field\n}\n\n// Course\nsig Course {\n name: one String, // added field\n enrolledStudents: set Student // added field\n}\n\n// Date (to represent dates)\nsig Date {\n year: one Int,\n month: one Int,\n day: one Int\n}\n\n// MembershipType\nsig MembershipType {\n name: one String, // added field\n benefits: set String // added field\n}\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "dander-paper-snort-amulet", "time": "2023-12-03 13:27:51.181210", "cmd": 2} {"id": 7763, "parent": 7762, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nsig Person{\n name: one Name,\n email: one Email\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n department: one Department\n \n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// // Name\n// sig Name{}\n\n// // Email\n// sig Email{}\n\n// // Title\n// sig Title{}\n\n// // Membership\n// sig Membership{}\n\n// // Department\n// sig Department {}\n// Name\nsig Name {\n value: one String // added field\n}\n\n// Email\nsig Email {\n address: one String // added field\n}\n\n// Title\nsig Title {\n name: one String // added field\n}\n\n// Membership\nsig Membership {\n type: one MembershipType, // added field\n validUntil: one Date // added field\n}\n\n// Author\nsig Author {\n name: one Name, // added field\n publishedBooks: set Book // added field\n}\n\n// Department\nsig Department {\n head: one Librarian, // added field\n courses: set Course // added field\n}\n\n// Course\nsig Course {\n name: one String, // added field\n enrolledStudents: set Student // added field\n}\n\n// Date (to represent dates)\nsig Date {\n year: one Int,\n month: one Int,\n day: one Int\n}\n\n// MembershipType\nsig MembershipType {\n name: one String, // added field\n benefits: set String // added field\n}\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "amiss-public-iodize-barbed", "time": "2023-12-03 13:28:02.026176", "cmd": 1} {"id": 7769, "parent": 7768, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nabstract sig Person{\n name: one Name,\n email: one Email\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n department: one Department\n \n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// Name\nsig Name{\n firstname: one String\n lastName: one String\n}\n\n// Email\nsig Email{}\n\n// Title\nsig Title{}\n\n// Membership\nsig Membership{}\n\n// Department\nsig Department {}\n\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "gravy-guts-mutate-stamp", "time": "2023-12-03 13:37:58.630956", "cmd": 1} {"id": 7774, "parent": 7773, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nabstract sig Person{\n // name: one Name,\n // email: one Email\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n department: one Department\n \n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// // Name\n// sig Name{}\n\n// // Email\n// sig Email{}\n\n// Title\nsig Title{}\n\n// Membership\nsig Membership{}\n\n// Department\nsig Department {}\n\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "recant-fruit-chaos-kept", "time": "2023-12-03 13:38:41.535821", "cmd": 1} {"id": 7781, "parent": 7780, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nabstract sig Person{\n name: one Name,\n email: one Email\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n department: one Department\n \n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// Name\nsig Name{}\n\n// Email\nsig Email{}\n\n// Title\nsig Title{}\n\n// Membership\nsig Membership{\n\n}\n\n// Department\nsig Department {}\n\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\nfact UniqueTitles {all t: Title | one name.t}\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "paver-swerve-pony-rising", "time": "2023-12-03 13:51:18.791096", "cmd": 2} {"id": 7787, "parent": 7786, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nabstract sig Person{\n name: one Name,\n email: one Email\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n department: one Department\n \n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// Name\nsig Name{}\n\n// Email\nsig Email{}\n\n// Title\nsig Title{\n name: one Title\n}\n\n// Membership\nsig Membership{\n\n}\n\n// Department\nsig Department {}\n\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Each book has unique titles\n// fact EachBookHasUniqueTitles {\n// all title: Title | one name.title\n// }\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "mumble-detail-okay-fox", "time": "2023-12-03 13:55:50.646724", "cmd": 2} {"id": 7792, "parent": 7791, "code": "// Car Rental Service Model\n\n// Vehicle\nabstract sig Vehicle {\n licensePlate: one LicensePlate,\n model: one Model,\n yearOfManufacture: one Year\n}\n\n// Car extends Vehicle\nsig Car extends Vehicle {\n fuelType: one FuelType,\n mileage: one Mileage\n}\n\n// Customer\nsig Customer {\n personalInfo: one PersonalInformation,\n membershipStatus: one MembershipStatus\n}\n\n// RentalContract\nsig RentalContract {\n rentingCustomer: one Customer,\n rentedCars: set Car,\n contractPeriod: one ContractPeriod,\n contractStatus: one ContractStatus\n}\n\n// Enhanced Signatures with Additional Fields\nsig LicensePlate {\n plateNumber: one PlateNumber,\n issuingAuthority: one IssuingAuthority\n}\n\nsig Model {\n modelName: one ModelName,\n manufacturer: one Manufacturer\n}\n\nsig FuelType {\n fuelTypeName: one FuelTypeName,\n octaneLevel: one OctaneLevel\n}\n\nsig PersonalInformation {\n firstName: one FirstName,\n lastName: one LastName\n}\n\n// Additional Signatures with Fields\nsig Manufacturer {\n name: one String,\n country: one Country\n}\n\nsig Mileage {\n currentMileage: one Int,\n lastServiceMileage: one Int\n}\n\nsig MembershipStatus, ContractPeriod, ContractStatus, PlateNumber, IssuingAuthority, ModelName, FuelTypeName, OctaneLevel, FirstName, LastName, Year, Country {}\n\n// Facts\n\n// A car can only be part of one rental contract at a time\nfact carUniqueToContract {\n all c1, c2: RentalContract | no c1.rentedCars & c2.rentedCars\n}\n\n// Only members can rent cars\nfact onlyMembersCanRentCars {\n all c: Customer | c.membershipStatus = Member implies some c.rentedCars\n}\n\n// Predicates\n\n// Check if any customer has rented more than one car\npred customerRentedMoreThanOneCar {\n some c: Customer | #c.rentedCars > 1\n}\n\n// Check for existence of rental contracts with more than two cars\npred contractsWithManyCars {\n some rc: RentalContract | #rc.rentedCars > 2\n}\n\n// Run commands\n\n// This should be unsatisfiable as only members can rent cars\nrun customerRentedMoreThanOneCar for 5\n\n// This should be satisfiable and return at least 2 instances\nrun contractsWithManyCars for 5", "permalink": "cost-subtly-marrow-trade", "time": "2023-12-03 14:03:32.630514", "cmd": 2} {"id": 7795, "parent": 7794, "code": "// Car Rental Service Model\n\n// Vehicle\nabstract sig Vehicle {\n licensePlate: one LicensePlate,\n model: one Model\n}\n\n// Car extends Vehicle\nsig Car extends Vehicle {\n fuelType: one FuelType,\n availabilityStatus: one Availability\n}\n\n// Customer\nsig Customer {\n personalInfo: one PersonalInformation,\n rentedCars: set Car\n}\n\n// RentalContract\nsig RentalContract {\n customer: one Customer,\n cars: set Car,\n contractPeriod: one ContractPeriod\n}\n\n// Enhanced Signatures with Additional Fields\nsig LicensePlate {\n plateNumber: one PlateNumber,\n issuingAuthority: one IssuingAuthority\n}\n\nsig Model {\n modelName: one ModelName,\n manufacturer: one Manufacturer\n}\n\nsig FuelType {\n fuelTypeName: one FuelTypeName,\n octaneLevel: one OctaneLevel\n}\n\nsig PersonalInformation {\n firstName: one FirstName,\n lastName: one LastName\n}\n\n// Additional Signatures with Two Fields Each\nsig Manufacturer {\n name: String,\n location: String\n}\n\nsig Availability {\n status: String,\n condition: String\n}\n\nsig ContractPeriod {\n startDate: String,\n endDate: String\n}\n\nsig PlateNumber {\n number: String,\n series: String\n}\n\nsig IssuingAuthority {\n authorityName: String,\n region: String\n}\n\nsig ModelName {\n name: String,\n version: String\n}\n\nsig FuelTypeName {\n type: String,\n usage: String\n}\n\nsig OctaneLevel {\n level: String,\n rating: String\n}\n\nsig FirstName {\n first: String,\n middle: String\n}\n\nsig LastName {\n last: String,\n suffix: String\n}\n\n// Facts\n\n// A car can only be part of one rental contract at a time\nfact carUniqueToContract {\n all c1, c2: RentalContract | no c1.cars & c2.cars\n}\n\n// Only available cars can be rented\nfact onlyAvailableCarsCanBeRented {\n all c: Customer | all car: c.rentedCars | some a: Availability | a = car.availabilityStatus\n}\n\n// Predicates\n\n// Check if any customer has rented more than one car\npred customerRentedMoreThanOneCar {\n some c: Customer | #c.rentedCars > 1\n}\n\n// Check for existence of rental contracts with more than two cars\npred contractsWithManyCars {\n some rc: RentalContract | #rc.cars > 2\n}\n\n// Run commands\n\n// This should be unsatisfiable as only available cars can be rented\nrun customerRentedMoreThanOneCar for 5\n\n// This should be satisfiable and return at least 2 instances\nrun contractsWithManyCars for 5", "permalink": "corny-subway-lucid-posing", "time": "2023-12-03 14:04:58.336320", "cmd": 2} {"id": 7801, "parent": 7800, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\nsig Person {\n likes: set Book,\n dislikes: set Book,\n}\n\n\nsome sig Librarian extends Person {\n recommends: set Book,\n sorting_in: lone Book, \n}\n\nsig Book {\n lent_to: lone Person, // if not sorting_in and not \n continuation_of: lone Book\n}\n\nsome sig Shelf {\n holds: set Book, // books which are not reserved and not in process\n assigned_to: one Librarian\n}\n\nfact ExclusiveLikesDislikes {\n all p: Person |\n p.likes & p.dislikes = none // No book should be both liked and disliked by the same person\n}\n\nfact LibrarianRules {\n all l: Librarian |\n l.dislikes & l.recommends = none\n}\n\nfact NoLendingWhileSortingIn {\n all l: Librarian, b: Book, p : Person |\n l.sorting_in = b implies not b.lent_to = p\n}\n\nfact NoSelfContinuation {\n all b: Book | b.continuation_of != b // A book is not allowed to be its own continuation\n}\n\nfact UniqueContinuation {\n all disj b1, b2: Book | b1.continuation_of != b2.continuation_of // One book can't have more than one continuation\n}\n\nfact NoBookInMoreThanOneShelf {\n all disj sh1, sh2: Shelf | all b : Book | sh1.holds = b implies sh2.holds = b \n}\n\npred ThereIsNoLibrarian{\n no Librarian\n}\n\npred DontRentOnDislike {\n all p : Person | all b : Book | p.dislikes = b implies not b.lent_to = p\n}\n\nrun ThereIsNoLibrarian\nrun DontRentOnDislike\nrun {}", "permalink": "cosmos-dusk-upon-flint", "time": "2023-12-03 17:00:47.715844", "cmd": 2} {"id": 7803, "parent": 7802, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\nsig Person {\n likes: set Book,\n dislikes: set Book,\n}\n\n\nsome sig Librarian extends Person {\n recommends: set Book,\n sorting_in: lone Book, \n}\n\nsig Book {\n lent_to: lone Person, // if not sorting_in and not \n continuation_of: lone Book\n}\n\nsome sig Shelf {\n holds: set Book, // books which are not reserved and not in process\n assigned_to: one Librarian\n}\n\nfact ExclusiveLikesDislikes {\n all p: Person |\n p.likes & p.dislikes = none // No book should be both liked and disliked by the same person\n}\n\nfact LibrarianRules {\n all l: Librarian |\n l.dislikes & l.recommends = none\n}\n\nfact NoLendingWhileSortingIn {\n all l: Librarian, b: Book, p : Person |\n l.sorting_in = b implies not b.lent_to = p\n}\n\nfact NoSelfContinuation {\n all b: Book | b.continuation_of != b // A book is not allowed to be its own continuation\n}\n\nfact UniqueContinuation {\n all disj b1, b2: Book | b1.continuation_of != b2.continuation_of // One book can't have more than one continuation\n}\n\nfact NoBookInMoreThanOneShelf {\n all disj sh1, sh2: Shelf | all b : Book | not (sh1.holds = b && sh2.holds = b) \n}\n\npred ThereIsNoLibrarian{\n no Librarian\n}\n\npred DontRentOnDislike {\n all p : Person | all b : Book | p.dislikes = b implies not b.lent_to = p\n}\n\nrun ThereIsNoLibrarian\nrun DontRentOnDislike\nrun {}", "permalink": "exodus-why-ovary-enzyme", "time": "2023-12-03 17:02:16.070787", "cmd": 2} {"id": 7805, "parent": 7804, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\nsig Person {\n likes: set Book,\n dislikes: set Book,\n}\n\n\nsome sig Librarian extends Person {\n recommends: set Book,\n sorting_in: lone Book, \n}\n\nsig Book {\n lent_to: lone Person, // if not sorting_in and not \n continuation_of: lone Book\n}\n\nsome sig Shelf {\n holds: set Book, // books which are not reserved and not in process\n assigned_to: one Librarian\n}\n\nfact ExclusiveLikesDislikes {\n all p: Person |\n p.likes & p.dislikes = none // No book should be both liked and disliked by the same person\n}\n\nfact LibrarianRules {\n all l: Librarian |\n l.dislikes & l.recommends = none\n}\n\nfact NoLendingWhileSortingIn {\n all l: Librarian, b: Book, p : Person |\n l.sorting_in = b implies not b.lent_to = p\n}\n\nfact NoSelfContinuation {\n all b: Book | b.continuation_of != b // A book is not allowed to be its own continuation\n}\n\nfact UniqueContinuation {\n all disj b1, b2: Book | b1.continuation_of != b2.continuation_of // One book can't have more than one continuation\n}\n\nfact NoBookInMoreThanOneShelf {\n all disj sh1, sh2: Shelf | all b : Book | not(sh1.holds = b && sh2.holds = b) \n}\n\npred ThereIsNoLibrarian{\n no Librarian\n}\n\npred DontRentOnDislike {\n all p : Person | all b : Book | p.dislikes = b implies not b.lent_to = p\n}\n\nrun ThereIsNoLibrarian\nrun DontRentOnDislike\nrun {}", "permalink": "autism-glitch-comma-puppet", "time": "2023-12-03 17:02:27.998770", "cmd": 3} {"id": 7806, "parent": 7805, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\nsig Person {\n likes: set Book,\n dislikes: set Book,\n}\n\n\nsome sig Librarian extends Person {\n recommends: set Book,\n sorting_in: lone Book, \n}\n\nsig Book {\n lent_to: lone Person, // if not sorting_in and not \n continuation_of: lone Book\n}\n\nsome sig Shelf {\n holds: set Book, // books which are not reserved and not in process\n assigned_to: one Librarian\n}\n\nfact ExclusiveLikesDislikes {\n all p: Person |\n p.likes & p.dislikes = none // No book should be both liked and disliked by the same person\n}\n\nfact LibrarianRules {\n all l: Librarian |\n l.dislikes & l.recommends = none\n}\n\nfact NoLendingWhileSortingIn {\n all l: Librarian, b: Book, p : Person |\n l.sorting_in = b implies not b.lent_to = p\n}\n\nfact NoSelfContinuation {\n all b: Book | b.continuation_of != b // A book is not allowed to be its own continuation\n}\n\nfact UniqueContinuation {\n all disj b1, b2: Book | b1.continuation_of != b2.continuation_of // One book can't have more than one continuation\n}\n\nfact NoBookInMoreThanOneShelf {\n all disj sh1, sh2: Shelf | all b : Book | sh1.holds = b && sh2.holds != b \n}\n\npred ThereIsNoLibrarian{\n no Librarian\n}\n\npred DontRentOnDislike {\n all p : Person | all b : Book | p.dislikes = b implies not b.lent_to = p\n}\n\nrun ThereIsNoLibrarian\nrun DontRentOnDislike\nrun {}", "permalink": "slider-geiger-spoken-dugout", "time": "2023-12-03 17:03:55.264890", "cmd": 3} {"id": 7807, "parent": 7806, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\nsig Person {\n likes: set Book,\n dislikes: set Book,\n}\n\n\nsome sig Librarian extends Person {\n recommends: set Book,\n sorting_in: lone Book, \n}\n\nsig Book {\n lent_to: lone Person, // if not sorting_in and not \n continuation_of: lone Book\n}\n\nsome sig Shelf {\n holds: set Book, // books which are not reserved and not in process\n assigned_to: one Librarian\n}\n\nfact ExclusiveLikesDislikes {\n all p: Person |\n p.likes & p.dislikes = none // No book should be both liked and disliked by the same person\n}\n\nfact LibrarianRules {\n all l: Librarian |\n l.dislikes & l.recommends = none\n}\n\nfact NoLendingWhileSortingIn {\n all l: Librarian, b: Book, p : Person |\n l.sorting_in = b implies not b.lent_to = p\n}\n\nfact NoSelfContinuation {\n all b: Book | b.continuation_of != b // A book is not allowed to be its own continuation\n}\n\nfact UniqueContinuation {\n all disj b1, b2: Book | b1.continuation_of != b2.continuation_of // One book can't have more than one continuation\n}\n\nfact NoBookInMoreThanOneShelf {\n all disj sh1, sh2: Shelf | all b : Book | sh1.holds = b && sh2.holds != b \n}\n\npred ThereIsNoLibrarian{\n no Librarian\n}\n\npred DontRentOnDislike {\n all p : Person | all b : Book | p.dislikes = b implies not b.lent_to = p\n}\n\n// PRED - Acyclic continuation\n\nrun ThereIsNoLibrarian\nrun DontRentOnDislike", "permalink": "status-police-sturdy-chewy", "time": "2023-12-03 17:05:53.770798", "cmd": 1} {"id": 7811, "parent": 7809, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n}\n\nrun inv3\n\n\n\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all f : File | all p : Protected | all t : Trash | f in p implies not(f in t)\n} \nrun inv4\n\n\n//fact { F1 in Trash }\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all f: File | (f in Protected and not f in Trash) or (not f in Protected and f in Trash)\n}\n\nrun inv5\n\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n all f : File | lone f.link\n}\n\nrun inv6\n\n// Test\n\n\n/* No linked file is deleted. */\npred inv7 {\n all f : File | not (f.*link = none) implies f not in Trash\n}\n\nrun inv7\n\n\n/* There are no links. */\npred inv8 {\n all f : File | f.link = none\n}\n\nrun inv8\n\n\n// one sig F1, F2 extends File {}\n// fact { F1 -> F2 in link }\n\n/* A link does not link to another link. */\npred inv9 {\n all f : File | not (f.link = none) implies f.link.link = none\n // TODO\n}\n\nrun inv9\n\n//fact { F2 in F1.link and F1 in Trash and not (F2 in Trash)}\n//fact { F1 -> F2 in link and F1 + F2 in Trash }\n//fact { F3 -> F4 in link and F3 in Trash and F4 not in Trash }\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n all f1, f2: File | f1 -> f2 in link implies Trash = f1 + f2\n}\nrun inv10", "permalink": "footer-recoil-album-ended", "time": "2023-12-03 20:28:38.593146", "cmd": 10} {"id": 7813, "parent": 6965, "code": "one sig List { \n header: lone Node,\n} \n\nsig Node {\n link: lone Node,\n elem : Int\n}\n\nfact ordered {\n all n : Node | \n some n.link implies \n n.elem < n.link.elem\n}\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3", "permalink": "outing-booted-pound-very", "time": "2023-12-03 21:19:38.518294", "cmd": 1} {"id": 7879, "parent": 7878, "code": "-- module EndUser\none sig EndUser extends Module {\n\tEndUser__cred : one Credential,\n}{\n\tall o : this.sends[UserAgent__EnterCred] | triggeredBy[o,EndUser__PromptForCred]\n\tall o : this.sends[UserAgent__EnterCred] | o.(UserAgent__EnterCred <: UserAgent__EnterCred__cred) = EndUser__cred\n\tall o : this.sends[UserAgent__EnterCred] | o.(UserAgent__EnterCred <: UserAgent__EnterCred__uri) = o.trigger.((EndUser__PromptForCred <: EndUser__PromptForCred__uri))\n\tthis.initAccess in NonCriticalData + EndUser__cred + Credential\n}\n\n-- module UserAgent\none sig UserAgent extends Module {\n\tUserAgent__knownClients : set ClientID,\n}{\n\tall o : this.receives[UserAgent__InitFlow] | (some (UserAgent__knownClients & o.(UserAgent__InitFlow <: UserAgent__InitFlow__id)))\n\tall o : this.sends[EndUser__PromptForCred] | triggeredBy[o,UserAgent__InitFlow]\n\tall o : this.sends[EndUser__PromptForCred] | o.(EndUser__PromptForCred <: EndUser__PromptForCred__uri) = o.trigger.((UserAgent__InitFlow <: UserAgent__InitFlow__redirect))\n\tall o : this.sends[AuthServer__ReqAuth] | triggeredBy[o,UserAgent__EnterCred]\n\tall o : this.sends[AuthServer__ReqAuth] | o.(AuthServer__ReqAuth <: AuthServer__ReqAuth__cred) = o.trigger.((UserAgent__EnterCred <: UserAgent__EnterCred__cred))\n\tall o : this.sends[AuthServer__ReqAuth] | o.(AuthServer__ReqAuth <: AuthServer__ReqAuth__uri) = o.trigger.((UserAgent__EnterCred <: UserAgent__EnterCred__uri))\n\tall o : this.sends[ClientServer__SendAuthResp] | triggeredBy[o,UserAgent__Redirect]\n\tall o : this.sends[ClientServer__SendAuthResp] | o.(ClientServer__SendAuthResp <: ClientServer__SendAuthResp__uri) = o.trigger.((UserAgent__Redirect <: UserAgent__Redirect__uri))\n\t(some (ClientServer__id & UserAgent__knownClients))\n\tthis.initAccess in NonCriticalData + UserAgent__knownClients\n}\n\n-- module ClientServer\none sig ClientServer extends Module {\n\tClientServer__addr : one URI,\n\tClientServer__id : one ClientID,\n\tClientServer__scope : one Scope,\n}{\n\tall o : this.sends[UserAgent__InitFlow] | o.(UserAgent__InitFlow <: UserAgent__InitFlow__redirect) = ClientServer__addr\n\tthis.initAccess in NonCriticalData + ClientServer__addr + ClientServer__id + ClientServer__scope\n}\n\n-- module AuthServer\none sig AuthServer extends Module {\n\tAuthServer__authGrants : Credential set -> lone AuthGrant,\n\tAuthServer__accessTokens : AuthGrant set -> lone AccessToken,\n}{\n\tall o : this.receives[AuthServer__ReqAuth] | (some AuthServer__authGrants[o.(AuthServer__ReqAuth <: AuthServer__ReqAuth__cred)])\n\tall o : this.receives[AuthServer__ReqAccessToken] | (some AuthServer__accessTokens[o.(AuthServer__ReqAccessToken <: AuthServer__ReqAccessToken__authGrant)])\n\tall o : this.sends[UserAgent__Redirect] | triggeredBy[o,AuthServer__ReqAuth]\n\tall o : this.sends[UserAgent__Redirect] | (o.(UserAgent__Redirect <: UserAgent__Redirect__uri).URI__addr = o.trigger.((AuthServer__ReqAuth <: AuthServer__ReqAuth__uri)).URI__addr and (some (o.(UserAgent__Redirect <: UserAgent__Redirect__uri).URI__params & AuthServer__authGrants[o.trigger.((AuthServer__ReqAuth <: AuthServer__ReqAuth__cred))])))\n\tall o : this.sends[ClientServer__SendAccessToken] | triggeredBy[o,AuthServer__ReqAccessToken]\n\tall o : this.sends[ClientServer__SendAccessToken] | o.(ClientServer__SendAccessToken <: ClientServer__SendAccessToken__token) = AuthServer__accessTokens[o.trigger.((AuthServer__ReqAccessToken <: AuthServer__ReqAccessToken__authGrant))]\n\tthis.initAccess in NonCriticalData + Credential.AuthServer__authGrants + AuthServer__authGrants.AuthGrant + AuthGrant.AuthServer__accessTokens + AuthServer__accessTokens.AccessToken + AuthGrant + AccessToken\n}\n\n-- module ResourceServer\none sig ResourceServer extends Module {\n\tResourceServer__resources : AccessToken set -> lone Resource,\n}{\n\tall o : this.receives[ResourceServer__ReqResource] | (some ResourceServer__resources[o.(ResourceServer__ReqResource <: ResourceServer__ReqResource__accessToken)])\n\tall o : this.sends[ClientServer__SendResource] | triggeredBy[o,ResourceServer__ReqResource]\n\tall o : this.sends[ClientServer__SendResource] | o.(ClientServer__SendResource <: ClientServer__SendResource__res) = ResourceServer__resources[o.trigger.((ResourceServer__ReqResource <: ResourceServer__ReqResource__accessToken))]\n\tthis.initAccess in NonCriticalData + AccessToken.ResourceServer__resources + ResourceServer__resources.Resource + Resource\n}\n\n\n-- fact trustedModuleFacts\nfact trustedModuleFacts {\n\tTrustedModule = EndUser + UserAgent + ClientServer + AuthServer + ResourceServer\n}\n\n-- operation EndUser__PromptForCred\nsig EndUser__PromptForCred extends Op {\n\tEndUser__PromptForCred__uri : one URI,\n}{\n\targs in EndUser__PromptForCred__uri\n\tno ret\n\tsender in UserAgent\n\treceiver in EndUser\n}\n\n-- operation UserAgent__InitFlow\nsig UserAgent__InitFlow extends Op {\n\tUserAgent__InitFlow__redirect : one URI,\n\tUserAgent__InitFlow__id : one ClientID,\n\tUserAgent__InitFlow__scope : one Scope,\n}{\n\targs in UserAgent__InitFlow__redirect + UserAgent__InitFlow__id + UserAgent__InitFlow__scope\n\tno ret\n\tsender in ClientServer\n\treceiver in UserAgent\n}\n\n-- operation UserAgent__EnterCred\nsig UserAgent__EnterCred extends Op {\n\tUserAgent__EnterCred__cred : one Credential,\n\tUserAgent__EnterCred__uri : one URI,\n}{\n\targs in UserAgent__EnterCred__cred + UserAgent__EnterCred__uri\n\tno ret\n\tsender in EndUser\n\treceiver in UserAgent\n}\n\n-- operation UserAgent__Redirect\nsig UserAgent__Redirect extends Op {\n\tUserAgent__Redirect__uri : one URI,\n}{\n\targs in UserAgent__Redirect__uri\n\tno ret\n\tsender in AuthServer\n\treceiver in UserAgent\n}\n\n-- operation ClientServer__SendAuthResp\nsig ClientServer__SendAuthResp extends Op {\n\tClientServer__SendAuthResp__uri : one URI,\n}{\n\targs in ClientServer__SendAuthResp__uri\n\tno ret\n\tsender in UserAgent\n\treceiver in ClientServer\n}\n\n-- operation ClientServer__SendAccessToken\nsig ClientServer__SendAccessToken extends Op {\n\tClientServer__SendAccessToken__token : one AccessToken,\n}{\n\targs in ClientServer__SendAccessToken__token\n\tno ret\n\tsender in AuthServer\n\treceiver in ClientServer\n}\n\n-- operation ClientServer__SendResource\nsig ClientServer__SendResource extends Op {\n\tClientServer__SendResource__res : one Resource,\n}{\n\targs in ClientServer__SendResource__res\n\tno ret\n\tsender in ResourceServer\n\treceiver in ClientServer\n}\n\n-- operation AuthServer__ReqAuth\nsig AuthServer__ReqAuth extends Op {\n\tAuthServer__ReqAuth__cred : one Credential,\n\tAuthServer__ReqAuth__uri : one URI,\n}{\n\targs in AuthServer__ReqAuth__cred + AuthServer__ReqAuth__uri\n\tno ret\n\tsender in UserAgent\n\treceiver in AuthServer\n}\n\n-- operation AuthServer__ReqAccessToken\nsig AuthServer__ReqAccessToken extends Op {\n\tAuthServer__ReqAccessToken__authGrant : one AuthGrant,\n}{\n\targs in AuthServer__ReqAccessToken__authGrant\n\tno ret\n\tsender in ClientServer\n\treceiver in AuthServer\n}\n\n-- operation ResourceServer__ReqResource\nsig ResourceServer__ReqResource extends Op {\n\tResourceServer__ReqResource__accessToken : one AccessToken,\n}{\n\targs in ResourceServer__ReqResource__accessToken\n\tno ret\n\tsender in ClientServer\n\treceiver in ResourceServer\n}\n\n-- datatype declarations\nabstract sig Payload extends Data {\n}{\n}\nsig AuthCode extends Payload {\n}{\n\tno fields\n}\nsig AuthGrant extends Payload {\n}{\n\tno fields\n}\nsig Credential extends Payload {\n}{\n\tno fields\n}\nsig AccessToken extends Payload {\n}{\n\tno fields\n}\nsig Resource extends Payload {\n}{\n\tno fields\n}\nsig ClientID extends Payload {\n}{\n\tno fields\n}\nsig Scope extends Payload {\n}{\n\tno fields\n}\nsig Addr extends Data {\n}{\n\tno fields\n}\nsig URI extends Data {\n\tURI__addr : one Addr,\n\tURI__params : set Payload,\n}{\n\tfields in URI__addr + URI__params\n}\nsig OtherData extends Data {}{ no fields }\n\n-- fact criticalDataFacts\nfact criticalDataFacts {\n\tCriticalData = Resource\n}\n\nrun SanityCheck {\n some EndUser__PromptForCred & SuccessOp\n some UserAgent__InitFlow & SuccessOp\n some UserAgent__EnterCred & SuccessOp\n some UserAgent__Redirect & SuccessOp\n some ClientServer__SendAuthResp & SuccessOp\n some ClientServer__SendAccessToken & SuccessOp\n some ClientServer__SendResource & SuccessOp\n some AuthServer__ReqAuth & SuccessOp\n some AuthServer__ReqAccessToken & SuccessOp\n some ResourceServer__ReqResource & SuccessOp\n} for 2 but 10 Data, 10 Op, 5 Module\n\n\ncheck Confidentiality {\n Confidentiality\n} for 2 but 10 Data, 10 Op, 5 Module\n\n\n-- check who can create CriticalData\ncheck Integrity {\n Integrity\n} for 2 but 10 Data, 10 Op, 5 Module", "permalink": "hurler-sushi-kick-pulse", "time": "2023-12-04 23:29:20.555209", "cmd": 1} {"id": 7884, "parent": 6965, "code": "one sig List { \n header: lone Node,\n} \n\nsig Node {\n link: lone Node,\n elem : Int\n}\n\nfact ordered {\n all n : Node | \n some n.link implies \n n.elem < n.link.elem\n}\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3", "permalink": "likely-unhook-bunt-gummy", "time": "2023-12-05 08:33:32.481697", "cmd": 1} {"id": 7888, "parent": 6979, "code": "one sig List {\n header: lone Node \n} \nsig Node {\n link: lone Node \n}\nfact noDanglingNodes {\n Node in List.header.*link\n}\n\nrun { no n : List.header.*link | no n.link } for 3", "permalink": "wrist-tiny-yogurt-smudgy", "time": "2023-12-05 08:57:59.292193", "cmd": 1} {"id": 7896, "parent": 7894, "code": "sig Guest {}\nsig Drunk in Guest {}\n\npred drinkers {\n some x : Guest |\n x in Drunk implies all y : Guest |\n y in Drunk\n}\n\nrun drinkers for 3", "permalink": "status-cringe-mutt-excuse", "time": "2023-12-05 09:05:38.414456", "cmd": 1} {"id": 7914, "parent": 7913, "code": "sig List { header: lone Node } \n\nsig Node { link: lone Node }\n\nfact {\n Node = List.header.*link\n}\n\npred acyclic(l: List){\n no l.header or some n : l.header.*link | no n.link\n}\n\n\nrun {one lst : List | acyclic(lst)}", "permalink": "mama-stem-boxing-graph", "time": "2023-12-05 09:28:29.733823", "cmd": 1} {"id": 7917, "parent": 7915, "code": "sig List { header: lone Node } \n\nsig Node { link: lone Node }\n\nfact {\n Node = List.header.*link\n}\n\npred acyclic(l: List){\n no l.header or some n : l.header.*link | no n.link\n}\n\n\nrun {all lst : List | acyclic[lst]}", "permalink": "lion-upheld-revert-august", "time": "2023-12-05 09:29:12.833163", "cmd": 1} {"id": 7971, "parent": 7970, "code": "abstract sig Person {\n name: one String,\n borrowedBooks: set Book\n }\n\n sig Member extends Person {\n overdueBooks: set Book\n }\n\n sig Librarian extends Person {\n managedBooks: set Book\n }\n\n sig Book {\n title: one String,\n authors: set String,\n isAvailable: one Bool\n }\n\n sig Catalog {\n books: set Book,\n availableBooks: set Book\n }\n\n // Facts\n fact AllBooksInCatalog {\n all b: Book | b in Catalog.books\n }\n\n fact AvailableBooks {\n Catalog.availableBooks = {b: Book | b.isAvailable = True}\n }\n\n // Predicates\n pred IsValidLoan(m: Member, b: Book) {\n b in Catalog.availableBooks and\n b not in m.borrowedBooks\n }\n\n pred IsOverdueLoan(m: Member, b: Book) {\n b in m.overdueBooks and\n b.isAvailable = False\n }\n\n // Assertions\n assert NoOverdueBooksWhenAvailable {\n no m: Member | some b: m.overdueBooks & Catalog.availableBooks\n }\n\n assert LibrarianManagesUnavailableBooksOnly {\n all l: Librarian | all b: l.managedBooks | b.isAvailable = False\n }\n\n // Run commands\n run IsValidLoan for 4 // This is likely to be satisfiable as it is common for loans to be valid.\n run IsOverdueLoan for 4 // This may be unsatisfiable without additional context, such as a loan period or return dates", "permalink": "shrink-size-skater-flaky", "time": "2023-12-05 10:16:41.589503", "cmd": 2} {"id": 7988, "parent": 7987, "code": "abstract sig Person {\n borrowedBooks: set Loan,\n university: one University\n}\n\nsig Student extends Person {\n enrolledCourses: set Course\n}\n\nsig Professor extends Person {\n taughtCourses: set Course\n}\n\nsig Book {\n loanedTo: set Loan,\n inCatalog: one Catalog\n}\n\nsig Loan {\n book: one Book,\n borrower: one Person\n}\n\nsig Course {\n students: set Student,\n professor: one Professor\n}\n\nsig Catalog {\n books: set Book,\n university: one University\n}\n\nsig University {\n libraryCatalog: one Catalog,\n members: set Person\n}\n\n// Facts\nfact AllBooksLoanedAreInCatalog {\n all b: Book | b in b.loanedTo.book => b in b.inCatalog.books\n}\n\nfact StudentsBorrowBooksForCourses {\n all s: Student | all b: s.borrowedBooks.book | some c: s.enrolledCourses & b in c.students.borrowedBooks.book\n}\n\n// Predicates\npred ValidLoan(s: Student, b: Book) {\n b in s.university.libraryCatalog.books and\n b not in s.borrowedBooks.book\n}\n\npred ProfessorTeachesCourse(p: Professor, c: Course) {\n c in p.taughtCourses and\n p in c.professor\n}\n\n// Run commands\nrun ValidLoan for 3 // Likely to be satisfiable\nrun ProfessorTeachesCourse for 3 // Likely to be unsatisfiable without proper setup", "permalink": "shrine-bucked-polka-uproot", "time": "2023-12-05 11:13:08.478610", "cmd": 1} {"id": 7993, "parent": 7992, "code": "abstract sig Person {\n loans: set Loan,\n memberOfLibrary: one Library\n}\n\nsig Student extends Person {\n enrolledCourses: set Course\n}\n\nsig Professor extends Person {\n taughtCourses: set Course\n}\n\nsig Book {\n inLibrary: one Library,\n loanedBy: set Loan\n}\n\nsig Loan {\n borrower: one Person,\n book: one Book\n}\n\nsig Library {\n books: set Book,\n members: set Person\n}\n\nsig Course {}\n\n// Facts\nfact AllLoansMatchLibrary {\n all l: Loan | l.borrower.memberOfLibrary = l.book.inLibrary\n}\n\nfact NoSelfLoan {\n no l: Loan | l.borrower.loans = l.book.loanedBy\n}\n\n// Predicates\npred ValidLoan(b: Book, p: Person) {\n b in p.memberOfLibrary.books and\n b not in p.loans.book\n}\n\npred InvalidLoan(b: Book, p: Person) {\n b not in p.memberOfLibrary.books or\n b in p.loans.book\n}\n\n// Run commands\nrun ValidLoan for 5 // Satisfiable: finding valid loan scenarios\nrun InvalidLoan for 5 // Unlikely to be satisfiable due to constraints", "permalink": "badly-coma-outage-staple", "time": "2023-12-05 11:15:51.161749", "cmd": 1} {"id": 7996, "parent": 7995, "code": "sig Student {\n studentId: Int,\n name: String\n}\n\nsig Professor {\n professorId: Int,\n name: String\n}\n\nsig Course {\n courseId: Int,\n name: String,\n professor: Professor\n}\n\nsig Enrollment {\n enrollmentId: Int,\n student: Student,\n course: Course\n}\n\nfact StudentsHaveUniqueIDs {\n all s1, s2: Student | s1 != s2 => s1.studentId != s2.studentId\n}\n\nfact ProfessorsHaveUniqueIDs {\n all p1, p2: Professor | p1 != p2 => p1.professorId != p2.professorId\n}\n\nfact CoursesHaveUniqueIDs {\n all c1, c2: Course | c1 != c2 => c1.courseId != c2.courseId\n}\n\nfact EnrollmentsHaveUniqueIDs {\n all e1, e2: Enrollment | e1 != e2 => e1.enrollmentId != e2.enrollmentId\n}\n\nfact StudentsEnrollInCourses {\n all s: Student, c: Course | some e: Enrollment | e.student = s and e.course = c\n}\n\npred StudentEnrolledInCourse[s: Student, c: Course] {\n some e: Enrollment | e.student = s and e.course = c\n}\n\npred ProfessorTeachesCourse[p: Professor, c: Course] {\n c.professor = p\n}\n\nrun {\n // This run command is intentionally unsatisfiable\n no s: Student, c: Course | s.enrollments = c.enrollments\n} for 5\n\nrun {\n // This run command is satisfiable and returns at least 2 instances\n some s: Student, c: Course | StudentEnrolledInCourse[s, c]\n} for 5", "permalink": "trend-filler-unwary-doozy", "time": "2023-12-05 11:16:45.383271", "cmd": 2} {"id": 7999, "parent": 7998, "code": "sig Student {\n studentId: Int,\n name: String\n}\n\nsig Professor {\n professorId: Int,\n name: String\n}\n\nsig Course {\n courseId: Int,\n name: String,\n professor: Professor\n}\n\nsig Enrollment {\n enrollmentId: Int,\n student: Student,\n course: Course\n}\n\nfact StudentsHaveUniqueIDs {\n all s1, s2: Student | s1 != s2 => s1.studentId != s2.studentId\n}\n\nfact ProfessorsHaveUniqueIDs {\n all p1, p2: Professor | p1 != p2 => p1.professorId != p2.professorId\n}\n\nfact CoursesHaveUniqueIDs {\n all c1, c2: Course | c1 != c2 => c1.courseId != c2.courseId\n}\n\nfact EnrollmentsHaveUniqueIDs {\n all e1, e2: Enrollment | e1 != e2 => e1.enrollmentId != e2.enrollmentId\n}\n\nfact StudentsEnrollInCourses {\n all s: Student, c: Course | some e: Enrollment | e.student = s and e.course = c\n}\n\npred StudentEnrolledInCourse[s: Student, c: Course] {\n some e: Enrollment | e.student = s and e.course = c\n}\n\npred ProfessorTeachesCourse[p: Professor, c: Course] {\n c.professor = p\n}\n\nrun {\n // This run command is intentionally unsatisfiable\n no s: Student, c: Course | some e: Enrollment | e.student = s and e.course = c\n} for 5\n\nrun {\n // This run command is satisfiable and returns at least 2 instances\n some s: Student, c: Course | StudentEnrolledInCourse[s, c]\n} for 5", "permalink": "thing-grid-ashen-bunny", "time": "2023-12-05 11:18:11.626797", "cmd": 2} {"id": 8000, "parent": 7999, "code": "sig User {\n userId: Int,\n username: String\n}\n\nsig Post {\n postId: Int,\n content: String,\n author: User\n}\n\nsig Comment {\n commentId: Int,\n text: String,\n author: User,\n onPost: Post\n}\n\nabstract sig Likeable {\n likes: set User\n}\n\nsig LikeablePost extends Post, Likeable {}\n\nfact UsersHaveUniqueIDs {\n all u1, u2: User | u1 != u2 => u1.userId != u2.userId\n}\n\nfact PostsHaveUniqueIDs {\n all p1, p2: Post | p1 != p2 => p1.postId != p2.postId\n}\n\nfact CommentsHaveUniqueIDs {\n all c1, c2: Comment | c1 != c2 => c1.commentId != c2.commentId\n}\n\nfact UsersAuthorTheirPosts {\n all u: User, p: Post | p.author = u\n}\n\npred UserLikesPost[u: User, lp: LikeablePost] {\n u in lp.likes\n}\n\npred UserCommentedOnPost[u: User, c: Comment] {\n u = c.author and c.onPost.author != u\n}\n\nrun {\n // This run command is intentionally unsatisfiable\n no u: User | some p: Post | u.likes = p.likes\n} for 5\n\nrun {\n // This run command is satisfiable and returns at least 2 instances\n some u: User, p: LikeablePost | u.likes = p.likes\n} for 5", "permalink": "runway-recopy-stingy-race", "time": "2023-12-05 11:18:32.519705", "cmd": 1} {"id": 8001, "parent": 8000, "code": "sig Student {\n studentId: Int,\n name: String\n}\n\nsig Professor {\n professorId: Int,\n name: String\n}\n\nsig Course {\n courseId: Int,\n name: String,\n professor: Professor\n}\n\nsig Enrollment {\n enrollmentId: Int,\n student: Student,\n course: Course\n}\n\nfact StudentsHaveUniqueIDs {\n all s1, s2: Student | s1 != s2 => s1.studentId != s2.studentId\n}\n\nfact ProfessorsHaveUniqueIDs {\n all p1, p2: Professor | p1 != p2 => p1.professorId != p2.professorId\n}\n\nfact CoursesHaveUniqueIDs {\n all c1, c2: Course | c1 != c2 => c1.courseId != c2.courseId\n}\n\nfact EnrollmentsHaveUniqueIDs {\n all e1, e2: Enrollment | e1 != e2 => e1.enrollmentId != e2.enrollmentId\n}\n\nfact StudentsEnrollInCourses {\n all s: Student, c: Course | some e: Enrollment | e.student = s and e.course = c\n}\n\npred StudentEnrolledInCourse[s: Student, c: Course] {\n some e: Enrollment | e.student = s and e.course = c\n}\n\npred ProfessorTeachesCourse[p: Professor, c: Course] {\n c.professor = p\n}\n\nrun {\n // This run command is intentionally unsatisfiable\n no s: Student, c: Course | some e: Enrollment | e.student = s and e.course = c\n} for 5\n\nrun {\n // This run command is satisfiable and returns at least 2 instances\n some s: Student, c: Course | StudentEnrolledInCourse[s, c]\n} for 5", "permalink": "small-radio-ecard-ascend", "time": "2023-12-05 11:18:48.287639", "cmd": 1} {"id": 8003, "parent": 8001, "code": "sig Student {\n studentId: Int,\n name: String\n}\n\nsig Professor {\n professorId: Int,\n name: String\n}\n\nsig Course {\n courseId: Int,\n name: String,\n professor: Professor\n}\n\nsig Enrollment {\n enrollmentId: Int,\n student: Student,\n course: Course\n}\n\nfact StudentsHaveUniqueIDs {\n all s1, s2: Student | s1 != s2 => s1.studentId != s2.studentId\n}\n\nfact ProfessorsHaveUniqueIDs {\n all p1, p2: Professor | p1 != p2 => p1.professorId != p2.professorId\n}\n\nfact CoursesHaveUniqueIDs {\n all c1, c2: Course | c1 != c2 => c1.courseId != c2.courseId\n}\n\nfact EnrollmentsHaveUniqueIDs {\n all e1, e2: Enrollment | e1 != e2 => e1.enrollmentId != e2.enrollmentId\n}\n\nfact StudentsEnrollInCourses {\n all s: Student, c: Course | some e: Enrollment | e.student = s and e.course = c\n}\n\npred StudentEnrolledInCourse[s: Student, c: Course] {\n some e: Enrollment | e.student = s and e.course = c\n}\n\npred ProfessorTeachesCourse[p: Professor, c: Course] {\n c.professor = p\n}\n\nrun {\n // This run command is intentionally unsatisfiable\n no s: Student, c: Course | some e: Enrollment | e.student = s and e.course = c\n} for 5\n\nrun {\n // This run command is satisfiable and returns at least 2 instances\n some s: Student, c: Course | StudentEnrolledInCourse[s, c]\n} for 5", "permalink": "cobalt-backed-unplug-length", "time": "2023-12-05 11:18:58.391901", "cmd": 2} {"id": 8004, "parent": 8003, "code": "sig Student {\n studentId: Int,\n name: String\n}\n\nsig Professor {\n professorId: Int,\n name: String\n}\n\nsig Course {\n courseId: Int,\n name: String,\n professor: Professor\n}\n\nsig Enrollment {\n enrollmentId: Int,\n student: Student,\n course: Course\n}\n\nfact StudentsHaveUniqueIDs {\n all s1, s2: Student | s1 != s2 => s1.studentId != s2.studentId\n}\n\nfact ProfessorsHaveUniqueIDs {\n all p1, p2: Professor | p1 != p2 => p1.professorId != p2.professorId\n}\n\nfact CoursesHaveUniqueIDs {\n all c1, c2: Course | c1 != c2 => c1.courseId != c2.courseId\n}\n\nfact EnrollmentsHaveUniqueIDs {\n all e1, e2: Enrollment | e1 != e2 => e1.enrollmentId != e2.enrollmentId\n}\n\nfact StudentsEnrollInCourses {\n all s: Student, c: Course | some e: Enrollment | e.student = s and e.course = c\n}\n\npred StudentEnrolledInCourse[s: Student, c: Course] {\n some e: Enrollment | e.student = s and e.course = c\n}\n\npred ProfessorTeachesCourse[p: Professor, c: Course] {\n c.professor = p\n}\n\nrun {\n // This run command is intentionally unsatisfiable\n no s: Student, c: Course | some e: Enrollment | e.student = s and e.course = c\n} for 5\n\nrun {\n some s: Student, c: Course | StudentEnrolledInCourse[s, c] and StudentEnrolledInCourse[s, c']\n} for 5", "permalink": "sepia-repeal-starch-whoops", "time": "2023-12-05 11:19:39.715750", "cmd": 2} {"id": 8005, "parent": 8004, "code": "sig Student {\n studentId: Int,\n name: String\n}\n\nsig Professor {\n professorId: Int,\n name: String\n}\n\nsig Course {\n courseId: Int,\n name: String,\n professor: Professor\n}\n\nsig Enrollment {\n enrollmentId: Int,\n student: Student,\n course: Course\n}\n\nfact StudentsHaveUniqueIDs {\n all s1, s2: Student | s1 != s2 => s1.studentId != s2.studentId\n}\n\nfact ProfessorsHaveUniqueIDs {\n all p1, p2: Professor | p1 != p2 => p1.professorId != p2.professorId\n}\n\nfact CoursesHaveUniqueIDs {\n all c1, c2: Course | c1 != c2 => c1.courseId != c2.courseId\n}\n\nfact EnrollmentsHaveUniqueIDs {\n all e1, e2: Enrollment | e1 != e2 => e1.enrollmentId != e2.enrollmentId\n}\n\nfact StudentsEnrollInCourses {\n all s: Student, c: Course | some e: Enrollment | e.student = s and e.course = c\n}\n\npred StudentEnrolledInCourse[s: Student, c: Course] {\n some e: Enrollment | e.student = s and e.course = c\n}\n\npred ProfessorTeachesCourse[p: Professor, c: Course] {\n c.professor = p\n}\n\nrun {\n // This run command is intentionally unsatisfiable\n no s: Student, c: Course | some e: Enrollment | e.student = s and e.course = c\n} for 5\n\nrun {\n some s: Student, c: Course | StudentEnrolledInCourse[s, c] and StudentEnrolledInCourse[s, c']\n} for 5", "permalink": "depict-bunch-washer-bright", "time": "2023-12-05 11:19:43.882002", "cmd": 1} {"id": 8010, "parent": 8009, "code": "sig Student {\n studentId: Int,\n name: String\n}\n\nsig Professor {\n professorId: Int,\n name: String\n}\n\nsig Course {\n courseId: Int,\n name: String,\n professor: Professor\n}\n\nsig Enrollment {\n enrollmentId: Int,\n student: Student,\n course: Course\n}\n\nfact StudentsHaveUniqueIDs {\n all s1, s2: Student | s1 != s2 => s1.studentId != s2.studentId\n}\n\nfact ProfessorsHaveUniqueIDs {\n all p1, p2: Professor | p1 != p2 => p1.professorId != p2.professorId\n}\n\nfact CoursesHaveUniqueIDs {\n all c1, c2: Course | c1 != c2 => c1.courseId != c2.courseId\n}\n\nfact EnrollmentsHaveUniqueIDs {\n all e1, e2: Enrollment | e1 != e2 => e1.enrollmentId != e2.enrollmentId\n}\n\nfact StudentsEnrollInCourses {\n all s: Student, c: Course | some e: Enrollment | e.student = s and e.course = c\n}\n\npred StudentEnrolledInCourse[s: Student, c: Course] {\n some e: Enrollment | e.student = s and e.course = c\n}\n\npred ProfessorTeachesCourse[p: Professor, c: Course] {\n c.professor = p\n}\n\nrun {\n // This run command is intentionally unsatisfiable\n no s: Student, c: Course | some e: Enrollment | e.student = s and e.course = c\n} for 5\n\nrun {\n some s: Student, c1: Course, c2: Course | \n (s.StudentEnrolledInCourse[c1] and s.StudentEnrolledInCourse[c2] and c1 != c2)\n} for 5", "permalink": "quote-aloe-flight-repair", "time": "2023-12-05 11:21:27.579380", "cmd": 2} {"id": 8013, "parent": 8012, "code": "sig Animal {\n animalId: Int,\n name: String,\n species: String\n}\n\nsig Enclosure {\n enclosureId: Int,\n name: String,\n capacity: Int\n}\n\nsig Zookeeper {\n zookeeperId: Int,\n name: String\n}\n\nsig Feeding {\n feedingId: Int,\n animal: Animal,\n zookeeper: Zookeeper,\n time: Int\n}\n\nfact AnimalsHaveUniqueIDs {\n all a1, a2: Animal | a1 != a2 => a1.animalId != a2.animalId\n}\n\nfact EnclosuresHaveUniqueIDs {\n all e1, e2: Enclosure | e1 != e2 => e1.enclosureId != e2.enclosureId\n}\n\nfact ZookeepersHaveUniqueIDs {\n all z1, z2: Zookeeper | z1 != z2 => z1.zookeeperId != z2.zookeeperId\n}\n\nfact FeedingsHaveUniqueIDs {\n all f1, f2: Feeding | f1 != f2 => f1.feedingId != f2.feedingId\n}\n\npred AnimalInEnclosure[a: Animal, e: Enclosure] {\n some e.animals = a\n}\n\npred ZookeeperFeedsAnimal[z: Zookeeper, a: Animal] {\n some f: Feeding | f.zookeeper = z and f.animal = a\n}\n\nrun {\n // This run command is intentionally unsatisfiable\n no a: Animal, e: Enclosure | AnimalInEnclosure[a, e] and e.capacity = 0\n} for 5\n\nrun {\n // This run command is satisfiable and returns at least 2 instances\n some a: Animal, e: Enclosure | AnimalInEnclosure[a, e] and e.capacity > 0\n} for 5", "permalink": "caucus-conch-revert-blurt", "time": "2023-12-05 11:22:55.019437", "cmd": 1} {"id": 7784, "parent": 7783, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nabstract sig Person{\n name: one Name,\n email: one Email\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n department: one Department\n \n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// Name\nsig Name{}\n\n// Email\nsig Email{}\n\n// Title\nsig Title{\n name: Title\n}\n\n// Membership\nsig Membership{\n\n}\n\n// Department\nsig Department {}\n\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Each book has unique titles\nfact EachBookHasUniqueTitles {\n all title: Title | one name.title\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "volley-humped-lapel-modify", "time": "2023-12-03 13:54:02.837583", "cmd": 2} {"id": 7786, "parent": 7785, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nabstract sig Person{\n name: one Name,\n email: one Email\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n department: one Department\n \n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// Name\nsig Name{}\n\n// Email\nsig Email{}\n\n// Title\nsig Title{\n name: Title\n}\n\n// Membership\nsig Membership{\n\n}\n\n// Department\nsig Department {}\n\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Each book has unique titles\nfact EachBookHasUniqueTitles {\n all title: Title | one name.title\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "sprain-tidy-barbed-tarmac", "time": "2023-12-03 13:54:30.393563", "cmd": 2} {"id": 7789, "parent": 7788, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nsig Person{\n name: one Name,\n email: one Email\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n department: one Department\n \n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// Name\nsig Name{\n firstName: String,\n lastName: String\n}\n\n// Email\nsig Email{}\n\n// Title\nsig Title{}\n\n// Membership\nsig Membership{}\n\n// Department\nsig Department {}\n\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "sandy-halves-clump-sloppy", "time": "2023-12-03 14:00:16.559611", "cmd": 2} {"id": 7790, "parent": 7789, "code": "// Car Rental Service Model\n\n// Vehicle\nabstract sig Vehicle {\n licensePlate: one LicensePlate,\n model: one Model\n}\n\n// Car extends Vehicle\nsig Car extends Vehicle {\n fuelType: one FuelType,\n isAvailable: Bool // Boolean to indicate availability\n}\n\n// Customer\nsig Customer {\n personalInfo: one Name,\n rentedCars: set Car\n}\n\n// RentalContract\nsig RentalContract {\n customer: one Customer,\n cars: set Car,\n contractDuration: Int\n}\n\n// Enhanced Signatures with Additional Fields\nsig LicensePlate {\n number: String,\n issuedBy: String\n}\n\nsig Model {\n name: String,\n manufacturer: one Manufacturer\n}\n\nsig FuelType {\n type: String,\n octaneRating: Int\n}\n\nsig Name {\n firstName: String,\n lastName: String\n}\n\nsig Manufacturer {}\n\n// Facts\n\n// A car can only be part of one rental contract at a time\nfact carUniqueToContract {\n all c1, c2: RentalContract | no c1.cars & c2.cars\n}\n\n// Customers cannot rent unavailable cars\nfact cannotRentUnavailableCars {\n all c: Customer | all car: c.rentedCars | car.isAvailable = True\n}\n\n// Predicates\n\n// Check if any customer has rented more than one car\npred customerRentedMoreThanOneCar {\n some c: Customer | #c.rentedCars > 1\n}\n\n// Check for existence of rental contracts with more than two cars\npred contractsWithManyCars {\n some rc: RentalContract | #rc.cars > 2\n}\n\n// Run commands\n\n// This should be unsatisfiable as no customer can rent unavailable cars\nrun customerRentedMoreThanOneCar for 5 but 0 Bool\n\n// This should be satisfiable and return at least 2 instances\nrun contractsWithManyCars for 5", "permalink": "stoic-deluge-lesser-kisser", "time": "2023-12-03 14:00:30.174679", "cmd": 1} {"id": 7791, "parent": 7790, "code": "// Car Rental Service Model\n\n// Vehicle\nabstract sig Vehicle {\n licensePlate: one LicensePlate,\n model: one Model\n}\n\n// Car extends Vehicle\nsig Car extends Vehicle {\n fuelType: one FuelType,\n isAvailable: Bool // Boolean to indicate availability\n}\n\n// Customer\nsig Customer {\n personalInfo: one Name,\n rentedCars: set Car\n}\n\n// RentalContract\nsig RentalContract {\n customer: one Customer,\n cars: set Car,\n contractDuration: Int\n}\n\n// Enhanced Signatures with Additional Fields\nsig LicensePlate {\n number: String,\n issuedBy: String\n}\n\nsig Model {\n name: String,\n manufacturer: one Manufacturer\n}\n\nsig FuelType {\n type: String,\n octaneRating: Int\n}\n\nsig Name {\n firstName: String,\n lastName: String\n}\n\nsig Manufacturer {}\n\n// Facts\n\n// A car can only be part of one rental contract at a time\nfact carUniqueToContract {\n all c1, c2: RentalContract | no c1.cars & c2.cars\n}\n\n// Customers cannot rent unavailable cars\nfact cannotRentUnavailableCars {\n all c: Customer | all car: c.rentedCars | car.isAvailable = True\n}\n\n// Predicates\n\n// Check if any customer has rented more than one car\npred customerRentedMoreThanOneCar {\n some c: Customer | #c.rentedCars > 1\n}\n\n// Check for existence of rental contracts with more than two cars\npred contractsWithManyCars {\n some rc: RentalContract | #rc.cars > 2\n}\n\n// Run commands\n\n// This should be unsatisfiable as no customer can rent unavailable cars\nrun customerRentedMoreThanOneCar for 5 but 0 Bool\n\n// This should be satisfiable and return at least 2 instances\nrun contractsWithManyCars for 5", "permalink": "puma-tamale-dreamt-yippee", "time": "2023-12-03 14:00:35.153492", "cmd": 2} {"id": 7794, "parent": 7793, "code": "// Car Rental Service Model\n\n// Vehicle\nabstract sig Vehicle {\n licensePlate: one LicensePlate,\n model: one Model\n}\n\n// Car extends Vehicle\nsig Car extends Vehicle {\n fuelType: one FuelType,\n availabilityStatus: one Availability\n}\n\n// Customer\nsig Customer {\n personalInfo: one PersonalInformation,\n rentedCars: set Car\n}\n\n// RentalContract\nsig RentalContract {\n customer: one Customer,\n cars: set Car,\n contractPeriod: one ContractPeriod\n}\n\n// Enhanced Signatures with Additional Fields\nsig LicensePlate {\n plateNumber: one PlateNumber,\n issuingAuthority: one IssuingAuthority\n}\n\nsig Model {\n modelName: one ModelName,\n manufacturer: one Manufacturer\n}\n\nsig FuelType {\n fuelTypeName: one FuelTypeName,\n octaneLevel: one OctaneLevel\n}\n\nsig PersonalInformation {\n firstName: one FirstName,\n lastName: one LastName\n}\n\n// Additional Signatures with Two Fields Each\nsig Manufacturer {\n name: String,\n location: String\n}\n\nsig Availability {\n status: String,\n condition: String\n}\n\nsig ContractPeriod {\n startDate: String,\n endDate: String\n}\n\nsig PlateNumber {\n number: String,\n series: String\n}\n\nsig IssuingAuthority {\n authorityName: String,\n region: String\n}\n\nsig ModelName {\n name: String,\n version: String\n}\n\nsig FuelTypeName {\n type: String,\n usage: String\n}\n\nsig OctaneLevel {\n level: String,\n rating: String\n}\n\nsig FirstName {\n first: String,\n middle: String\n}\n\nsig LastName {\n last: String,\n suffix: String\n}\n\n// Facts\n\n// A car can only be part of one rental contract at a time\nfact carUniqueToContract {\n all c1, c2: RentalContract | no c1.cars & c2.cars\n}\n\n// Only available cars can be rented\nfact onlyAvailableCarsCanBeRented {\n all c: Customer | all car: c.rentedCars | some a: Availability | a = car.availabilityStatus\n}\n\n// Predicates\n\n// Check if any customer has rented more than one car\npred customerRentedMoreThanOneCar {\n some c: Customer | #c.rentedCars > 1\n}\n\n// Check for existence of rental contracts with more than two cars\npred contractsWithManyCars {\n some rc: RentalContract | #rc.cars > 2\n}\n\n// Run commands\n\n// This should be unsatisfiable as only available cars can be rented\nrun customerRentedMoreThanOneCar for 5\n\n// This should be satisfiable and return at least 2 instances\nrun contractsWithManyCars for 5", "permalink": "void-shack-bolt-simple", "time": "2023-12-03 14:04:54.408540", "cmd": 1} {"id": 7797, "parent": 7689, "code": "sig Person {\n likes: set Book,\n dislikes: set Book,\n}\n\n\nsig Librarian extends Person {\n recommends: set Book,\n sorting_in: lone Book, \n}\n\nsig Book {\n lent_to: lone Person, // if not sorting_in and not \n continuation_of: lone Book\n}\n\n\nfact ExclusiveLikesDislikes {\n all p: Person |\n p.likes & p.dislikes = none // No book should be both liked and disliked by the same person\n}\n\nfact LibrarianRules {\n all l: Librarian |\n l.dislikes & l.recommends = none\n\n}\n\nfact NoLendingWhileSortingIn {\n all l: Librarian, b: Book, p : Person |\n l.sorting_in = b implies not b.lent_to = p\n}\n\nfact NoSelfContinuation {\n all b: Book | b.continuation_of != b // A book is not allowed to be its own continuation\n}\n\nfact UniqueContinuation {\n all disj b1, b2: Book | b1.continuation_of != b2.continuation_of // One book can't have more than one continuation\n}\n\n\n\nsig Shelf {\n holds: set Book, // books which are not reserved and not in process\n assigned_to: one Librarian\n}\n\n\n// PRED - wont rent when dislikes\n\n// PRED wont lent to librarian?\n\n// PRED - Acyclic continuation\n\nrun {} for 3", "permalink": "magma-either-stitch-lilac", "time": "2023-12-03 14:29:51.519709", "cmd": 1} {"id": 7800, "parent": 7797, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\nsig Person {\n likes: set Book,\n dislikes: set Book,\n}\n\n\nsome sig Librarian extends Person {\n recommends: set Book,\n sorting_in: lone Book, \n}\n\nsig Book {\n lent_to: lone Person, // if not sorting_in and not \n continuation_of: lone Book\n}\n\nsome sig Shelf {\n holds: set Book, // books which are not reserved and not in process\n assigned_to: one Librarian\n}\n\nfact ExclusiveLikesDislikes {\n all p: Person |\n p.likes & p.dislikes = none // No book should be both liked and disliked by the same person\n}\n\nfact LibrarianRules {\n all l: Librarian |\n l.dislikes & l.recommends = none\n}\n\nfact NoLendingWhileSortingIn {\n all l: Librarian, b: Book, p : Person |\n l.sorting_in = b implies not b.lent_to = p\n}\n\nfact NoSelfContinuation {\n all b: Book | b.continuation_of != b // A book is not allowed to be its own continuation\n}\n\nfact UniqueContinuation {\n all disj b1, b2: Book | b1.continuation_of != b2.continuation_of // One book can't have more than one continuation\n}\n\nfact NoBookInMoreThanOneShelf {\n all disj sh1, sh2: Shelf | all b : Book | sh1.holds = b implies sh2.holds = b \n}\n\npred ThereIsNoLibrarian{\n no Librarian\n}\n\npred DontRentOnDislike {\n all p : Person | all b : Book | p.dislikes = b implies not b.lent_to = p\n}\n\nrun ThereIsNoLibrarian\nrun DontRentOnDislike\nrun {}", "permalink": "cleat-badge-trowel-grip", "time": "2023-12-03 17:00:45.365529", "cmd": 1} {"id": 7802, "parent": 7801, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\nsig Person {\n likes: set Book,\n dislikes: set Book,\n}\n\n\nsome sig Librarian extends Person {\n recommends: set Book,\n sorting_in: lone Book, \n}\n\nsig Book {\n lent_to: lone Person, // if not sorting_in and not \n continuation_of: lone Book\n}\n\nsome sig Shelf {\n holds: set Book, // books which are not reserved and not in process\n assigned_to: one Librarian\n}\n\nfact ExclusiveLikesDislikes {\n all p: Person |\n p.likes & p.dislikes = none // No book should be both liked and disliked by the same person\n}\n\nfact LibrarianRules {\n all l: Librarian |\n l.dislikes & l.recommends = none\n}\n\nfact NoLendingWhileSortingIn {\n all l: Librarian, b: Book, p : Person |\n l.sorting_in = b implies not b.lent_to = p\n}\n\nfact NoSelfContinuation {\n all b: Book | b.continuation_of != b // A book is not allowed to be its own continuation\n}\n\nfact UniqueContinuation {\n all disj b1, b2: Book | b1.continuation_of != b2.continuation_of // One book can't have more than one continuation\n}\n\nfact NoBookInMoreThanOneShelf {\n all disj sh1, sh2: Shelf | all b : Book | sh1.holds = b && sh2.holds = b \n}\n\npred ThereIsNoLibrarian{\n no Librarian\n}\n\npred DontRentOnDislike {\n all p : Person | all b : Book | p.dislikes = b implies not b.lent_to = p\n}\n\nrun ThereIsNoLibrarian\nrun DontRentOnDislike\nrun {}", "permalink": "whoops-starry-gift-riding", "time": "2023-12-03 17:01:50.918732", "cmd": 2} {"id": 7804, "parent": 7803, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\nsig Person {\n likes: set Book,\n dislikes: set Book,\n}\n\n\nsome sig Librarian extends Person {\n recommends: set Book,\n sorting_in: lone Book, \n}\n\nsig Book {\n lent_to: lone Person, // if not sorting_in and not \n continuation_of: lone Book\n}\n\nsome sig Shelf {\n holds: set Book, // books which are not reserved and not in process\n assigned_to: one Librarian\n}\n\nfact ExclusiveLikesDislikes {\n all p: Person |\n p.likes & p.dislikes = none // No book should be both liked and disliked by the same person\n}\n\nfact LibrarianRules {\n all l: Librarian |\n l.dislikes & l.recommends = none\n}\n\nfact NoLendingWhileSortingIn {\n all l: Librarian, b: Book, p : Person |\n l.sorting_in = b implies not b.lent_to = p\n}\n\nfact NoSelfContinuation {\n all b: Book | b.continuation_of != b // A book is not allowed to be its own continuation\n}\n\nfact UniqueContinuation {\n all disj b1, b2: Book | b1.continuation_of != b2.continuation_of // One book can't have more than one continuation\n}\n\nfact NoBookInMoreThanOneShelf {\n all disj sh1, sh2: Shelf | all b : Book | not(sh1.holds = b && sh2.holds = b) \n}\n\npred ThereIsNoLibrarian{\n no Librarian\n}\n\npred DontRentOnDislike {\n all p : Person | all b : Book | p.dislikes = b implies not b.lent_to = p\n}\n\nrun ThereIsNoLibrarian\nrun DontRentOnDislike\nrun {}", "permalink": "legal-swore-onion-wrath", "time": "2023-12-03 17:02:21.976793", "cmd": 2} {"id": 7810, "parent": 7808, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all f: File | one t: Trash | f in t \n\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n some f: File | one t: Trash | f in t\n \n\n\n \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO \n all f : File | all p : Protected | all t : Trash | f in p implies not(f in t)\n} \n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all p: Protected | one t: Trash |\n \n all f: File |\n f not in p implies (f in t)\n \n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n one f: File| all fAll: File |\n f in fAll.link \n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n all f : File | f.link.*link = f && f not in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "atlas-finch-uproot-refund", "time": "2023-12-03 19:44:05.024167", "cmd": 4} {"id": 7815, "parent": 7807, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\nsig Person {\n likes: set Book,\n dislikes: set Book,\n}\n\n\nsome sig Librarian extends Person {\n recommends: set Book,\n sorting_in: lone Book, \n}\n\nsig Book {\n lent_to: lone Person, // if not sorting_in and not \n continuation_of: lone Book\n}\n\nsome sig Shelf {\n holds: set Book, // books which are not reserved and not in process\n assigned_to: one Librarian\n}\n\nfact ExclusiveLikesDislikes {\n all p: Person |\n p.likes & p.dislikes = none // No book should be both liked and disliked by the same person\n}\n\nfact LibrarianRules {\n all l: Librarian |\n l.dislikes & l.recommends = none\n}\n\nfact NoLendingWhileSortingIn {\n all l: Librarian, b: Book, p : Person |\n l.sorting_in = b implies not b.lent_to = p\n}\n\nfact NoSelfContinuation {\n all b: Book | b.continuation_of != b // A book is not allowed to be its own continuation\n}\n\nfact UniqueContinuation {\n all disj b1, b2: Book | b1.continuation_of != b2.continuation_of // One book can't have more than one continuation\n}\n\nfact NoBookInMoreThanOneShelf {\n all disj sh1, sh2: Shelf | all b : Book | sh1.holds = b && sh2.holds != b \n}\n\npred ThereIsNoLibrarian{\n no Librarian\n}\n\npred DontRentOnDislike {\n all p : Person | all b : Book | p.dislikes = b implies not b.lent_to = p\n}\n\n// PRED - Acyclic continuation\n\nrun ThereIsNoLibrarian\nrun DontRentOnDislike", "permalink": "shrug-rectal-grunge-caucus", "time": "2023-12-04 07:09:42.644019", "cmd": 1} {"id": 7818, "parent": 7297, "code": "// Signatures\nabstract sig Person {\n name: String,\n age: Int\n}\n\nsig Student extends Person {\n studentID: Int,\n major: String\n}\n\nsig Professor extends Person {\n employeeID: Int,\n department: String\n}\n\nsig Course {\n courseCode: String,\n capacity: Int\n}\n\nsig Classroom {\n roomNumber: Int,\n capacity: Int\n}\n\n// Inheritance\nfact Inheritance {\n all p: Person | p in Student + Professor\n}\n\n// Facts\nfact ClassroomCapacityNotExceeded {\n all c: Course, r: Classroom | r.capacity >= c.capacity\n}\n\nfact UniqueIDs {\n no disj p1, p2: Person | p1.name = p2.name && p1.age = p2.age\n}\n\n// Predicates\npred studentEnrollment[s: Student, c: Course] {\n s.studentID in c.capacity\n}\n\npred teachingAssignment[p: Professor, c: Course] {\n p.department = c.courseCode.substring[0, 3]\n}\n\n// Run commands\nrun unsatisfiableExample {\n // Your scenario constraints to make it", "permalink": "query-rebel-boots-omit", "time": "2023-12-04 12:03:25.816139", "cmd": 1} {"id": 7822, "parent": 7821, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n\n\nrun {}", "permalink": "widely-letter-afloat-eraser", "time": "2023-12-04 19:10:35.249720", "cmd": 1} {"id": 7837, "parent": null, "code": "sig Bidder {\nval: Int,\nbid: some Int,\nu: some Int,\nw: Int\n}\nfact constr {\nall p: Bidder |\nint [p.w] >= 0 and int [p.w] =< 1\nand int[p.bid]>=0 and int[p.bid]=<50\nand int[p.val]>=0 and int[p.val]=<50\n}\npred show (b:Bidder ) {\n#b.bid=1\n}\nrun show", "permalink": "cusp-derby-thrive-curled", "time": "2023-12-04 22:51:15.028677", "cmd": 1} {"id": 7850, "parent": 7837, "code": "sig Bidder {\nval: Int,\nbid: some Int,\nu: some Int,\nw: Int\n}\nfact constr {\nall p: Bidder |\nint [p.w] >= 0 and int [p.w] =< 1\nand int[p.bid]>=0 and int[p.bid]=<50\nand int[p.val]>=0 and int[p.val]=<50\n}\n\npred wda(p1,p2,p1’,p2’:Bidder) {\n memcp[p1,p1’]\n memcp[p2,p2’]\n let x1=p1.bid, x2=p2.bid |\n (int[x1] >= int[x2] ) =>\n int p1’.u=int[p1.val]-int[x2]\n and int[p2’.u] = 0\n and int[p1’.w]=1 and int[p2’.w]=0\n else (\n int[p2’.u]=int[p2.val]-int[x1]\n and int[p1’.u] = 0\n and int[p1’.w]=0 && int[p2’.w]=1 )\n}\npred memcp (p1, p1’: Bidder) {\np1’.bid=p1.bid and p1’.val=p1.val\n}\n\nassert winIshighBidder {\nall p1,p1’,p2,p2’:Bidder {\nwda[p1,p2,p1’,p2’] && int[p1’.w] = 1\n=> int[p1’.bid] >= int[p2’.bid]\n}\n}\nassert isDSE {\nall p1,p2,p2t,p1s:Bidder,\np1’,p2’,p2t’,p1s’:Bidder {\np1s.bid=p1s.val && p1s.val=p1.val\n&& p2t.val=p2.val && p2t.bid=p2.bid\n&& wda[p1,p2,p1’,p2’]\n&& wda[p1s, p2t,p1s’,p2t’]\n=> int[p1s’.u] >= int[p1’.u]\n}\n}\ncheck isDSE for 50 but 4 Bidder\ncheck winIsHighBidder for 4 but 2 Bidder", "permalink": "squid-groom-broken-repose", "time": "2023-12-04 23:06:03.665701", "cmd": 1} {"id": 7851, "parent": 7850, "code": "sig Bidder {\nval: Int,\nbid: some Int,\nu: some Int,\nw: Int\n}\nfact constr {\nall p: Bidder |\nint [p.w] >= 0 and int [p.w] =< 1\nand int[p.bid]>=0 and int[p.bid]=<50\nand int[p.val]>=0 and int[p.val]=<50\n}\n\npred wda(p1,p2,p1_p,p2_p:Bidder) {\n memcp[p1,p1_p]\n memcp[p2,p2_p]\n let x1=p1.bid, x2=p2.bid |\n (int[x1] >= int[x2] ) =>\n int p1_p.u=int[p1.val]-int[x2]\n and int[p2_p.u] = 0\n and int[p1_p.w]=1 and int[p2_p.w]=0\n else (\n int[p2_p.u]=int[p2.val]-int[x1]\n and int[p1_p.u] = 0\n and int[p1_p.w]=0 && int[p2_p.w]=1 )\n}\npred memcp (p1, p1_p: Bidder) {\np1_p.bid=p1.bid and p1_p.val=p1.val\n}\n\nassert winIshighBidder {\nall p1,p1_p,p2,p2_p:Bidder {\nwda[p1,p2,p1_p,p2_p] && int[p1_p.w] = 1\n=> int[p1_p.bid] >= int[p2_p.bid]\n}\n}\nassert isDSE {\nall p1,p2,p2t,p1s:Bidder,\np1_p,p2_p,p2t_p,p1s_p:Bidder {\np1s.bid=p1s.val && p1s.val=p1.val\n&& p2t.val=p2.val && p2t.bid=p2.bid\n&& wda[p1,p2,p1_p,p2_p]\n&& wda[p1s, p2t,p1s_p,p2t_p]\n=> int[p1s_p.u] >= int[p1_p.u]\n}\n}\ncheck isDSE for 50 but 4 Bidder\ncheck winIsHighBidder for 4 but 2 Bidder", "permalink": "simply-spoils-good-angles", "time": "2023-12-04 23:06:33.904009", "cmd": 1} {"id": 7855, "parent": null, "code": "module examples/case_studies/chord\n\n/*\n * Models the chord distributed hash table lookup protocol.\n *\n * For a detailed description, see:\n * https://pdos.csail.mit.edu/papers/ton:chord/paper-ton.pdf or\n * http://www.pdos.lcs.mit.edu/papers/chord:sigcomm01/ - dead link 20191012\n */\n\nopen util/relation as rel\n\nsig Id {next: Id}\nfact {all i: Id | Id in i.*next}\n\n/**\n * true iff i precedes j in the order starting at from\n */\npred less_than [from, i,j: Id] {\n let next\" = Id<:next - (Id->from) | j in i.^next\" // if from=j, returns true if # nodes > 1\n }\npred less_than_eq [from, i,j: Id] {\n let next\" = Id<:next - (Id->from) | j in i.*next\"\n }\n\nsig Node {id: Id}\nfact {all m,n: Node | m!=n => m.id != n.id}\n\n\nsig NodeData {\n prev, next: Node,\n finger: Id -> lone Node,\n closest_preceding_finger: Id -> one Node,\n find_predecessor: Id -> one Node,\n find_successor: Id -> one Node\n }\n\nsig State {\n active: set Node,\n data: active -> one NodeData\n }\n\n/**\n * node n's next node is defined to be the m where n's finger table maps the id\n * that follows n.id to m\n * next holds the first entry of the finger table\n */\nfact {all s: State | all n: s.active | n.(s.data).next = n.(s.data).finger[n.id.next]}\n\npred NextCorrect [s: State] {\n all n: s.active {\n -- no intervening node (ie, close enough)\n no n\": s.active - n | less_than [n.id, n\".id, n.(s.data).next.id]\n -- can reach all other active nodes (ie, far enough)\n -- need this because can't rule out case of next being node itself (because of 1-node ring)\n -- s.active in n.*(s.data.next)\n n.(s.data).next != n || #s.active = 1\n }\n }\n\npred NextCorrect\" [s: State] {\n-- next seems to be correct for 1,2,3 nodes\n all n: s.active | let nd = (s.data)[n] {\n let next\" = Id<:next - (Id -> nd.next.id) {\n no n\" : s.active { n\".id in n.id.^next\" }\n }}\n }\n\n// valid\nassert Same1 {all s: State | NextCorrect[s] => NextCorrect\"[s]}\ncheck Same1 for 3 but 1 State expect 0\n\n// valid unless active condition removed\nassert Same2 {all s: State | s.active = Node => (NextCorrect\"[s] => NextCorrect[s])}\ncheck Same2 for 3 but 1 State expect 0\n\n-- assert NextInFinger {all s: State | all n: s.active | some n.s.data.finger[n.id.next] }\n\n\n-- says that finger entry maps an id to a node so that there are no intervening nodes\n-- between the id and the node\npred FingersCorrect [s: State] {\n all nd: s.active.(s.data) | all start:nd.finger.univ |\n nd.finger[start] in s.active &&\n (no n\" : s.active | less_than [start, n\".id, nd.finger[start].id])\n }\n\n\npred FingersCorrect\" [s: State] {\n all n: s.active | let nd = (s.data)[n] | all start: Node.~(nd.finger) {\n nd.finger[start] in s.active &&\n (let next\" = Id<:next - (nd.finger[start].id -> Id) {\n no n\" : s.active - nd.finger[start] {\n n\".id in start.*next\"\n }\n })\n }\n }\n\n\nassert SameFC {all s: State | FingersCorrect [s] iff FingersCorrect\"[s]}\ncheck SameFC for 3 but 1 State expect 0\n\n\npred ShowMeFC {\n all s : State | s.active = Node && FingersCorrect[s]\n}\n\nrun ShowMeFC for 2 but 1 State expect 1\n\npred ClosestPrecedingFinger[s: State] {\n all n: s.active | let nd = n.(s.data) |\n all i: Id | let cpf = nd.closest_preceding_finger[i] {\n no n\": nd.finger[Id] + n - cpf | less_than [cpf.id, n\".id, i]\n cpf in nd.finger[Id] + n\n cpf.id != i || # s.active = 1\n //less_than (n.id, cpf.id, i)\n }\n }\n\n\npred ClosestPrecedingFinger\"[s: State] {\n all n: s.active | let nd = (s.data)[n] | all i: Id {\n let next\" = Id<:next - (Id -> i) {\n nd.next.id in n.id.^next\" =>\n // nd.closest_preceding_finger[i] = nd.next,\n (some n1: nd.finger[Id] {\n nd.closest_preceding_finger[i] = n1\n //n1 in nd.finger[Id]\n n1.id in n.id.^next\"\n no n2: nd.finger[Id] | n2.id in n1.id.^next\"\n }) else\n nd.closest_preceding_finger[i] = n\n }}\n }\n\n\nassert SameCPF {all s: State | FingersCorrect[s] => (ClosestPrecedingFinger [s] iff ClosestPrecedingFinger\" [s])}\nassert SameCPF1 {all s: State | FingersCorrect[s] => (ClosestPrecedingFinger [s] => ClosestPrecedingFinger\" [s])}\nassert SameCPF2 {\n all s: State | ((s.active = Node && FingersCorrect[s] && ClosestPrecedingFinger\" [s])\n => ClosestPrecedingFinger [s]) }\n\ncheck SameCPF for 3 but 1 State expect 0\ncheck SameCPF1 for 2 but 1 State expect 0\ncheck SameCPF2 for 3 but 1 State expect 0\n\n\npred ShowMeCPF {\n all s : State | s.active = Node && FingersCorrect[s] &&\n // not ClosestPrecedingFinger(s) && ClosestPrecedingFinger\"(s)\n ClosestPrecedingFinger[s]\n //all s : State | all nd : s.active.s.data | nd.finger[Id] = Node\n # Node = 2\n # State = 1\n}\n\n\nrun ShowMeCPF for 2 but 1 State expect 1\n\n\npred FindPredecessor[s: State] {\n all n: s.active | let nd = n.(s.data) | all i: Id {\n nd.find_predecessor[i] =\n (less_than_eq [n.id, i, nd.next.id] && (n.id != i || # s.active = 1)\n => n\n else (nd.closest_preceding_finger[i].(s.data).find_predecessor)[i])\n }\n }\n\n\nassert FPisActive {\n all s: State | FingersCorrect[s] && ClosestPrecedingFinger[s] && FindPredecessor[s]\n => (all n: s.active | all nd: n.(s.data) | nd.find_predecessor[Id] in s.active) }\ncheck FPisActive for 3 but 1 State expect 1\n\n\npred FindPredecessor\"[s: State] {\n all n: s.active | let nd = (s.data)[n] | all i: Id {\n let next\" = Id<:next - (nd.next.id -> Id) {\n one s.active or i in n.id.^next\" => // *next\" -> ^next\" 1/8/02\n nd.find_predecessor[i] = n else\n nd.find_predecessor[i] =\n ((s.data)[nd.closest_preceding_finger[i]]).find_predecessor[i]\n }}\n }\n\n\nassert SameFP {all s: State | FingersCorrect[s] // && s.active = Node\n => (FindPredecessor [s] iff FindPredecessor\" [s])}\n\nassert SameFP1 {\n all s: State | FingersCorrect[s] && s.active = Node\n => (FindPredecessor [s] => FindPredecessor\" [s])}\nassert SameFP2 {\n all s: State | FingersCorrect[s] && s.active = Node\n => (FindPredecessor\" [s] => FindPredecessor [s])}\n\ncheck SameFP for 3 but 1 State expect 1\ncheck SameFP1 for 3 but 1 State expect 0\ncheck SameFP2 for 3 but 1 State expect 0\n\n\npred FindSuccessor[s: State] {\n all n: s.active | let nd = (s.data)[n] | all i: Id {\n nd.find_successor[i] = ((s.data)[nd.find_predecessor[i]]).next\n }}\n\n\n// should be able to check that closest_p_f, etc returns\n// only active nodes if FingersCorrect.\n\n\npred ShowMe1Node {\n #Node = 1\n all s : State | NextCorrect[s]\n State.active = Node\n}\n\nrun ShowMe1Node for 2 but 1 State, 1 Node expect 1\n\npred ShowMe1 {\n #Node = 2\n #State = 1\n all s : State | NextCorrect[s]\n State.active = Node\n}\n\n\npred ShowMe2 {\n #Node = 3\n #State = 1\n all s : State | NextCorrect[s] && FingersCorrect[s]\n State.active = Node\n //all n: NodeData | one n.finger[Id]\n}\n\n\nassert OK1 {\n #Node = 3 &&\n #State = 1 &&\n (all s : State | NextCorrect[s] && FingersCorrect[s]) &&\n State.active = Node\n}\n\n\nrun ShowMe1 for 3 expect 1\nrun ShowMe2 for 3 expect 1\n\nassert InjectiveIds {all i, j: Id | i!=j => i.next != j.next}\ncheck InjectiveIds for 5 expect 0\n\n\nassert FindSuccessorWorks {\n all s: State, i: Id |\n let nd = s.active.(s.data) |\n let succ = nd.find_successor [i] |\n FingersCorrect [s] // && s.active = Node\n => (no n\": s.active | less_than [i, n\".id, succ.id])\n }\ncheck FindSuccessorWorks for 3 but 1 State expect 1", "permalink": "drool-that-unpaid-onset", "time": "2023-12-04 23:11:29.092532", "cmd": 17} {"id": 7881, "parent": null, "code": "sig A{}\nrun {} ", "permalink": "morse-decent-pogo-coat", "time": "2023-12-05 08:10:30.871335", "cmd": 1} {"id": 7885, "parent": 6965, "code": "one sig List { \n header: lone Node,\n} \n\nsig Node {\n link: lone Node,\n elem : Int\n}\n\nfact ordered {\n all n : Node | \n some n.link implies \n n.elem < n.link.elem\n}\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3", "permalink": "fit-speed-amaze-rubber", "time": "2023-12-05 08:34:03.775393", "cmd": 1} {"id": 7890, "parent": 6981, "code": "one sig List {\n header: lone Node \n} \nsig Node {\n link: lone Node \n}\nfact noDanglingNodes {\n Node in List.header.*link\n}\n\nrun { one n : List.header.*link | no n.link } for 3", "permalink": "delay-hush-clay-dimmer", "time": "2023-12-05 09:00:07.290363", "cmd": 1} {"id": 7893, "parent": 7892, "code": "sig Guest {}\nsig Drunk in Guest {}\n\npred drinkers {\n Drunk = Guest\n}\n\nrun drinkers for 3", "permalink": "latch-cost-bleep-rack", "time": "2023-12-05 09:02:45.246336", "cmd": 1} {"id": 7894, "parent": 7893, "code": "sig Guest {}\nsig Drunk in Guest {}\n\npred drinkers {\n no Drunk \n}\n\nrun drinkers for 3", "permalink": "lanky-wilt-dimple-busboy", "time": "2023-12-05 09:03:00.898745", "cmd": 1} {"id": 7898, "parent": 7897, "code": "sig Guest {}\nsig Drunk in Guest {}\n\npred drinkers {\n some x : Guest |\n x in Drunk implies all y : Guest |\n y in Drunk\n}\n\nrun {! drinkers and some Guest} for 3", "permalink": "ocean-impure-unease-dicing", "time": "2023-12-05 09:07:20.756555", "cmd": 1} {"id": 7903, "parent": 6989, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n //no List.header or some n : List.header.*link | no n.link\n no List.header or some n : Node | no n.link\n}\nrun acyclic for 1 but exactly 2 Node", "permalink": "prelaw-foe-portly-move", "time": "2023-12-05 09:16:04.780469", "cmd": 1} {"id": 7904, "parent": 7903, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n //no List.header or some n : List.header.*link | no n.link\n no List.header or some n : Node | no n.link\n Node = List.header.*link\n}\n\n\nrun acyclic for 1 but exactly 2 Node", "permalink": "relay-module-during-liver", "time": "2023-12-05 09:16:28.982778", "cmd": 1} {"id": 7983, "parent": 7058, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {\n affiliatedWith: one University\n}\n\nsig Student extends Person {\n borrowedBooks: set Loan,\n enrolledCourses: set Course\n}\n\nsig Professor extends Person {\n taughtCourses: set Course,\n authoredBooks: set Book\n}\n\nsig Book {\n catalogedIn: one Catalog,\n requiredFor: set Course\n}\n\nsig Course {\n offeredBy: one University,\n requiredBooks: set Book\n}\n\nsig Loan {\n book: one Book,\n borrower: one Student\n}\n\nsig Catalog {\n books: set Book,\n library: one Library\n}\n\nsig Library {\n university: one University,\n catalog: one Catalog\n}\n\nsig University {\n students: set Student,\n professors: set Professor,\n courses: set Course,\n library: one Library\n}\n\n// Facts\nfact AllBooksInUniversityLibrary {\n all b: Book | b in b.catalogedIn.books\n}\n\nfact StudentLoansFromUniversityLibrary {\n all s: Student | all l: s.borrowedBooks | l.book.catalogedIn.library.university = s.affiliatedWith\n}\n\n// Predicates\npred ValidLoan(s: Student, b: Book) {\n b in s.affiliatedWith.library.catalog.books and\n b not in s.borrowedBooks.book\n}\n\npred ProfessorAuthoredBooks(p: Professor) {\n all b: p.authoredBooks | some c: Course | b in c.requiredBooks and c.offeredBy = p.affiliatedWith\n}\n\n// Assertions\nassert BooksBorrowedAreForCourses {\n all l: Loan | some c: l.borrower.enrolledCourses | l.book in c.requiredBooks\n}\n\nassert ProfessorsTeachCoursesWithTheirBooks {\n all p: Professor | all b: p.authoredBooks | some c: p.taughtCourses & b.requiredFor\n}\n\n// Run commands\nrun ValidLoan for 4 // Satisfiable: Finding valid loans for students\nrun ProfessorAuthoredBooks for 4 // Unlikely to be satisfiable without proper setup", "permalink": "whole-modify-exes-duty", "time": "2023-12-05 11:06:41.745308", "cmd": 1} {"id": 7882, "parent": 7881, "code": "sig A{}\nrun {}", "permalink": "agent-puppy-flap-ebook", "time": "2023-12-05 08:10:41.090279", "cmd": 1} {"id": 7883, "parent": 6959, "code": "one sig List { \n header: lone Node,\n size : Int\n} \n\nsig Node {\n link: lone Node \n}\n\nfact sizeOk {\n List.size = #List.header.*link \n}\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3 but 3 Int", "permalink": "crumb-move-bunny-mardi", "time": "2023-12-05 08:22:58.167388", "cmd": 1} {"id": 7886, "parent": 6977, "code": "one sig List {\n header: lone Node \n} \nsig Node {\n link: lone Node \n}\nfact noDanglingNodes {\n Node in List.header.*link\n}\n\nrun { all n : List.header.*link | no n.link } for 3", "permalink": "savor-crib-proofs-kisser", "time": "2023-12-05 08:56:00.729795", "cmd": 1} {"id": 7889, "parent": 6980, "code": "one sig List {\n header: lone Node \n} \nsig Node {\n link: lone Node \n}\nfact noDanglingNodes {\n Node in List.header.*link\n}\n\nrun { lone n : List.header.*link | no n.link } for 3", "permalink": "resend-radial-danger-boots", "time": "2023-12-05 08:59:10.542787", "cmd": 1} {"id": 7891, "parent": 6979, "code": "one sig List {\n header: lone Node \n} \nsig Node {\n link: lone Node \n}\nfact noDanglingNodes {\n Node in List.header.*link\n}\n\nrun { no n : List.header.*link | no n.link } for 3", "permalink": "grove-trunks-broom-ogle", "time": "2023-12-05 09:00:33.206176", "cmd": 1} {"id": 7892, "parent": 6996, "code": "sig Guest {}\nsig Drunk in Guest {}\n\npred drinkers {\n \n}\n\nrun drinkers for 3", "permalink": "slit-yonder-yahoo-even", "time": "2023-12-05 09:02:22.115608", "cmd": 1} {"id": 7902, "parent": 6983, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n //no List.header or some n : List.header.*link | no n.link\n some n : List.header.*link | no n.link\n}\nrun acyclic for 1", "permalink": "trunks-sake-pecan-cuddly", "time": "2023-12-05 09:13:48.796725", "cmd": 1} {"id": 7924, "parent": 7921, "code": "sig Student {}\nsig Drunk in Student {}\n\nassert drinkers {\n some x : Student |\n x in Drunk implies all y : Student |\n y in Drunk\n}\n\ncheck drinkers for 3", "permalink": "rejoin-curing-retool-uphill", "time": "2023-12-05 09:33:57.185131", "cmd": 1} {"id": 7925, "parent": 7924, "code": "sig Student {}\nsig Drunk in Student {}\n\nfact {some Student}\nassert drinkers {\n some x : Student |\n x in Drunk implies all y : Student |\n y in Drunk\n}\n\ncheck drinkers for 3", "permalink": "ribbon-goon-clasp-phoney", "time": "2023-12-05 09:34:18.240868", "cmd": 1} {"id": 7926, "parent": 7925, "code": "sig Student {}\nsig Drunk in Student {}\n\nfact {some Student}\nassert drinkers {\n some x : Student |\n x in Drunk implies all y : Student |\n y in Drunk\n}\n\ncheck drinkers for 8", "permalink": "finer-dental-shine-bash", "time": "2023-12-05 09:34:29.977802", "cmd": 1} {"id": 7981, "parent": 7058, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\nsig Book {\n authors: set Author,\n catalogedIn: one Catalog\n}\n\nsig Author {\n writtenBooks: set Book,\n affiliatedLibrary: one Library\n}\n\nsig Member {\n borrowedBooks: set Loan,\n memberOf: one Library\n}\n\nsig Librarian {\n managedBooks: set Book,\n worksAt: one Library\n}\n\nsig Loan {\n book: one Book,\n borrower: one Member\n}\n\nsig Catalog {\n books: set Book,\n library: one Library\n}\n\nsig Library {\n members: set Member,\n catalog: one Catalog\n}\n\n// Facts\nfact AllBooksInLibraryCatalog {\n all b: Book | b in b.catalogedIn.books\n}\n\nfact ConsistentLibraryMembership {\n all m: Member | m.memberOf = m.borrowedBooks.book.catalogedIn.library\n}\n\n// Predicates\npred ValidLoan(m: Member, b: Book) {\n b in m.memberOf.catalog.books and\n b not in m.borrowedBooks.book\n}\n\npred LibrarianManagesBooks(l: Librarian) {\n all b: l.managedBooks | b.catalogedIn.library = l.worksAt\n}\n\n// Assertions\nassert NoLoanForNonCatalogedBooks {\n no l: Loan | l.book not in l.borrower.memberOf.catalog.books\n}\n\nassert LibrariansManageBooksOfTheirLibrary {\n all l: Librarian | all b: l.managedBooks | b.catalogedIn.library = l.worksAt\n}\n\n// Run commands\nrun ValidLoan for 4 // Satisfiable: Finding valid loans\nrun LibrarianManagesBooks for 4 // Unlikely to be satisfiable without proper setup\n\n\nrun {}", "permalink": "famine-radio-mooned-slain", "time": "2023-12-05 11:02:46.496683", "cmd": 1} {"id": 7982, "parent": 7981, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\nsig Book {\n authors: set Author,\n catalogedIn: one Catalog\n}\n\nsig Author {\n writtenBooks: set Book,\n affiliatedLibrary: one Library\n}\n\nsig Member {\n borrowedBooks: set Loan,\n memberOf: one Library\n}\n\nsig Librarian {\n managedBooks: set Book,\n worksAt: one Library\n}\n\nsig Loan {\n book: one Book,\n borrower: one Member\n}\n\nsig Catalog {\n books: set Book,\n library: one Library\n}\n\nsig Library {\n members: set Member,\n catalog: one Catalog\n}\n\n// Facts\nfact AllBooksInLibraryCatalog {\n all b: Book | b in b.catalogedIn.books\n}\n\nfact ConsistentLibraryMembership {\n all m: Member | m.memberOf = m.borrowedBooks.book.catalogedIn.library\n}\n\n// Predicates\npred ValidLoan(m: Member, b: Book) {\n b in m.memberOf.catalog.books and\n b not in m.borrowedBooks.book\n}\n\npred LibrarianManagesBooks(l: Librarian) {\n all b: l.managedBooks | b.catalogedIn.library = l.worksAt\n}\n\n// Assertions\nassert NoLoanForNonCatalogedBooks {\n no l: Loan | l.book not in l.borrower.memberOf.catalog.books\n}\n\nassert LibrariansManageBooksOfTheirLibrary {\n all l: Librarian | all b: l.managedBooks | b.catalogedIn.library = l.worksAt\n}\n\n// Run commands\nrun ValidLoan for 4 // Satisfiable: Finding valid loans\nrun LibrarianManagesBooks for 4 // Unlikely to be satisfiable without proper setup\n\n\nrun {}", "permalink": "evil-excess-trace-parish", "time": "2023-12-05 11:02:50.150099", "cmd": 2} {"id": 7984, "parent": 7983, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {\n affiliatedWith: one University\n}\n\nsig Student extends Person {\n borrowedBooks: set Loan,\n enrolledCourses: set Course\n}\n\nsig Professor extends Person {\n taughtCourses: set Course,\n authoredBooks: set Book\n}\n\nsig Book {\n catalogedIn: one Catalog,\n requiredFor: set Course\n}\n\nsig Course {\n offeredBy: one University,\n requiredBooks: set Book\n}\n\nsig Loan {\n book: one Book,\n borrower: one Student\n}\n\nsig Catalog {\n books: set Book,\n library: one Library\n}\n\nsig Library {\n university: one University,\n catalog: one Catalog\n}\n\nsig University {\n students: set Student,\n professors: set Professor,\n courses: set Course,\n library: one Library\n}\n\n// Facts\nfact AllBooksInUniversityLibrary {\n all b: Book | b in b.catalogedIn.books\n}\n\nfact StudentLoansFromUniversityLibrary {\n all s: Student | all l: s.borrowedBooks | l.book.catalogedIn.library.university = s.affiliatedWith\n}\n\n// Predicates\npred ValidLoan(s: Student, b: Book) {\n b in s.affiliatedWith.library.catalog.books and\n b not in s.borrowedBooks.book\n}\n\npred ProfessorAuthoredBooks(p: Professor) {\n all b: p.authoredBooks | some c: Course | b in c.requiredBooks and c.offeredBy = p.affiliatedWith\n}\n\n// Assertions\n// assert BooksBorrowedAreForCourses {\n// all l: Loan | some c: l.borrower.enrolledCourses | l.book in c.requiredBooks\n// }\n\n// assert ProfessorsTeachCoursesWithTheirBooks {\n// all p: Professor | all b: p.authoredBooks | some c: p.taughtCourses & b.requiredFor\n// }\n\n// Run commands\nrun ValidLoan for 4 // Satisfiable: Finding valid loans for students\nrun ProfessorAuthoredBooks for 4 // Unlikely to be satisfiable without proper setup", "permalink": "pacify-charm-tying-next", "time": "2023-12-05 11:06:50.628987", "cmd": 1} {"id": 7985, "parent": 7984, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {\n affiliatedWith: one University\n}\n\nsig Student extends Person {\n borrowedBooks: set Loan,\n enrolledCourses: set Course\n}\n\nsig Professor extends Person {\n taughtCourses: set Course,\n authoredBooks: set Book\n}\n\nsig Book {\n catalogedIn: one Catalog,\n requiredFor: set Course\n}\n\nsig Course {\n offeredBy: one University,\n requiredBooks: set Book\n}\n\nsig Loan {\n book: one Book,\n borrower: one Student\n}\n\nsig Catalog {\n books: set Book,\n library: one Library\n}\n\nsig Library {\n university: one University,\n catalog: one Catalog\n}\n\nsig University {\n students: set Student,\n professors: set Professor,\n courses: set Course,\n library: one Library\n}\n\n// Facts\nfact AllBooksInUniversityLibrary {\n all b: Book | b in b.catalogedIn.books\n}\n\nfact StudentLoansFromUniversityLibrary {\n all s: Student | all l: s.borrowedBooks | l.book.catalogedIn.library.university = s.affiliatedWith\n}\n\n// Predicates\npred ValidLoan(s: Student, b: Book) {\n b in s.affiliatedWith.library.catalog.books and\n b not in s.borrowedBooks.book\n}\n\npred ProfessorAuthoredBooks(p: Professor) {\n all b: p.authoredBooks | some c: Course | b in c.requiredBooks and c.offeredBy = p.affiliatedWith\n}\n\n// Assertions\n// assert BooksBorrowedAreForCourses {\n// all l: Loan | some c: l.borrower.enrolledCourses | l.book in c.requiredBooks\n// }\n\n// assert ProfessorsTeachCoursesWithTheirBooks {\n// all p: Professor | all b: p.authoredBooks | some c: p.taughtCourses & b.requiredFor\n// }\n\n// Run commands\nrun ValidLoan for 4 // Satisfiable: Finding valid loans for students\nrun ProfessorAuthoredBooks for 4 // Unlikely to be satisfiable without proper setup", "permalink": "matted-petite-plus-lifter", "time": "2023-12-05 11:06:53.806992", "cmd": 2} {"id": 7990, "parent": 7989, "code": "abstract sig Person {\n enrolledCourses: set Course,\n department: one Department\n}\n\nsig Student extends Person {\n yearOfStudy: one Year,\n advisor: one Professor\n}\n\nsig Professor extends Person {\n coursesTaught: set Course,\n advisees: set Student\n}\n\nsig Course {\n offeredBy: one Department,\n enrolledStudents: set Student\n}\n\nsig Department {\n courses: set Course,\n members: set Person\n}\n\nsig Year {}\n\n// Facts\nfact EachCourseBelongsToOnlyOneDepartment {\n all c: Course | lone d: Department | c in d.courses\n}\n\nfact ProfessorsTeachCoursesInTheirDepartment {\n all p: Professor | all c: p.coursesTaught | c.offeredBy = p.department\n}\n\n// Predicates\npred StudentEnrolledInCourse(s: Student, c: Course) {\n c in s.enrolledCourses and\n s in c.enrolledStudents\n}\n\npred ProfessorAdvisesStudent(p: Professor, s: Student) {\n s in p.advisees and\n p = s.advisor\n}\n\n// Run commands\nrun StudentEnrolledInCourse for 5 // This should be satisfiable with at least 2 instances\nrun ProfessorAdvisesStudent for 5 // This may be unsatisfiable depending on the constraints", "permalink": "barge-rigor-rift-width", "time": "2023-12-05 11:14:29.085471", "cmd": 1} {"id": 7991, "parent": 7990, "code": "abstract sig Person {\n enrolledCourses: set Course,\n department: one Department\n}\n\nsig Student extends Person {\n yearOfStudy: one Year,\n advisor: one Professor\n}\n\nsig Professor extends Person {\n coursesTaught: set Course,\n advisees: set Student\n}\n\nsig Course {\n offeredBy: one Department,\n enrolledStudents: set Student\n}\n\nsig Department {\n courses: set Course,\n members: set Person\n}\n\nsig Year {}\n\n// Facts\nfact EachCourseBelongsToOnlyOneDepartment {\n all c: Course | lone d: Department | c in d.courses\n}\n\nfact ProfessorsTeachCoursesInTheirDepartment {\n all p: Professor | all c: p.coursesTaught | c.offeredBy = p.department\n}\n\n// Predicates\npred StudentEnrolledInCourse(s: Student, c: Course) {\n c in s.enrolledCourses and\n s in c.enrolledStudents\n}\n\npred ProfessorAdvisesStudent(p: Professor, s: Student) {\n s in p.advisees and\n p = s.advisor\n}\n\n// Run commands\nrun StudentEnrolledInCourse for 5 // This should be satisfiable with at least 2 instances\nrun ProfessorAdvisesStudent for 5 // This may be unsatisfiable depending on the constraints", "permalink": "pulse-ride-fondly-putt", "time": "2023-12-05 11:14:32.072721", "cmd": 2} {"id": 7995, "parent": 7058, "code": "sig Student {\n studentId: Int,\n name: String\n}\n\nsig Professor {\n professorId: Int,\n name: String\n}\n\nsig Course {\n courseId: Int,\n name: String,\n professor: Professor\n}\n\nsig Enrollment {\n enrollmentId: Int,\n student: Student,\n course: Course\n}\n\nfact StudentsHaveUniqueIDs {\n all s1, s2: Student | s1 != s2 => s1.studentId != s2.studentId\n}\n\nfact ProfessorsHaveUniqueIDs {\n all p1, p2: Professor | p1 != p2 => p1.professorId != p2.professorId\n}\n\nfact CoursesHaveUniqueIDs {\n all c1, c2: Course | c1 != c2 => c1.courseId != c2.courseId\n}\n\nfact EnrollmentsHaveUniqueIDs {\n all e1, e2: Enrollment | e1 != e2 => e1.enrollmentId != e2.enrollmentId\n}\n\nfact StudentsEnrollInCourses {\n all s: Student, c: Course | some e: Enrollment | e.student = s and e.course = c\n}\n\npred StudentEnrolledInCourse[s: Student, c: Course] {\n some e: Enrollment | e.student = s and e.course = c\n}\n\npred ProfessorTeachesCourse[p: Professor, c: Course] {\n c.professor = p\n}\n\nrun {\n // This run command is intentionally unsatisfiable\n no s: Student, c: Course | s.enrollments = c.enrollments\n} for 5\n\nrun {\n // This run command is satisfiable and returns at least 2 instances\n some s: Student, c: Course | StudentEnrolledInCourse[s, c]\n} for 5", "permalink": "hull-cusp-expend-puppy", "time": "2023-12-05 11:16:40.444915", "cmd": 1} {"id": 7997, "parent": 7996, "code": "sig Student {\n studentId: Int,\n name: String\n}\n\nsig Professor {\n professorId: Int,\n name: String\n}\n\nsig Course {\n courseId: Int,\n name: String,\n professor: Professor\n}\n\nsig Enrollment {\n enrollmentId: Int,\n student: Student,\n course: Course\n}\n\nfact StudentsHaveUniqueIDs {\n all s1, s2: Student | s1 != s2 => s1.studentId != s2.studentId\n}\n\nfact ProfessorsHaveUniqueIDs {\n all p1, p2: Professor | p1 != p2 => p1.professorId != p2.professorId\n}\n\nfact CoursesHaveUniqueIDs {\n all c1, c2: Course | c1 != c2 => c1.courseId != c2.courseId\n}\n\nfact EnrollmentsHaveUniqueIDs {\n all e1, e2: Enrollment | e1 != e2 => e1.enrollmentId != e2.enrollmentId\n}\n\nfact StudentsEnrollInCourses {\n all s: Student, c: Course | some e: Enrollment | e.student = s and e.course = c\n}\n\npred StudentEnrolledInCourse[s: Student, c: Course] {\n some e: Enrollment | e.student = s and e.course = c\n}\n\npred ProfessorTeachesCourse[p: Professor, c: Course] {\n c.professor = p\n}\n\nrun {\n // This run command is intentionally unsatisfiable\n no s: Student, c: Course | s.enrollments = c.enrollments\n} for 5\n\nrun {\n // This run command is satisfiable and returns at least 2 instances\n some s: Student, c: Course | StudentEnrolledInCourse[s, c]\n} for 5", "permalink": "snort-patrol-rebel-jackal", "time": "2023-12-05 11:17:05.286216", "cmd": 2} {"id": 7998, "parent": 7997, "code": "sig Student {\n studentId: Int,\n name: String\n}\n\nsig Professor {\n professorId: Int,\n name: String\n}\n\nsig Course {\n courseId: Int,\n name: String,\n professor: Professor\n}\n\nsig Enrollment {\n enrollmentId: Int,\n student: Student,\n course: Course\n}\n\nfact StudentsHaveUniqueIDs {\n all s1, s2: Student | s1 != s2 => s1.studentId != s2.studentId\n}\n\nfact ProfessorsHaveUniqueIDs {\n all p1, p2: Professor | p1 != p2 => p1.professorId != p2.professorId\n}\n\nfact CoursesHaveUniqueIDs {\n all c1, c2: Course | c1 != c2 => c1.courseId != c2.courseId\n}\n\nfact EnrollmentsHaveUniqueIDs {\n all e1, e2: Enrollment | e1 != e2 => e1.enrollmentId != e2.enrollmentId\n}\n\nfact StudentsEnrollInCourses {\n all s: Student, c: Course | some e: Enrollment | e.student = s and e.course = c\n}\n\npred StudentEnrolledInCourse[s: Student, c: Course] {\n some e: Enrollment | e.student = s and e.course = c\n}\n\npred ProfessorTeachesCourse[p: Professor, c: Course] {\n c.professor = p\n}\n\nrun {\n // This run command is intentionally unsatisfiable\n no s: Student, c: Course | some e: Enrollment | e.student = s and e.course = c\n} for 5\n\nrun {\n // This run command is satisfiable and returns at least 2 instances\n some s: Student, c: Course | StudentEnrolledInCourse[s, c]\n} for 5", "permalink": "barge-rumor-salary-shove", "time": "2023-12-05 11:18:02.938420", "cmd": 1} {"id": 8002, "parent": 7994, "code": "abstract sig Person {\n loans: set Loan,\n memberOfLibrary: one Library\n}\n\nsig Student extends Person {\n enrolledCourses: set Course,\n hasUniversityMembership: one Boolean\n}\n\nsig Professor extends Person {\n taughtCourses: set Course,\n hasUniversityMembership: one Boolean\n}\n\nsig Book {\n inLibrary: one Library,\n loanedBy: set Loan\n}\n\nsig Loan {\n borrower: one Person,\n book: one Book\n}\n\nsig Library {\n books: set Book,\n members: set Person\n}\n\nsig Course {\n enrolledStudents: set Student,\n offeredBy: one Library\n}\n\nsig Boolean {}\n\n// Facts\nfact AllLoansMatchLibrary {\n all l: Loan | l.borrower.memberOfLibrary = l.book.inLibrary\n}\n\nfact NoLoanWithoutMembership {\n all s: Student | s.hasUniversityMembership = False implies no s.loans\n}\n\nfact BorrowedBooksNotAvailable {\n all b: Book | some b.loanedBy implies b not in b.inLibrary.books\n}\n\n// Predicates\npred ValidLoan(b: Book, p: Person) {\n b in p.memberOfLibrary.books and\n b not in p.loans.book\n}\n\npred InvalidLoan(b: Book, p: Person) {\n b not in p.memberOfLibrary.books or\n b in p.loans.book\n}\n\n// Run commands\nrun ValidLoan for 5 // Satisfiable: finding valid loan scenarios\nrun InvalidLoan for 5 // Unlikely to be satisfiable due to constraints", "permalink": "girdle-alarm-ream-skewed", "time": "2023-12-05 11:18:53.998470", "cmd": 2} {"id": 8008, "parent": 8007, "code": "sig Student {\n studentId: Int,\n name: String\n}\n\nsig Professor {\n professorId: Int,\n name: String\n}\n\nsig Course {\n courseId: Int,\n name: String,\n professor: Professor\n}\n\nsig Enrollment {\n enrollmentId: Int,\n student: Student,\n course: Course\n}\n\nfact StudentsHaveUniqueIDs {\n all s1, s2: Student | s1 != s2 => s1.studentId != s2.studentId\n}\n\nfact ProfessorsHaveUniqueIDs {\n all p1, p2: Professor | p1 != p2 => p1.professorId != p2.professorId\n}\n\nfact CoursesHaveUniqueIDs {\n all c1, c2: Course | c1 != c2 => c1.courseId != c2.courseId\n}\n\nfact EnrollmentsHaveUniqueIDs {\n all e1, e2: Enrollment | e1 != e2 => e1.enrollmentId != e2.enrollmentId\n}\n\nfact StudentsEnrollInCourses {\n all s: Student, c: Course | some e: Enrollment | e.student = s and e.course = c\n}\n\npred StudentEnrolledInCourse[s: Student, c: Course] {\n some e: Enrollment | e.student = s and e.course = c\n}\n\npred ProfessorTeachesCourse[p: Professor, c: Course] {\n c.professor = p\n}\n\nrun {\n // This run command is intentionally unsatisfiable\n no s: Student, c: Course | some e: Enrollment | e.student = s and e.course = c\n} for 5\n\nrun {\n some s: Student, c1: Course, c2: Course | \n s.StudentEnrolledInCourse[c1] and s.StudentEnrolledInCourse[c2] and c1 != c2\n} for 5", "permalink": "cusp-snooze-clock-carbon", "time": "2023-12-05 11:20:30.543032", "cmd": 1} {"id": 8011, "parent": 8010, "code": "sig Animal {\n animalId: Int,\n name: String,\n species: String\n}\n\nsig Enclosure {\n enclosureId: Int,\n name: String,\n capacity: Int\n}\n\nsig Zookeeper {\n zookeeperId: Int,\n name: String\n}\n\nsig Feeding {\n feedingId: Int,\n animal: Animal,\n zookeeper: Zookeeper,\n time: Int\n}\n\nfact AnimalsHaveUniqueIDs {\n all a1, a2: Animal | a1 != a2 => a1.animalId != a2.animalId\n}\n\nfact EnclosuresHaveUniqueIDs {\n all e1, e2: Enclosure | e1 != e2 => e1.enclosureId != e2.enclosureId\n}\n\nfact ZookeepersHaveUniqueIDs {\n all z1, z2: Zookeeper | z1 != z2 => z1.zookeeperId != z2.zookeeperId\n}\n\nfact FeedingsHaveUniqueIDs {\n all f1, f2: Feeding | f1 != f2 => f1.feedingId != f2.feedingId\n}\n\npred AnimalInEnclosure[a: Animal, e: Enclosure] {\n some e.animals = a\n}\n\npred ZookeeperFeedsAnimal[z: Zookeeper, a: Animal] {\n some f: Feeding | f.zookeeper = z and f.animal = a\n}\n\nrun {\n // This run command is intentionally unsatisfiable\n no a: Animal, e: Enclosure | AnimalInEnclosure[a, e] and e.capacity = 0\n} for 5\n\nrun {\n // This run command is satisfiable and returns at least 2 instances\n some a: Animal, e: Enclosure | AnimalInEnclosure[a, e] and e.capacity > 0\n} for 5", "permalink": "coerce-void-sank-twirl", "time": "2023-12-05 11:22:45.861679", "cmd": 1} {"id": 8012, "parent": 8011, "code": "sig Animal {\n animalId: Int,\n name: String,\n species: String\n}\n\nsig Enclosure {\n enclosureId: Int,\n name: String,\n capacity: Int\n}\n\nsig Zookeeper {\n zookeeperId: Int,\n name: String\n}\n\nsig Feeding {\n feedingId: Int,\n animal: Animal,\n zookeeper: Zookeeper,\n time: Int\n}\n\nfact AnimalsHaveUniqueIDs {\n all a1, a2: Animal | a1 != a2 => a1.animalId != a2.animalId\n}\n\nfact EnclosuresHaveUniqueIDs {\n all e1, e2: Enclosure | e1 != e2 => e1.enclosureId != e2.enclosureId\n}\n\nfact ZookeepersHaveUniqueIDs {\n all z1, z2: Zookeeper | z1 != z2 => z1.zookeeperId != z2.zookeeperId\n}\n\nfact FeedingsHaveUniqueIDs {\n all f1, f2: Feeding | f1 != f2 => f1.feedingId != f2.feedingId\n}\n\npred AnimalInEnclosure[a: Animal, e: Enclosure] {\n some e.animals = a\n}\n\npred ZookeeperFeedsAnimal[z: Zookeeper, a: Animal] {\n some f: Feeding | f.zookeeper = z and f.animal = a\n}\n\nrun {\n // This run command is intentionally unsatisfiable\n no a: Animal, e: Enclosure | AnimalInEnclosure[a, e] and e.capacity = 0\n} for 5\n\nrun {\n // This run command is satisfiable and returns at least 2 instances\n some a: Animal, e: Enclosure | AnimalInEnclosure[a, e] and e.capacity > 0\n} for 5", "permalink": "rabid-dandy-doing-rhyme", "time": "2023-12-05 11:22:49.176094", "cmd": 2} {"id": 8014, "parent": 8013, "code": "sig Animal {\n animalId: Int,\n name: String,\n species: String\n}\n\nsig Enclosure {\n enclosureId: Int,\n name: String,\n capacity: Int\n}\n\nsig Zookeeper {\n zookeeperId: Int,\n name: String\n}\n\nsig Feeding {\n feedingId: Int,\n animal: Animal,\n zookeeper: Zookeeper,\n time: Int\n}\n\nfact AnimalsHaveUniqueIDs {\n all a1, a2: Animal | a1 != a2 => a1.animalId != a2.animalId\n}\n\nfact EnclosuresHaveUniqueIDs {\n all e1, e2: Enclosure | e1 != e2 => e1.enclosureId != e2.enclosureId\n}\n\nfact ZookeepersHaveUniqueIDs {\n all z1, z2: Zookeeper | z1 != z2 => z1.zookeeperId != z2.zookeeperId\n}\n\nfact FeedingsHaveUniqueIDs {\n all f1, f2: Feeding | f1 != f2 => f1.feedingId != f2.feedingId\n}\n\npred AnimalInEnclosure[a: Animal, e: Enclosure] {\n some e.(a ~ animals)\n}\n\npred ZookeeperFeedsAnimal[z: Zookeeper, a: Animal] {\n some f: Feeding | f.zookeeper = z and f.animal = a\n}\n\nrun {\n // This run command is intentionally unsatisfiable\n no a: Animal, e: Enclosure | AnimalInEnclosure[a, e] and e.capacity = 0\n} for 5\n\nrun {\n // This run command is satisfiable and returns at least 2 instances\n some a: Animal, e: Enclosure | AnimalInEnclosure[a, e] and e.capacity > 0\n} for 5", "permalink": "easily-lesser-rabid-brush", "time": "2023-12-05 11:23:25.449261", "cmd": 1} {"id": 8023, "parent": 8022, "code": "// Signatures\n\n// Person\nsig Person {\n borrowedBooks: set Book,\n affiliatedDepartment: one Department\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person {\n managedBooks: set Book,\n managingLibrary: one Library\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person {\n membership: lone Membership,\n enrolledCourses: set Course\n}\n\n// Book\nsig Book {\n assignedToCourse: one Course,\n availability: Int\n}\n\n// Membership\nsig Membership {\n member: one Student,\n validTill: Int\n}\n\n// Department\nsig Department {\n coursesOffered: set Course,\n departmentLibrary: one Library\n}\n\n// Course\nsig Course {\n studentsEnrolled: set Student,\n booksRequired: set Book\n}\n\n// Library\nsig Library {\n booksAvailable: set Book,\n librarians: set Librarian\n}\n\n// Facts\n// A student without membership cannot borrow books\nfact studentWithoutMembershipCannotBorrowBooks {\n all s: Student | no s.membership implies no s.borrowedBooks\n}\n\n// Borrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing {\n all b: Book | some s: Student | b in s.borrowedBooks implies none b.availability\n}\n\n// Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some s: Student | some s.borrowedBooks\n}\n\n// Check if at least one librarian exists\npred atLeastOneLibrarianExists {\n some l: Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one cannot borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances\nrun atLeastOneLibrarianExists for 5", "permalink": "chant-enrage-flirt-errand", "time": "2023-12-05 11:25:54.285397", "cmd": 1} {"id": 8026, "parent": 8025, "code": "sig Animal {\n animalId: Int,\n name: String,\n species: String\n}\n\nsig Enclosure {\n enclosureId: Int,\n name: String,\n capacity: Int\n}\n\nsig Zookeeper {\n zookeeperId: Int,\n name: String\n}\n\nsig Feeding {\n feedingId: Int,\n animal: Animal,\n zookeeper: Zookeeper,\n time: Int\n}\n\nfact AnimalsHaveUniqueIDs {\n all a1, a2: Animal | a1 != a2 => a1.animalId != a2.animalId\n}\n\nfact EnclosuresHaveUniqueIDs {\n all e1, e2: Enclosure | e1 != e2 => e1.enclosureId != e2.enclosureId\n}\n\nfact ZookeepersHaveUniqueIDs {\n all z1, z2: Zookeeper | z1 != z2 => z1.zookeeperId != z2.zookeeperId\n}\n\nfact FeedingsHaveUniqueIDs {\n all f1, f2: Feeding | f1 != f2 => f1.feedingId != f2.feedingId\n}\n\npred AnimalInEnclosure[a: Animal, e: Enclosure] {\n a in e.Animal\n}\n\npred ZookeeperFeedsAnimal[z: Zookeeper, a: Animal] {\n some f: Feeding | f.zookeeper = z and f.animal = a\n}\n\nrun {\n // This run command is intentionally unsatisfiable\n no a: Animal, e: Enclosure | AnimalInEnclosure[a, e] and e.capacity = 0\n} for 5\n\nrun {\n // This run command is satisfiable and returns at least 2 instances\n some a: Animal, e: Enclosure | AnimalInEnclosure[a, e] and e.capacity > 0\n} for 5", "permalink": "trough-geek-judge-hug", "time": "2023-12-05 11:27:08.582839", "cmd": 1} {"id": 8028, "parent": 8027, "code": "// University Library Management System\n// Signatures\n\n// Person\nsig Person {\n borrowedBooks: set Book,\n memberOfDepartment: one Department\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person {\n managedBooks: set Book,\n supervises: set Student\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person {\n enrolledCourses: set Course,\n hasMembership: lone Membership\n}\n\n// Book\nsig Book {\n inLibrary: one Library,\n checkedOutBy: set Loan\n}\n\n// Course\nsig Course {\n offeredBy: one Library,\n enrolledStudents: set Student\n}\n\n// Membership\nsig Membership {\n belongsTo: set Student,\n validTill: one Date\n}\n\n// Department\nsig Department {\n departmentLibrarian: lone Librarian,\n associatedStudents: set Student\n}\n\n// Library\nsig Library {\n libraryBooks: set Book,\n associatedCourses: set Course\n}\n\n// Date\nsig Date {}\n\n// Facts\n// A student without membership cannot borrow books\nfact studentWithoutMembershipCannotBorrowBooks {\n all s: Student | no s.hasMembership implies no s.borrowedBooks\n}\n\n// Borrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing {\n all b: Book | some l: Loan | b in l.checkedOutBy implies b not in b.inLibrary.libraryBooks\n}\n\n// Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some s: Student | some s.borrowedBooks\n}\n\n// Check if at least one librarian exists\npred atLeastOneLibrarianExists {\n some l: Librarian\n}\n\n// Run commands\n// The first run command should be unsatisfiable\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances\nrun atLeastOneLibrarianExists for 5", "permalink": "tried-bluff-goon-strut", "time": "2023-12-05 11:27:29.856605", "cmd": 2} {"id": 8033, "parent": 8032, "code": "// University Library Management System\n// Signatures\n\n// Person\nsig Person {\n borrowedBooks: set Book,\n memberOfDepartment: one Department\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person {\n managedBooks: set Book,\n supervises: set Student\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person {\n enrolledCourses: set Course,\n hasMembership: lone Membership\n}\n\n// Book\nsig Book {\n inLibrary: one Library,\n // checkedOutBy: set Loan\n}\n\n// Course\nsig Course {\n offeredBy: one Library,\n enrolledStudents: set Student\n}\n\n// Membership\nsig Membership {\n belongsTo: set Student,\n validTill: one Date\n}\n\n// Department\nsig Department {\n departmentLibrarian: lone Librarian,\n associatedStudents: set Student\n}\n\n// Library\nsig Library {\n libraryBooks: set Book,\n associatedCourses: set Course\n}\n\n// Date\nsig Date {}\n// Facts\n// A student without membership cannot borrow books\nfact studentWithoutMembershipCannotBorrowBooks {\n all s: Student | no s.hasMembership implies no s.borrowedBooks\n}\n\nrun{}", "permalink": "lark-circus-puppet-purist", "time": "2023-12-05 11:34:12.109105", "cmd": 1} {"id": 8034, "parent": 8033, "code": "// University Library Management System\n// Signatures\n\n// Person\nsig Person {\n borrowedBooks: set Book,\n memberOfDepartment: one Department\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person {\n managedBooks: set Book,\n supervises: set Student\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person {\n enrolledCourses: set Course,\n hasMembership: lone Membership\n}\n\n// Book\nsig Book {\n inLibrary: one Library,\n // checkedOutBy: set Loan\n}\n\n// Course\nsig Course {\n offeredBy: one Library,\n enrolledStudents: set Student\n}\n\n// Membership\nsig Membership {\n belongsTo: set Student,\n validTill: one Date\n}\n\n// Department\nsig Department {\n departmentLibrarian: lone Librarian,\n associatedStudents: set Student\n}\n\n// Library\nsig Library {\n libraryBooks: set Book,\n associatedCourses: set Course\n}\n\n// Date\nsig Date {}\n// Facts\n// A student without membership cannot borrow books\nfact studentWithoutMembershipCannotBorrowBooks {\n all s: Student | no s.hasMembership implies no s.borrowedBooks\n}\n\n// Borrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing {\n all b: Book | some l: Loan | b in l.checkedOutBy implies b not in b.inLibrary.libraryBooks\n}\n\nrun{}", "permalink": "fax-buggy-aching-spoof", "time": "2023-12-05 11:35:05.030006", "cmd": 1} {"id": 8037, "parent": 8036, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {\n //all a : Assignment | one a.associated_with\n }\n\nrun {}\n// check NoOneCanGradeTheirOwnAssignment for 2", "permalink": "lanky-exert-impart-manned", "time": "2023-12-05 11:36:37.886771", "cmd": 1} {"id": 8040, "parent": 8028, "code": "// University Library Management System\n// Signatures\n\n// Person\nsig Person {\n borrowedBooks: set Book,\n memberOfDepartment: one Department\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person {\n managedBooks: set Book,\n supervises: set Student\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person {\n enrolledCourses: set Course,\n hasMembership: lone Membership\n}\n\n// Book\nsig Book {\n inLibrary: one Library,\n isAvailable: one Boolean\n}\n\n// Course\nsig Course {\n offeredBy: one Library,\n enrolledStudents: set Student\n}\n\n// Membership\nsig Membership {\n belongsTo: set Student,\n validTill: one Date\n}\n\n// Department\nsig Department {\n departmentLibrarian: lone Librarian,\n associatedStudents: set Student\n}\n\n// Library\nsig Library {\n libraryBooks: set Book,\n associatedCourses: set Course\n}\n\n// Date\nsig Date {}\n\n// Facts\n// A student without membership cannot borrow books\nfact studentWithoutMembershipCannotBorrowBooks {\n all s: Student | no s.hasMembership implies no s.borrowedBooks\n}\n\n// All managed books must be in the library\nfact allManagedBooksInLibrary {\n all l: Librarian | all b: l.managedBooks | b in l.memberOfDepartment.libraryBooks\n}\n\n// Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some s: Student | some s.borrowedBooks\n}\n\n// Check if at least one librarian exists\npred atLeastOneLibrarianExists {\n some l: Librarian\n}\n\n// Run commands\n// The first run command should be unsatisfiable\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances\nrun atLeastOneLibrarianExists for 5", "permalink": "oops-muck-dosage-float", "time": "2023-12-05 11:38:35.993720", "cmd": 2} {"id": 8043, "parent": 8042, "code": "// University Library Management System\n// Signatures\n\n// Person\nsig Person {\n borrowedBooks: set Book,\n memberOfDepartment: one Department\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person {\n managedBooks: set Book,\n supervises: set Student\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person {\n enrolledCourses: set Course,\n hasMembership: lone Membership\n}\n\n// Book\nsig Book {\n inLibrary: one Library,\n checkedOutBy: set Student\n}\n\n// Course\nsig Course {\n offeredBy: one Library,\n enrolledStudents: set Student\n}\n\n// Membership\nsig Membership {\n belongsTo: set Student,\n validTill: one Date\n}\n\n// Department\nsig Department {\n departmentLibrarian: lone Librarian,\n associatedStudents: set Student\n}\n\n// Library\nsig Library {\n libraryBooks: set Book,\n associatedCourses: set Course\n}\n\n// Date\nsig Date {}\n\n// Facts\n// A student without membership cannot borrow books\nfact studentWithoutMembershipCannotBorrowBooks {\n all s: Student | no s.hasMembership implies no s.borrowedBooks\n}\n\n// All managed books must be in the library\nfact allManagedBooksInLibrary {\n all l: Librarian | all b: l.managedBooks | b in l.memberOfDepartment.libraryBooks\n}\n\n// Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some s: Student | some s.borrowedBooks\n}\n\n// Check if at least one librarian exists\npred atLeastOneLibrarianExists {\n some l: Librarian\n}\n\n// Run commands\n// The first run command should be unsatisfiable\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances\nrun atLeastOneLibrarianExists for 5\n``", "permalink": "quail-bolt-cadet-cause", "time": "2023-12-05 11:41:10.476657", "cmd": 1} {"id": 7852, "parent": 7851, "code": "sig Bidder {\nval: Int,\nbid: some Int,\nu: some Int,\nw: Int\n}\nfact constr {\nall p: Bidder |\nint [p.w] >= 0 and int [p.w] =< 1\nand int[p.bid]>=0 and int[p.bid]=<50\nand int[p.val]>=0 and int[p.val]=<50\n}\n\npred wda(p1,p2,p1_p,p2_p:Bidder) {\n memcp[p1,p1_p]\n memcp[p2,p2_p]\n let x1=p1.bid, x2=p2.bid |\n (int[x1] >= int[x2] ) =>\n int p1_p.u=int[p1.val]-int[x2]\n and int[p2_p.u] = 0\n and int[p1_p.w]=1 and int[p2_p.w]=0\n else (\n int[p2_p.u]=int[p2.val]-int[x1]\n and int[p1_p.u] = 0\n and int[p1_p.w]=0 && int[p2_p.w]=1 )\n}\npred memcp (p1, p1_p: Bidder) {\np1_p.bid=p1.bid and p1_p.val=p1.val\n}\n\nassert winIsHighBidder {\nall p1,p1_p,p2,p2_p:Bidder {\nwda[p1,p2,p1_p,p2_p] && int[p1_p.w] = 1\n=> int[p1_p.bid] >= int[p2_p.bid]\n}\n}\nassert isDSE {\nall p1,p2,p2t,p1s:Bidder,\np1_p,p2_p,p2t_p,p1s_p:Bidder {\np1s.bid=p1s.val && p1s.val=p1.val\n&& p2t.val=p2.val && p2t.bid=p2.bid\n&& wda[p1,p2,p1_p,p2_p]\n&& wda[p1s, p2t,p1s_p,p2t_p]\n=> int[p1s_p.u] >= int[p1_p.u]\n}\n}\ncheck isDSE for 50 but 4 Bidder\ncheck winIsHighBidder for 4 but 2 Bidder", "permalink": "dreary-sauna-stoke-rimmed", "time": "2023-12-04 23:06:56.673244", "cmd": 1} {"id": 7853, "parent": 7852, "code": "sig Bidder {\nval: Int,\nbid: some Int,\nu: some Int,\nw: Int\n}\nfact constr {\nall p: Bidder |\nint [p.w] >= 0 and int [p.w] =< 1\nand int[p.bid]>=0 and int[p.bid]=<50\nand int[p.val]>=0 and int[p.val]=<50\n}\n\npred wda(p1,p2,p1_p,p2_p:Bidder) {\n memcp[p1,p1_p]\n memcp[p2,p2_p]\n let x1=p1.bid, x2=p2.bid |\n (int[x1] >= int[x2] ) =>\n int p1_p.u=int[p1.val]-int[x2]\n and int[p2_p.u] = 0\n and int[p1_p.w]=1 and int[p2_p.w]=0\n else (\n int[p2_p.u]=int[p2.val]-int[x1]\n and int[p1_p.u] = 0\n and int[p1_p.w]=0 && int[p2_p.w]=1 )\n}\npred memcp (p1, p1_p: Bidder) {\np1_p.bid=p1.bid and p1_p.val=p1.val\n}\n\nassert winIsHighBidder {\nall p1,p1_p,p2,p2_p:Bidder {\nwda[p1,p2,p1_p,p2_p] && int[p1_p.w] = 1\n=> int[p1_p.bid] >= int[p2_p.bid]\n}\n}\nassert isDSE {\nall p1,p2,p2t,p1s:Bidder,\np1_p,p2_p,p2t_p,p1s_p:Bidder {\np1s.bid=p1s.val && p1s.val=p1.val\n&& p2t.val=p2.val && p2t.bid=p2.bid\n&& wda[p1,p2,p1_p,p2_p]\n&& wda[p1s, p2t,p1s_p,p2t_p]\n=> int[p1s_p.u] >= int[p1_p.u]\n}\n}\ncheck isDSE for 50 but 4 Bidder\ncheck winIsHighBidder for 4 but 2 Bidder", "permalink": "ditch-pager-epic-zebra", "time": "2023-12-04 23:07:19.244415", "cmd": 2} {"id": 7854, "parent": 7853, "code": "sig Bidder {\n val: Int,\n bid: some Int,\n u: some Int,\n w: Int\n}\nfact constr {\n all p: Bidder |\n int [p.w] >= 0 and int [p.w] =< 1\n and int[p.bid]>=0 and int[p.bid]=<50\n and int[p.val]>=0 and int[p.val]=<50\n}\n\npred wda(p1,p2,p1_p,p2_p:Bidder) {\n memcp[p1,p1_p]\n memcp[p2,p2_p]\n let x1=p1.bid, x2=p2.bid |\n (int[x1] >= int[x2] ) =>\n int p1_p.u=int[p1.val]-int[x2]\n and int[p2_p.u] = 0\n and int[p1_p.w]=1 and int[p2_p.w]=0\n else (\n int[p2_p.u]=int[p2.val]-int[x1]\n and int[p1_p.u] = 0\n and int[p1_p.w]=0 && int[p2_p.w]=1 )\n}\n\npred memcp (p1, p1_p: Bidder) {\n p1_p.bid=p1.bid and p1_p.val=p1.val\n}\n\nassert winIsHighBidder {\n all p1,p1_p,p2,p2_p:Bidder {\n wda[p1,p2,p1_p,p2_p] && int[p1_p.w] = 1\n => int[p1_p.bid] >= int[p2_p.bid]}\n}\nassert isDSE {\n all p1,p2,p2t,p1s:Bidder,\n p1_p,p2_p,p2t_p,p1s_p:Bidder {\n p1s.bid=p1s.val && p1s.val=p1.val\n && p2t.val=p2.val && p2t.bid=p2.bid\n && wda[p1,p2,p1_p,p2_p]\n && wda[p1s, p2t,p1s_p,p2t_p]\n => int[p1s_p.u] >= int[p1_p.u]}\n}\n\ncheck isDSE for 50 but 4 Bidder\n\ncheck winIsHighBidder for 4 but 2 Bidder", "permalink": "dosage-anchor-drew-jester", "time": "2023-12-04 23:08:28.755773", "cmd": 2} {"id": 7878, "parent": null, "code": "open models/basic\n\n-- module EndUser\none sig EndUser extends Module {\n\tEndUser__cred : one Credential,\n}{\n\tall o : this.sends[UserAgent__EnterCred] | triggeredBy[o,EndUser__PromptForCred]\n\tall o : this.sends[UserAgent__EnterCred] | o.(UserAgent__EnterCred <: UserAgent__EnterCred__cred) = EndUser__cred\n\tall o : this.sends[UserAgent__EnterCred] | o.(UserAgent__EnterCred <: UserAgent__EnterCred__uri) = o.trigger.((EndUser__PromptForCred <: EndUser__PromptForCred__uri))\n\tthis.initAccess in NonCriticalData + EndUser__cred + Credential\n}\n\n-- module UserAgent\none sig UserAgent extends Module {\n\tUserAgent__knownClients : set ClientID,\n}{\n\tall o : this.receives[UserAgent__InitFlow] | (some (UserAgent__knownClients & o.(UserAgent__InitFlow <: UserAgent__InitFlow__id)))\n\tall o : this.sends[EndUser__PromptForCred] | triggeredBy[o,UserAgent__InitFlow]\n\tall o : this.sends[EndUser__PromptForCred] | o.(EndUser__PromptForCred <: EndUser__PromptForCred__uri) = o.trigger.((UserAgent__InitFlow <: UserAgent__InitFlow__redirect))\n\tall o : this.sends[AuthServer__ReqAuth] | triggeredBy[o,UserAgent__EnterCred]\n\tall o : this.sends[AuthServer__ReqAuth] | o.(AuthServer__ReqAuth <: AuthServer__ReqAuth__cred) = o.trigger.((UserAgent__EnterCred <: UserAgent__EnterCred__cred))\n\tall o : this.sends[AuthServer__ReqAuth] | o.(AuthServer__ReqAuth <: AuthServer__ReqAuth__uri) = o.trigger.((UserAgent__EnterCred <: UserAgent__EnterCred__uri))\n\tall o : this.sends[ClientServer__SendAuthResp] | triggeredBy[o,UserAgent__Redirect]\n\tall o : this.sends[ClientServer__SendAuthResp] | o.(ClientServer__SendAuthResp <: ClientServer__SendAuthResp__uri) = o.trigger.((UserAgent__Redirect <: UserAgent__Redirect__uri))\n\t(some (ClientServer__id & UserAgent__knownClients))\n\tthis.initAccess in NonCriticalData + UserAgent__knownClients\n}\n\n-- module ClientServer\none sig ClientServer extends Module {\n\tClientServer__addr : one URI,\n\tClientServer__id : one ClientID,\n\tClientServer__scope : one Scope,\n}{\n\tall o : this.sends[UserAgent__InitFlow] | o.(UserAgent__InitFlow <: UserAgent__InitFlow__redirect) = ClientServer__addr\n\tthis.initAccess in NonCriticalData + ClientServer__addr + ClientServer__id + ClientServer__scope\n}\n\n-- module AuthServer\none sig AuthServer extends Module {\n\tAuthServer__authGrants : Credential set -> lone AuthGrant,\n\tAuthServer__accessTokens : AuthGrant set -> lone AccessToken,\n}{\n\tall o : this.receives[AuthServer__ReqAuth] | (some AuthServer__authGrants[o.(AuthServer__ReqAuth <: AuthServer__ReqAuth__cred)])\n\tall o : this.receives[AuthServer__ReqAccessToken] | (some AuthServer__accessTokens[o.(AuthServer__ReqAccessToken <: AuthServer__ReqAccessToken__authGrant)])\n\tall o : this.sends[UserAgent__Redirect] | triggeredBy[o,AuthServer__ReqAuth]\n\tall o : this.sends[UserAgent__Redirect] | (o.(UserAgent__Redirect <: UserAgent__Redirect__uri).URI__addr = o.trigger.((AuthServer__ReqAuth <: AuthServer__ReqAuth__uri)).URI__addr and (some (o.(UserAgent__Redirect <: UserAgent__Redirect__uri).URI__params & AuthServer__authGrants[o.trigger.((AuthServer__ReqAuth <: AuthServer__ReqAuth__cred))])))\n\tall o : this.sends[ClientServer__SendAccessToken] | triggeredBy[o,AuthServer__ReqAccessToken]\n\tall o : this.sends[ClientServer__SendAccessToken] | o.(ClientServer__SendAccessToken <: ClientServer__SendAccessToken__token) = AuthServer__accessTokens[o.trigger.((AuthServer__ReqAccessToken <: AuthServer__ReqAccessToken__authGrant))]\n\tthis.initAccess in NonCriticalData + Credential.AuthServer__authGrants + AuthServer__authGrants.AuthGrant + AuthGrant.AuthServer__accessTokens + AuthServer__accessTokens.AccessToken + AuthGrant + AccessToken\n}\n\n-- module ResourceServer\none sig ResourceServer extends Module {\n\tResourceServer__resources : AccessToken set -> lone Resource,\n}{\n\tall o : this.receives[ResourceServer__ReqResource] | (some ResourceServer__resources[o.(ResourceServer__ReqResource <: ResourceServer__ReqResource__accessToken)])\n\tall o : this.sends[ClientServer__SendResource] | triggeredBy[o,ResourceServer__ReqResource]\n\tall o : this.sends[ClientServer__SendResource] | o.(ClientServer__SendResource <: ClientServer__SendResource__res) = ResourceServer__resources[o.trigger.((ResourceServer__ReqResource <: ResourceServer__ReqResource__accessToken))]\n\tthis.initAccess in NonCriticalData + AccessToken.ResourceServer__resources + ResourceServer__resources.Resource + Resource\n}\n\n\n-- fact trustedModuleFacts\nfact trustedModuleFacts {\n\tTrustedModule = EndUser + UserAgent + ClientServer + AuthServer + ResourceServer\n}\n\n-- operation EndUser__PromptForCred\nsig EndUser__PromptForCred extends Op {\n\tEndUser__PromptForCred__uri : one URI,\n}{\n\targs in EndUser__PromptForCred__uri\n\tno ret\n\tsender in UserAgent\n\treceiver in EndUser\n}\n\n-- operation UserAgent__InitFlow\nsig UserAgent__InitFlow extends Op {\n\tUserAgent__InitFlow__redirect : one URI,\n\tUserAgent__InitFlow__id : one ClientID,\n\tUserAgent__InitFlow__scope : one Scope,\n}{\n\targs in UserAgent__InitFlow__redirect + UserAgent__InitFlow__id + UserAgent__InitFlow__scope\n\tno ret\n\tsender in ClientServer\n\treceiver in UserAgent\n}\n\n-- operation UserAgent__EnterCred\nsig UserAgent__EnterCred extends Op {\n\tUserAgent__EnterCred__cred : one Credential,\n\tUserAgent__EnterCred__uri : one URI,\n}{\n\targs in UserAgent__EnterCred__cred + UserAgent__EnterCred__uri\n\tno ret\n\tsender in EndUser\n\treceiver in UserAgent\n}\n\n-- operation UserAgent__Redirect\nsig UserAgent__Redirect extends Op {\n\tUserAgent__Redirect__uri : one URI,\n}{\n\targs in UserAgent__Redirect__uri\n\tno ret\n\tsender in AuthServer\n\treceiver in UserAgent\n}\n\n-- operation ClientServer__SendAuthResp\nsig ClientServer__SendAuthResp extends Op {\n\tClientServer__SendAuthResp__uri : one URI,\n}{\n\targs in ClientServer__SendAuthResp__uri\n\tno ret\n\tsender in UserAgent\n\treceiver in ClientServer\n}\n\n-- operation ClientServer__SendAccessToken\nsig ClientServer__SendAccessToken extends Op {\n\tClientServer__SendAccessToken__token : one AccessToken,\n}{\n\targs in ClientServer__SendAccessToken__token\n\tno ret\n\tsender in AuthServer\n\treceiver in ClientServer\n}\n\n-- operation ClientServer__SendResource\nsig ClientServer__SendResource extends Op {\n\tClientServer__SendResource__res : one Resource,\n}{\n\targs in ClientServer__SendResource__res\n\tno ret\n\tsender in ResourceServer\n\treceiver in ClientServer\n}\n\n-- operation AuthServer__ReqAuth\nsig AuthServer__ReqAuth extends Op {\n\tAuthServer__ReqAuth__cred : one Credential,\n\tAuthServer__ReqAuth__uri : one URI,\n}{\n\targs in AuthServer__ReqAuth__cred + AuthServer__ReqAuth__uri\n\tno ret\n\tsender in UserAgent\n\treceiver in AuthServer\n}\n\n-- operation AuthServer__ReqAccessToken\nsig AuthServer__ReqAccessToken extends Op {\n\tAuthServer__ReqAccessToken__authGrant : one AuthGrant,\n}{\n\targs in AuthServer__ReqAccessToken__authGrant\n\tno ret\n\tsender in ClientServer\n\treceiver in AuthServer\n}\n\n-- operation ResourceServer__ReqResource\nsig ResourceServer__ReqResource extends Op {\n\tResourceServer__ReqResource__accessToken : one AccessToken,\n}{\n\targs in ResourceServer__ReqResource__accessToken\n\tno ret\n\tsender in ClientServer\n\treceiver in ResourceServer\n}\n\n-- datatype declarations\nabstract sig Payload extends Data {\n}{\n}\nsig AuthCode extends Payload {\n}{\n\tno fields\n}\nsig AuthGrant extends Payload {\n}{\n\tno fields\n}\nsig Credential extends Payload {\n}{\n\tno fields\n}\nsig AccessToken extends Payload {\n}{\n\tno fields\n}\nsig Resource extends Payload {\n}{\n\tno fields\n}\nsig ClientID extends Payload {\n}{\n\tno fields\n}\nsig Scope extends Payload {\n}{\n\tno fields\n}\nsig Addr extends Data {\n}{\n\tno fields\n}\nsig URI extends Data {\n\tURI__addr : one Addr,\n\tURI__params : set Payload,\n}{\n\tfields in URI__addr + URI__params\n}\nsig OtherData extends Data {}{ no fields }\n\n-- fact criticalDataFacts\nfact criticalDataFacts {\n\tCriticalData = Resource\n}\n\nrun SanityCheck {\n some EndUser__PromptForCred & SuccessOp\n some UserAgent__InitFlow & SuccessOp\n some UserAgent__EnterCred & SuccessOp\n some UserAgent__Redirect & SuccessOp\n some ClientServer__SendAuthResp & SuccessOp\n some ClientServer__SendAccessToken & SuccessOp\n some ClientServer__SendResource & SuccessOp\n some AuthServer__ReqAuth & SuccessOp\n some AuthServer__ReqAccessToken & SuccessOp\n some ResourceServer__ReqResource & SuccessOp\n} for 2 but 10 Data, 10 Op, 5 Module\n\n\ncheck Confidentiality {\n Confidentiality\n} for 2 but 10 Data, 10 Op, 5 Module\n\n\n-- check who can create CriticalData\ncheck Integrity {\n Integrity\n} for 2 but 10 Data, 10 Op, 5 Module", "permalink": "cocoa-stoop-popper-second", "time": "2023-12-04 23:29:09.718711", "cmd": 1} {"id": 7880, "parent": 7879, "code": "module oauth\n\n-- module EndUser\none sig EndUser extends Module {\n\tEndUser__cred : one Credential,\n}{\n\tall o : this.sends[UserAgent__EnterCred] | triggeredBy[o,EndUser__PromptForCred]\n\tall o : this.sends[UserAgent__EnterCred] | o.(UserAgent__EnterCred <: UserAgent__EnterCred__cred) = EndUser__cred\n\tall o : this.sends[UserAgent__EnterCred] | o.(UserAgent__EnterCred <: UserAgent__EnterCred__uri) = o.trigger.((EndUser__PromptForCred <: EndUser__PromptForCred__uri))\n\tthis.initAccess in NonCriticalData + EndUser__cred + Credential\n}\n\n-- module UserAgent\none sig UserAgent extends Module {\n\tUserAgent__knownClients : set ClientID,\n}{\n\tall o : this.receives[UserAgent__InitFlow] | (some (UserAgent__knownClients & o.(UserAgent__InitFlow <: UserAgent__InitFlow__id)))\n\tall o : this.sends[EndUser__PromptForCred] | triggeredBy[o,UserAgent__InitFlow]\n\tall o : this.sends[EndUser__PromptForCred] | o.(EndUser__PromptForCred <: EndUser__PromptForCred__uri) = o.trigger.((UserAgent__InitFlow <: UserAgent__InitFlow__redirect))\n\tall o : this.sends[AuthServer__ReqAuth] | triggeredBy[o,UserAgent__EnterCred]\n\tall o : this.sends[AuthServer__ReqAuth] | o.(AuthServer__ReqAuth <: AuthServer__ReqAuth__cred) = o.trigger.((UserAgent__EnterCred <: UserAgent__EnterCred__cred))\n\tall o : this.sends[AuthServer__ReqAuth] | o.(AuthServer__ReqAuth <: AuthServer__ReqAuth__uri) = o.trigger.((UserAgent__EnterCred <: UserAgent__EnterCred__uri))\n\tall o : this.sends[ClientServer__SendAuthResp] | triggeredBy[o,UserAgent__Redirect]\n\tall o : this.sends[ClientServer__SendAuthResp] | o.(ClientServer__SendAuthResp <: ClientServer__SendAuthResp__uri) = o.trigger.((UserAgent__Redirect <: UserAgent__Redirect__uri))\n\t(some (ClientServer__id & UserAgent__knownClients))\n\tthis.initAccess in NonCriticalData + UserAgent__knownClients\n}\n\n-- module ClientServer\none sig ClientServer extends Module {\n\tClientServer__addr : one URI,\n\tClientServer__id : one ClientID,\n\tClientServer__scope : one Scope,\n}{\n\tall o : this.sends[UserAgent__InitFlow] | o.(UserAgent__InitFlow <: UserAgent__InitFlow__redirect) = ClientServer__addr\n\tthis.initAccess in NonCriticalData + ClientServer__addr + ClientServer__id + ClientServer__scope\n}\n\n-- module AuthServer\none sig AuthServer extends Module {\n\tAuthServer__authGrants : Credential set -> lone AuthGrant,\n\tAuthServer__accessTokens : AuthGrant set -> lone AccessToken,\n}{\n\tall o : this.receives[AuthServer__ReqAuth] | (some AuthServer__authGrants[o.(AuthServer__ReqAuth <: AuthServer__ReqAuth__cred)])\n\tall o : this.receives[AuthServer__ReqAccessToken] | (some AuthServer__accessTokens[o.(AuthServer__ReqAccessToken <: AuthServer__ReqAccessToken__authGrant)])\n\tall o : this.sends[UserAgent__Redirect] | triggeredBy[o,AuthServer__ReqAuth]\n\tall o : this.sends[UserAgent__Redirect] | (o.(UserAgent__Redirect <: UserAgent__Redirect__uri).URI__addr = o.trigger.((AuthServer__ReqAuth <: AuthServer__ReqAuth__uri)).URI__addr and (some (o.(UserAgent__Redirect <: UserAgent__Redirect__uri).URI__params & AuthServer__authGrants[o.trigger.((AuthServer__ReqAuth <: AuthServer__ReqAuth__cred))])))\n\tall o : this.sends[ClientServer__SendAccessToken] | triggeredBy[o,AuthServer__ReqAccessToken]\n\tall o : this.sends[ClientServer__SendAccessToken] | o.(ClientServer__SendAccessToken <: ClientServer__SendAccessToken__token) = AuthServer__accessTokens[o.trigger.((AuthServer__ReqAccessToken <: AuthServer__ReqAccessToken__authGrant))]\n\tthis.initAccess in NonCriticalData + Credential.AuthServer__authGrants + AuthServer__authGrants.AuthGrant + AuthGrant.AuthServer__accessTokens + AuthServer__accessTokens.AccessToken + AuthGrant + AccessToken\n}\n\n-- module ResourceServer\none sig ResourceServer extends Module {\n\tResourceServer__resources : AccessToken set -> lone Resource,\n}{\n\tall o : this.receives[ResourceServer__ReqResource] | (some ResourceServer__resources[o.(ResourceServer__ReqResource <: ResourceServer__ReqResource__accessToken)])\n\tall o : this.sends[ClientServer__SendResource] | triggeredBy[o,ResourceServer__ReqResource]\n\tall o : this.sends[ClientServer__SendResource] | o.(ClientServer__SendResource <: ClientServer__SendResource__res) = ResourceServer__resources[o.trigger.((ResourceServer__ReqResource <: ResourceServer__ReqResource__accessToken))]\n\tthis.initAccess in NonCriticalData + AccessToken.ResourceServer__resources + ResourceServer__resources.Resource + Resource\n}\n\n\n-- fact trustedModuleFacts\nfact trustedModuleFacts {\n\tTrustedModule = EndUser + UserAgent + ClientServer + AuthServer + ResourceServer\n}\n\n-- operation EndUser__PromptForCred\nsig EndUser__PromptForCred extends Op {\n\tEndUser__PromptForCred__uri : one URI,\n}{\n\targs in EndUser__PromptForCred__uri\n\tno ret\n\tsender in UserAgent\n\treceiver in EndUser\n}\n\n-- operation UserAgent__InitFlow\nsig UserAgent__InitFlow extends Op {\n\tUserAgent__InitFlow__redirect : one URI,\n\tUserAgent__InitFlow__id : one ClientID,\n\tUserAgent__InitFlow__scope : one Scope,\n}{\n\targs in UserAgent__InitFlow__redirect + UserAgent__InitFlow__id + UserAgent__InitFlow__scope\n\tno ret\n\tsender in ClientServer\n\treceiver in UserAgent\n}\n\n-- operation UserAgent__EnterCred\nsig UserAgent__EnterCred extends Op {\n\tUserAgent__EnterCred__cred : one Credential,\n\tUserAgent__EnterCred__uri : one URI,\n}{\n\targs in UserAgent__EnterCred__cred + UserAgent__EnterCred__uri\n\tno ret\n\tsender in EndUser\n\treceiver in UserAgent\n}\n\n-- operation UserAgent__Redirect\nsig UserAgent__Redirect extends Op {\n\tUserAgent__Redirect__uri : one URI,\n}{\n\targs in UserAgent__Redirect__uri\n\tno ret\n\tsender in AuthServer\n\treceiver in UserAgent\n}\n\n-- operation ClientServer__SendAuthResp\nsig ClientServer__SendAuthResp extends Op {\n\tClientServer__SendAuthResp__uri : one URI,\n}{\n\targs in ClientServer__SendAuthResp__uri\n\tno ret\n\tsender in UserAgent\n\treceiver in ClientServer\n}\n\n-- operation ClientServer__SendAccessToken\nsig ClientServer__SendAccessToken extends Op {\n\tClientServer__SendAccessToken__token : one AccessToken,\n}{\n\targs in ClientServer__SendAccessToken__token\n\tno ret\n\tsender in AuthServer\n\treceiver in ClientServer\n}\n\n-- operation ClientServer__SendResource\nsig ClientServer__SendResource extends Op {\n\tClientServer__SendResource__res : one Resource,\n}{\n\targs in ClientServer__SendResource__res\n\tno ret\n\tsender in ResourceServer\n\treceiver in ClientServer\n}\n\n-- operation AuthServer__ReqAuth\nsig AuthServer__ReqAuth extends Op {\n\tAuthServer__ReqAuth__cred : one Credential,\n\tAuthServer__ReqAuth__uri : one URI,\n}{\n\targs in AuthServer__ReqAuth__cred + AuthServer__ReqAuth__uri\n\tno ret\n\tsender in UserAgent\n\treceiver in AuthServer\n}\n\n-- operation AuthServer__ReqAccessToken\nsig AuthServer__ReqAccessToken extends Op {\n\tAuthServer__ReqAccessToken__authGrant : one AuthGrant,\n}{\n\targs in AuthServer__ReqAccessToken__authGrant\n\tno ret\n\tsender in ClientServer\n\treceiver in AuthServer\n}\n\n-- operation ResourceServer__ReqResource\nsig ResourceServer__ReqResource extends Op {\n\tResourceServer__ReqResource__accessToken : one AccessToken,\n}{\n\targs in ResourceServer__ReqResource__accessToken\n\tno ret\n\tsender in ClientServer\n\treceiver in ResourceServer\n}\n\n-- datatype declarations\nabstract sig Payload extends Data {\n}{\n}\nsig AuthCode extends Payload {\n}{\n\tno fields\n}\nsig AuthGrant extends Payload {\n}{\n\tno fields\n}\nsig Credential extends Payload {\n}{\n\tno fields\n}\nsig AccessToken extends Payload {\n}{\n\tno fields\n}\nsig Resource extends Payload {\n}{\n\tno fields\n}\nsig ClientID extends Payload {\n}{\n\tno fields\n}\nsig Scope extends Payload {\n}{\n\tno fields\n}\nsig Addr extends Data {\n}{\n\tno fields\n}\nsig URI extends Data {\n\tURI__addr : one Addr,\n\tURI__params : set Payload,\n}{\n\tfields in URI__addr + URI__params\n}\nsig OtherData extends Data {}{ no fields }\n\n-- fact criticalDataFacts\nfact criticalDataFacts {\n\tCriticalData = Resource\n}\n\nrun SanityCheck {\n some EndUser__PromptForCred & SuccessOp\n some UserAgent__InitFlow & SuccessOp\n some UserAgent__EnterCred & SuccessOp\n some UserAgent__Redirect & SuccessOp\n some ClientServer__SendAuthResp & SuccessOp\n some ClientServer__SendAccessToken & SuccessOp\n some ClientServer__SendResource & SuccessOp\n some AuthServer__ReqAuth & SuccessOp\n some AuthServer__ReqAccessToken & SuccessOp\n some ResourceServer__ReqResource & SuccessOp\n} for 2 but 10 Data, 10 Op, 5 Module\n\n\ncheck Confidentiality {\n Confidentiality\n} for 2 but 10 Data, 10 Op, 5 Module\n\n\n-- check who can create CriticalData\ncheck Integrity {\n Integrity\n} for 2 but 10 Data, 10 Op, 5 Module", "permalink": "scorer-maroon-exile-sprint", "time": "2023-12-04 23:29:34.901674", "cmd": 1} {"id": 7887, "parent": 6978, "code": "one sig List {\n header: lone Node \n} \nsig Node {\n link: lone Node \n}\nfact noDanglingNodes {\n Node in List.header.*link\n}\n\nrun { some n : List.header.*link | no n.link } for 3", "permalink": "cyclic-mop-sway-posh", "time": "2023-12-05 08:56:52.293730", "cmd": 1} {"id": 7895, "parent": 6996, "code": "sig Guest {}\nsig Drunk in Guest {}\n\npred drinkers {\n \n}\n\nrun drinkers for 3", "permalink": "prance-helium-phrase-unwell", "time": "2023-12-05 09:03:14.086366", "cmd": 1} {"id": 7897, "parent": 7896, "code": "sig Guest {}\nsig Drunk in Guest {}\n\npred drinkers {\n some x : Guest |\n x in Drunk implies all y : Guest |\n y in Drunk\n}\n\nrun {! drinkers } for 3", "permalink": "reach-defile-tulip-rework", "time": "2023-12-05 09:06:43.372374", "cmd": 1} {"id": 7899, "parent": 7898, "code": "sig Student {}\nsig Drunk in Student {}\n\npred drinkers {\n some x : Student |\n x in Drunk implies all y : Student |\n y in Drunk\n}\n\nrun {! drinkers } for 3 but exactly 4 Student", "permalink": "plural-thaw-freely-puma", "time": "2023-12-05 09:08:35.915745", "cmd": 1} {"id": 7900, "parent": 7899, "code": "sig Student {}\nsig Drunk in Student {}\n\npred drinkers {\n some x : Student |\n x in Drunk implies all y : Student |\n y in Drunk\n}\n\nrun {drinkers } for 3 but exactly 4 Student", "permalink": "brick-chevy-rising-bless", "time": "2023-12-05 09:08:52.179153", "cmd": 1} {"id": 7901, "parent": 6983, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n //no List.header or some n : List.header.*link | no n.link\n some n : List.header.*link | no n.link\n}\nrun acyclic for 1", "permalink": "mutiny-crock-sheet-encode", "time": "2023-12-05 09:13:09.479178", "cmd": 1} {"id": 7905, "parent": 6989, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n //no List.header or some n : List.header.*link | no n.link\n no List.header or some n : Node | no n.link\n}\nrun acyclic for 1 but exactly 2 Node", "permalink": "clad-shanty-linked-willed", "time": "2023-12-05 09:17:48.699701", "cmd": 1} {"id": 7913, "parent": 7904, "code": "sig List { header: lone Node } \n\nsig Node { link: lone Node }\n\nfact {\n Node = List.header.*link\n}\n\npred acyclic(l: List){\n no l.header or some n : l.header.*link | no n.link\n}\n\n\nrun {}", "permalink": "canon-thinly-cause-wager", "time": "2023-12-05 09:27:44.174695", "cmd": 1} {"id": 7915, "parent": 7914, "code": "sig List { header: lone Node } \n\nsig Node { link: lone Node }\n\nfact {\n Node = List.header.*link\n}\n\npred acyclic(l: List){\n no l.header or some n : l.header.*link | no n.link\n}\n\n\nrun {one lst : List | acyclic[lst]}", "permalink": "booth-catchy-strep-donut", "time": "2023-12-05 09:28:42.221076", "cmd": 1} {"id": 7920, "parent": 7900, "code": "sig Student {}\nsig Drunk in Student {}\n\nassert drinkers {\n some x : Student |\n x in Drunk implies all y : Student |\n y in Drunk\n}\n\ncheck {drinkers } for 3 but exactly 4 Student", "permalink": "boozy-clamp-cable-revolt", "time": "2023-12-05 09:32:16.024572", "cmd": 1} {"id": 7921, "parent": 7920, "code": "sig Student {}\nsig Drunk in Student {}\n\nassert drinkers {\n some x : Student |\n x in Drunk implies all y : Student |\n y in Drunk\n}\n\ncheck drinkers for 3 but exactly 4 Student", "permalink": "strike-unplug-shower-suing", "time": "2023-12-05 09:32:29.470497", "cmd": 1} {"id": 7930, "parent": 7854, "code": "sig Bidder {\n val: Int,\n bid: some Int,\n u: some Int,\n w: Int\n}\nfact constr {\n all p: Bidder |\n int [p.w] >= 0 and int [p.w] =< 1\n and int[p.bid]>=0 and int[p.bid]=<50\n and int[p.val]>=0 and int[p.val]=<50\n}\n\npred wda(p1,p2,p1_p,p2_p:Bidder) {\n memcp[p1,p1_p]\n memcp[p2,p2_p]\n let x1=p1.bid, x2=p2.bid |\n (int[x1] >= int[x2] ) =>\n int p1_p.u=int[p1.val]-int[x2]\n and int[p2_p.u] = 0\n and int[p1_p.w]=1 and int[p2_p.w]=0\n else (\n int[p2_p.u]=int[p2.val]-int[x1]\n and int[p1_p.u] = 0\n and int[p1_p.w]=0 && int[p2_p.w]=1 )\n}\n\npred memcp (p1, p1_p: Bidder) {\n p1_p.bid=p1.bid and p1_p.val=p1.val\n}\n\nassert winIsHighBidder {\n all p1,p1_p,p2,p2_p:Bidder {\n wda[p1,p2,p1_p,p2_p] && int[p1_p.w] = 1\n => int[p1_p.bid] >= int[p2_p.bid]}\n}\nassert isDSE {\n all p1,p2,p2t,p1s:Bidder,\n p1_p,p2_p,p2t_p,p1s_p:Bidder {\n p1s.bid=p1s.val && p1s.val=p1.val\n && p2t.val=p2.val && p2t.bid=p2.bid\n && wda[p1,p2,p1_p,p2_p]\n && wda[p1s, p2t,p1s_p,p2t_p]\n => int[p1s_p.u] >= int[p1_p.u]}\n}\n\ncheck isDSE for 50 but 4 Bidder\n\ncheck winIsHighBidder for 4 but 2 Bidder", "permalink": "recopy-chaos-uneasy-entail", "time": "2023-12-05 09:36:40.237769", "cmd": 1} {"id": 7969, "parent": 6737, "code": "abstract sig Person {\n name: one String,\n borrowedBooks: set Book\n }\n\n sig Member extends Person {\n overdueBooks: set Book\n }\n\n sig Librarian extends Person {\n managedBooks: set Book\n }\n\n sig Book {\n title: one String,\n authors: set String,\n isAvailable: one Bool\n }\n\n sig Catalog {\n books: set Book,\n availableBooks: set Book\n }\n\n // Facts\n fact AllBooksInCatalog {\n all b: Book | b in Catalog.books\n }\n\n fact AvailableBooks {\n Catalog.availableBooks = {b: Book | b.isAvailable = True}\n }\n\n // Predicates\n pred IsValidLoan(m: Member, b: Book) {\n b in Catalog.availableBooks and\n b not in m.borrowedBooks\n }\n\n pred IsOverdueLoan(m: Member, b: Book) {\n b in m.overdueBooks and\n b.isAvailable = False\n }\n\n // Assertions\n assert NoOverdueBooksWhenAvailable {\n no m: Member | some b: m.overdueBooks & Catalog.availableBooks\n }\n\n assert LibrarianManagesUnavailableBooksOnly {\n all l: Librarian | all b: l.managedBooks | b.isAvailable = False\n }\n\n // Run commands\n run IsValidLoan for 4 // This is likely to be satisfiable as it is common for loans to be valid.\n run IsOverdueLoan for 4 // This may be unsatisfiable without additional context, such as a loan period or return dates.\n}", "permalink": "disown-lifter-amuck-drank", "time": "2023-12-05 10:16:06.427884", "cmd": 1} {"id": 7970, "parent": 7969, "code": "abstract sig Person {\n name: one String,\n borrowedBooks: set Book\n }\n\n sig Member extends Person {\n overdueBooks: set Book\n }\n\n sig Librarian extends Person {\n managedBooks: set Book\n }\n\n sig Book {\n title: one String,\n authors: set String,\n isAvailable: one Bool\n }\n\n sig Catalog {\n books: set Book,\n availableBooks: set Book\n }\n\n // Facts\n fact AllBooksInCatalog {\n all b: Book | b in Catalog.books\n }\n\n fact AvailableBooks {\n Catalog.availableBooks = {b: Book | b.isAvailable = True}\n }\n\n // Predicates\n pred IsValidLoan(m: Member, b: Book) {\n b in Catalog.availableBooks and\n b not in m.borrowedBooks\n }\n\n pred IsOverdueLoan(m: Member, b: Book) {\n b in m.overdueBooks and\n b.isAvailable = False\n }\n\n // Assertions\n assert NoOverdueBooksWhenAvailable {\n no m: Member | some b: m.overdueBooks & Catalog.availableBooks\n }\n\n assert LibrarianManagesUnavailableBooksOnly {\n all l: Librarian | all b: l.managedBooks | b.isAvailable = False\n }\n\n // Run commands\n run IsValidLoan for 4 // This is likely to be satisfiable as it is common for loans to be valid.\n run IsOverdueLoan for 4 // This may be unsatisfiable without additional context, such as a loan period or return dates.\n}", "permalink": "encore-plop-gigolo-unbent", "time": "2023-12-05 10:16:13.576260", "cmd": 2} {"id": 7986, "parent": 7985, "code": "abstract sig Person {\n affiliatedWith: one University,\n name: one Name\n}\n\nsig Student extends Person {\n borrowedBooks: set Loan,\n enrolledCourses: set Course\n}\n\nsig Professor extends Person {\n taughtCourses: set Course,\n authoredBooks: set Book\n}\n\nsig Book {\n catalogedIn: one Catalog,\n requiredFor: set Course,\n title: one Title\n}\n\nsig Course {\n offeredBy: one University,\n requiredBooks: set Book,\n courseCode: one Code\n}\n\nsig Loan {\n book: one Book,\n borrower: one Student,\n dueDate: one Date\n}\n\nsig Catalog {\n books: set Book,\n library: one Library,\n catalogID: one ID\n}\n\nsig Library {\n university: one University,\n catalog: one Catalog,\n location: one Location\n}\n\nsig University {\n students: set Student,\n professors: set Professor,\n courses: set Course,\n library: one Library,\n universityName: one Name\n}\n\n// Additional signatures for simple data types\nsig Name, Title, Code, Date, ID, Location {}\n\n// Facts\nfact AllBooksInUniversityLibrary {\n all b: Book | b in b.catalogedIn.books\n}\n\nfact StudentLoansFromUniversityLibrary {\n all s: Student | all l: s.borrowedBooks | l.book.catalogedIn.library.university = s.affiliatedWith\n}\n\n// Predicates\npred ValidLoan(s: Student, b: Book) {\n b in s.affiliatedWith.library.catalog.books and\n b not in s.borrowedBooks.book\n}\n\npred ProfessorAuthoredBooks(p: Professor) {\n all b: p.authoredBooks | some c: Course | b in c.requiredBooks and c.offeredBy = p.affiliatedWith\n}\n\n// Run commands\nrun ValidLoan for 4 // Satisfiable: Finding valid loans for students\nrun ProfessorAuthoredBooks for 4 // Satisfiable or unsatisfiable depending on setup", "permalink": "cozily-gorged-cozily-gawk", "time": "2023-12-05 11:08:38.817468", "cmd": 2} {"id": 7994, "parent": 7993, "code": "abstract sig Person {\n loans: set Loan,\n memberOfLibrary: one Library\n}\n\nsig Student extends Person {\n enrolledCourses: set Course\n}\n\nsig Professor extends Person {\n taughtCourses: set Course\n}\n\nsig Book {\n inLibrary: one Library,\n loanedBy: set Loan\n}\n\nsig Loan {\n borrower: one Person,\n book: one Book\n}\n\nsig Library {\n books: set Book,\n members: set Person\n}\n\nsig Course {}\n\n// Facts\nfact AllLoansMatchLibrary {\n all l: Loan | l.borrower.memberOfLibrary = l.book.inLibrary\n}\n\nfact NoSelfLoan {\n no l: Loan | l.borrower.loans = l.book.loanedBy\n}\n\n// Predicates\npred ValidLoan(b: Book, p: Person) {\n b in p.memberOfLibrary.books and\n b not in p.loans.book\n}\n\npred InvalidLoan(b: Book, p: Person) {\n b not in p.memberOfLibrary.books or\n b in p.loans.book\n}\n\n// Run commands\nrun ValidLoan for 5 // Satisfiable: finding valid loan scenarios\nrun InvalidLoan for 5 // Unlikely to be satisfiable due to constraints", "permalink": "folic-subway-glitch-elude", "time": "2023-12-05 11:15:54.236307", "cmd": 2} {"id": 8009, "parent": 8008, "code": "sig Student {\n studentId: Int,\n name: String\n}\n\nsig Professor {\n professorId: Int,\n name: String\n}\n\nsig Course {\n courseId: Int,\n name: String,\n professor: Professor\n}\n\nsig Enrollment {\n enrollmentId: Int,\n student: Student,\n course: Course\n}\n\nfact StudentsHaveUniqueIDs {\n all s1, s2: Student | s1 != s2 => s1.studentId != s2.studentId\n}\n\nfact ProfessorsHaveUniqueIDs {\n all p1, p2: Professor | p1 != p2 => p1.professorId != p2.professorId\n}\n\nfact CoursesHaveUniqueIDs {\n all c1, c2: Course | c1 != c2 => c1.courseId != c2.courseId\n}\n\nfact EnrollmentsHaveUniqueIDs {\n all e1, e2: Enrollment | e1 != e2 => e1.enrollmentId != e2.enrollmentId\n}\n\nfact StudentsEnrollInCourses {\n all s: Student, c: Course | some e: Enrollment | e.student = s and e.course = c\n}\n\npred StudentEnrolledInCourse[s: Student, c: Course] {\n some e: Enrollment | e.student = s and e.course = c\n}\n\npred ProfessorTeachesCourse[p: Professor, c: Course] {\n c.professor = p\n}\n\nrun {\n // This run command is intentionally unsatisfiable\n no s: Student, c: Course | some e: Enrollment | e.student = s and e.course = c\n} for 5\n\nrun {\n some s: Student, c1: Course, c2: Course | \n s.StudentEnrolledInCourse[c1] and s.StudentEnrolledInCourse[c2] and c1 != c2\n} for 5", "permalink": "avoid-cinema-resize-otter", "time": "2023-12-05 11:20:39.008392", "cmd": 2} {"id": 8018, "parent": 8017, "code": "sig Animal {\n animalId: Int,\n name: String,\n species: String\n}\n\nsig Enclosure {\n enclosureId: Int,\n name: String,\n capacity: Int,\n animals: set Animal\n}\n\nsig Zookeeper {\n zookeeperId: Int,\n name: String\n}\n\nsig Feeding {\n feedingId: Int,\n animal: Animal,\n zookeeper: Zookeeper,\n time: Int\n}\n\nfact AnimalsHaveUniqueIDs {\n all a1, a2: Animal | a1 != a2 => a1.animalId != a2.animalId\n}\n\nfact EnclosuresHaveUniqueIDs {\n all e1, e2: Enclosure | e1 != e2 => e1.enclosureId != e2.enclosureId\n}\n\nfact ZookeepersHaveUniqueIDs {\n all z1, z2: Zookeeper | z1 != z2 => z1.zookeeperId != z2.zookeeperId\n}\n\nfact FeedingsHaveUniqueIDs {\n all f1, f2: Feeding | f1 != f2 => f1.feedingId != f2.feedingId\n}\n\npred AnimalInEnclosure[a: Animal, e: Enclosure] {\n a in e.animals\n}\n\npred ZookeeperFeedsAnimal[z: Zookeeper, a: Animal] {\n some f: Feeding | f.zookeeper = z and f.animal = a\n}\n\nrun {\n // This run command is intentionally unsatisfiable\n no a: Animal, e: Enclosure | AnimalInEnclosure[a, e] and e.capacity = 0\n} for 5\n\nrun {\n // This run command is satisfiable and returns at least 2 instances\n some a: Animal, e: Enclosure | AnimalInEnclosure[a, e] and e.capacity > 0\n} for 5", "permalink": "phrase-borax-juggle-pumice", "time": "2023-12-05 11:24:06.360858", "cmd": 2} {"id": 8024, "parent": 8021, "code": "sig Animal {\n animalId: Int,\n name: String,\n species: String\n}\n\nsig Enclosure {\n enclosureId: Int,\n name: String,\n capacity: Int\n}\n\nsig Zookeeper {\n zookeeperId: Int,\n name: String\n}\n\nsig Feeding {\n feedingId: Int,\n animal: Animal,\n zookeeper: Zookeeper,\n time: Int\n}\n\nfact AnimalsHaveUniqueIDs {\n all a1, a2: Animal | a1 != a2 => a1.animalId != a2.animalId\n}\n\nfact EnclosuresHaveUniqueIDs {\n all e1, e2: Enclosure | e1 != e2 => e1.enclosureId != e2.enclosureId\n}\n\nfact ZookeepersHaveUniqueIDs {\n all z1, z2: Zookeeper | z1 != z2 => z1.zookeeperId != z2.zookeeperId\n}\n\nfact FeedingsHaveUniqueIDs {\n all f1, f2: Feeding | f1 != f2 => f1.feedingId != f2.feedingId\n}\n\npred AnimalInEnclosure[a: Animal, e: Enclosure] {\n a in e.animals\n}\n\npred ZookeeperFeedsAnimal[z: Zookeeper, a: Animal] {\n some f: Feeding | f.zookeeper = z and f.animal = a\n}\n\nrun {\n // This run command is intentionally unsatisfiable\n no a: Animal, e: Enclosure | AnimalInEnclosure[a, e] and e.capacity = 0\n} for 5\n\nrun {\n // This run command is satisfiable and returns at least 2 instances\n some a: Animal, e: Enclosure | AnimalInEnclosure[a, e] and e.capacity > 0\n} for 5", "permalink": "series-errand-musky-preppy", "time": "2023-12-05 11:26:16.777788", "cmd": 1} {"id": 8027, "parent": 8023, "code": "// University Library Management System\n// Signatures\n\n// Person\nsig Person {\n borrowedBooks: set Book,\n memberOfDepartment: one Department\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person {\n managedBooks: set Book,\n supervises: set Student\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person {\n enrolledCourses: set Course,\n hasMembership: lone Membership\n}\n\n// Book\nsig Book {\n inLibrary: one Library,\n checkedOutBy: set Loan\n}\n\n// Course\nsig Course {\n offeredBy: one Library,\n enrolledStudents: set Student\n}\n\n// Membership\nsig Membership {\n belongsTo: set Student,\n validTill: one Date\n}\n\n// Department\nsig Department {\n departmentLibrarian: lone Librarian,\n associatedStudents: set Student\n}\n\n// Library\nsig Library {\n libraryBooks: set Book,\n associatedCourses: set Course\n}\n\n// Date\nsig Date {}\n\n// Facts\n// A student without membership cannot borrow books\nfact studentWithoutMembershipCannotBorrowBooks {\n all s: Student | no s.hasMembership implies no s.borrowedBooks\n}\n\n// Borrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing {\n all b: Book | some l: Loan | b in l.checkedOutBy implies b not in b.inLibrary.libraryBooks\n}\n\n// Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some s: Student | some s.borrowedBooks\n}\n\n// Check if at least one librarian exists\npred atLeastOneLibrarianExists {\n some l: Librarian\n}\n\n// Run commands\n// The first run command should be unsatisfiable\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances\nrun atLeastOneLibrarianExists for 5", "permalink": "garnet-legume-repeal-gusto", "time": "2023-12-05 11:27:24.916192", "cmd": 1} {"id": 8031, "parent": 7720, "code": "// University Library Management System\n// Signatures\n\n// Person\nsig Person {\n borrowedBooks: set Book,\n memberOfDepartment: one Department\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person {\n managedBooks: set Book,\n supervises: set Student\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person {\n enrolledCourses: set Course,\n hasMembership: lone Membership\n}\n\n// Book\nsig Book {\n inLibrary: one Library,\n checkedOutBy: set Loan\n}\n\n// Course\nsig Course {\n offeredBy: one Library,\n enrolledStudents: set Student\n}\n\n// Membership\nsig Membership {\n belongsTo: set Student,\n validTill: one Date\n}\n\n// Department\nsig Department {\n departmentLibrarian: lone Librarian,\n associatedStudents: set Student\n}\n\n// Library\nsig Library {\n libraryBooks: set Book,\n associatedCourses: set Course\n}\n\n// Date\nsig Date {}\n\nrun{}", "permalink": "body-guts-ending-cushy", "time": "2023-12-05 11:30:54.540360", "cmd": 1} {"id": 8032, "parent": 8031, "code": "// University Library Management System\n// Signatures\n\n// Person\nsig Person {\n borrowedBooks: set Book,\n memberOfDepartment: one Department\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person {\n managedBooks: set Book,\n supervises: set Student\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person {\n enrolledCourses: set Course,\n hasMembership: lone Membership\n}\n\n// Book\nsig Book {\n inLibrary: one Library,\n // checkedOutBy: set Loan\n}\n\n// Course\nsig Course {\n offeredBy: one Library,\n enrolledStudents: set Student\n}\n\n// Membership\nsig Membership {\n belongsTo: set Student,\n validTill: one Date\n}\n\n// Department\nsig Department {\n departmentLibrarian: lone Librarian,\n associatedStudents: set Student\n}\n\n// Library\nsig Library {\n libraryBooks: set Book,\n associatedCourses: set Course\n}\n\n// Date\nsig Date {}\n\nrun{}", "permalink": "online-tidy-sporty-helium", "time": "2023-12-05 11:33:52.047799", "cmd": 1} {"id": 8039, "parent": 8038, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {\n all a : Assignment | one a.associated_with\n }\n\nrun {}\n// check NoOneCanGradeTheirOwnAssignment for 2", "permalink": "trend-daisy-sierra-shine", "time": "2023-12-05 11:37:31.744025", "cmd": 1} {"id": 8047, "parent": 8046, "code": "// University Library Management System\n// Signatures\n\n// Person\nsig Person {\n borrowedBooks: set Book,\n memberOfDepartment: one Department\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person {\n managedBooks: set Book,\n supervises: set Student\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person {\n enrolledCourses: set Course,\n hasMembership: lone Membership\n}\n\n// Book\nsig Book {\n inLibrary: one Library,\n checkedOutBy: set Student\n}\n\n// Course\nsig Course {\n offeredBy: one Library,\n enrolledStudents: set Student\n}\n\n// Membership\nsig Membership {\n belongsTo: set Student,\n validTill: one Date\n}\n\n// Department\nsig Department {\n departmentLibrarian: lone Librarian,\n associatedStudents: set Student\n}\n\n// Library\nsig Library {\n libraryBooks: set Book,\n associatedCourses: set Course\n}\n\n// Date\nsig Date {}\n\n// Facts\n// A student without membership cannot borrow books\nfact studentWithoutMembershipCannotBorrowBooks {\n all s: Student | no s.hasMembership implies no s.borrowedBooks\n}\n\n// // All managed books must be in the library\n// fact allManagedBooksInLibrary {\n// all l: Librarian | all b: l.managedBooks | b in l.memberOfDepartment.libraryBooks\n// }\n// Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some s: Student | some s.borrowedBooks\n}\n\n// Check if at least one librarian exists\npred atLeastOneLibrarianExists {\n some l: Librarian\n}\n\n// Run commands\n// The first run command should be unsatisfiable\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances\nrun atLeastOneLibrarianExists for 5\n\nrun{}", "permalink": "lint-amulet-yeast-driven", "time": "2023-12-05 11:42:31.111688", "cmd": 1} {"id": 7987, "parent": 7986, "code": "abstract sig Person {\n affiliatedWith: one University,\n name: one Name\n}\n\nsig Student extends Person {\n borrowedBooks: set Loan,\n enrolledCourses: set Course\n}\n\nsig Professor extends Person {\n taughtCourses: set Course,\n authoredBooks: set Book\n}\n\nsig Book {\n catalogedIn: one Catalog,\n requiredFor: set Course,\n title: one Title\n}\n\nsig Course {\n offeredBy: one University,\n requiredBooks: set Book,\n courseCode: one Code\n}\n\nsig Loan {\n book: one Book,\n borrower: one Student,\n dueDate: one Date\n}\n\nsig Catalog {\n books: set Book,\n library: one Library,\n catalogID: one ID\n}\n\nsig Library {\n university: one University,\n catalog: one Catalog,\n location: one Location\n}\n\nsig University {\n students: set Student,\n professors: set Professor,\n courses: set Course,\n library: one Library,\n universityName: one Name\n}\n\n// Additional signatures for simple data types\nsig Name, Title, Code, Date, ID, Location {}\n\n// Facts\nfact AllBooksInUniversityLibrary {\n all b: Book | b in b.catalogedIn.books\n}\n\nfact StudentLoansFromUniversityLibrary {\n all s: Student | all l: s.borrowedBooks | l.book.catalogedIn.library.university = s.affiliatedWith\n}\n\n// Predicates\npred ValidLoan(s: Student, b: Book) {\n b in s.affiliatedWith.library.catalog.books and\n b not in s.borrowedBooks.book\n}\n\npred ProfessorAuthoredBooks(p: Professor) {\n all b: p.authoredBooks | some c: Course | b in c.requiredBooks and c.offeredBy = p.affiliatedWith\n}\n\n// Run commands\nrun ValidLoan for 4 // Satisfiable: Finding valid loans for students\nrun ProfessorAuthoredBooks for 4 // Satisfiable or unsatisfiable depending on setup", "permalink": "payer-cupped-storm-vibes", "time": "2023-12-05 11:08:41.658163", "cmd": 1} {"id": 7989, "parent": 7988, "code": "abstract sig Person {\n borrowedBooks: set Loan,\n university: one University\n}\n\nsig Student extends Person {\n enrolledCourses: set Course\n}\n\nsig Professor extends Person {\n taughtCourses: set Course\n}\n\nsig Book {\n loanedTo: set Loan,\n inCatalog: one Catalog\n}\n\nsig Loan {\n book: one Book,\n borrower: one Person\n}\n\nsig Course {\n students: set Student,\n professor: one Professor\n}\n\nsig Catalog {\n books: set Book,\n university: one University\n}\n\nsig University {\n libraryCatalog: one Catalog,\n members: set Person\n}\n\n// Facts\nfact AllBooksLoanedAreInCatalog {\n all b: Book | b in b.loanedTo.book => b in b.inCatalog.books\n}\n\nfact StudentsBorrowBooksForCourses {\n all s: Student | all b: s.borrowedBooks.book | some c: s.enrolledCourses & b in c.students.borrowedBooks.book\n}\n\n// Predicates\npred ValidLoan(s: Student, b: Book) {\n b in s.university.libraryCatalog.books and\n b not in s.borrowedBooks.book\n}\n\npred ProfessorTeachesCourse(p: Professor, c: Course) {\n c in p.taughtCourses and\n p in c.professor\n}\n\n// Run commands\nrun ValidLoan for 3 // Likely to be satisfiable\nrun ProfessorTeachesCourse for 3 // Likely to be unsatisfiable without proper setup", "permalink": "zippy-stove-choice-job", "time": "2023-12-05 11:13:21.418165", "cmd": 2} {"id": 7992, "parent": 7991, "code": "abstract sig Person {\n enrolledCourses: set Course,\n department: one Department\n}\n\nsig Student extends Person {\n yearOfStudy: one Year,\n advisor: one Professor\n}\n\nsig Professor extends Person {\n coursesTaught: set Course,\n advisees: set Student\n}\n\nsig Course {\n offeredBy: one Department,\n enrolledStudents: set Student\n}\n\nsig Department {\n courses: set Course,\n members: set Person\n}\n\nsig Year {}\n\n// Facts\nfact EachCourseBelongsToOnlyOneDepartment {\n all c: Course | lone d: Department | c in d.courses\n}\n\nfact ProfessorsTeachCoursesInTheirDepartment {\n all p: Professor | all c: p.coursesTaught | c.offeredBy = p.department\n}\n\n// Predicates\npred StudentEnrolledInCourse(s: Student, c: Course) {\n c in s.enrolledCourses and\n s in c.enrolledStudents\n}\n\npred ProfessorAdvisesStudent(p: Professor, s: Student) {\n s in p.advisees and\n p = s.advisor\n}\n\n// Run commands\nrun StudentEnrolledInCourse for 5 // This should be satisfiable with at least 2 instances\nrun ProfessorAdvisesStudent for 5 // This may be unsatisfiable depending on the constraints", "permalink": "print-yeah-patio-motive", "time": "2023-12-05 11:14:36.478797", "cmd": 1} {"id": 8006, "parent": 8005, "code": "sig Student {\n studentId: Int,\n name: String\n}\n\nsig Professor {\n professorId: Int,\n name: String\n}\n\nsig Course {\n courseId: Int,\n name: String,\n professor: Professor\n}\n\nsig Enrollment {\n enrollmentId: Int,\n student: Student,\n course: Course\n}\n\nfact StudentsHaveUniqueIDs {\n all s1, s2: Student | s1 != s2 => s1.studentId != s2.studentId\n}\n\nfact ProfessorsHaveUniqueIDs {\n all p1, p2: Professor | p1 != p2 => p1.professorId != p2.professorId\n}\n\nfact CoursesHaveUniqueIDs {\n all c1, c2: Course | c1 != c2 => c1.courseId != c2.courseId\n}\n\nfact EnrollmentsHaveUniqueIDs {\n all e1, e2: Enrollment | e1 != e2 => e1.enrollmentId != e2.enrollmentId\n}\n\nfact StudentsEnrollInCourses {\n all s: Student, c: Course | some e: Enrollment | e.student = s and e.course = c\n}\n\npred StudentEnrolledInCourse[s: Student, c: Course] {\n some e: Enrollment | e.student = s and e.course = c\n}\n\npred ProfessorTeachesCourse[p: Professor, c: Course] {\n c.professor = p\n}\n\nrun {\n // This run command is intentionally unsatisfiable\n no s: Student, c: Course | some e: Enrollment | e.student = s and e.course = c\n} for 5\n\nrun {\n some s: Student, c: Course | StudentEnrolledInCourse[s, c] and StudentEnrolledInCourse[s, c']\n} for 5", "permalink": "bottom-squad-purr-spotty", "time": "2023-12-05 11:19:50.917030", "cmd": 2} {"id": 8007, "parent": 8006, "code": "sig Student {\n studentId: Int,\n name: String\n}\n\nsig Professor {\n professorId: Int,\n name: String\n}\n\nsig Course {\n courseId: Int,\n name: String,\n professor: Professor\n}\n\nsig Enrollment {\n enrollmentId: Int,\n student: Student,\n course: Course\n}\n\nfact StudentsHaveUniqueIDs {\n all s1, s2: Student | s1 != s2 => s1.studentId != s2.studentId\n}\n\nfact ProfessorsHaveUniqueIDs {\n all p1, p2: Professor | p1 != p2 => p1.professorId != p2.professorId\n}\n\nfact CoursesHaveUniqueIDs {\n all c1, c2: Course | c1 != c2 => c1.courseId != c2.courseId\n}\n\nfact EnrollmentsHaveUniqueIDs {\n all e1, e2: Enrollment | e1 != e2 => e1.enrollmentId != e2.enrollmentId\n}\n\nfact StudentsEnrollInCourses {\n all s: Student, c: Course | some e: Enrollment | e.student = s and e.course = c\n}\n\npred StudentEnrolledInCourse[s: Student, c: Course] {\n some e: Enrollment | e.student = s and e.course = c\n}\n\npred ProfessorTeachesCourse[p: Professor, c: Course] {\n c.professor = p\n}\n\nrun {\n // This run command is intentionally unsatisfiable\n no s: Student, c: Course | some e: Enrollment | e.student = s and e.course = c\n} for 5\n\nrun {\n some s: Student, c1: Course, c2: Course | \n s.StudentEnrolledInCourse[c1] and s.StudentEnrolledInCourse[c2] and c1 != c2\n} for 5", "permalink": "entomb-spoon-couch-caviar", "time": "2023-12-05 11:20:26.176846", "cmd": 2} {"id": 8015, "parent": 8002, "code": "// Signatures\n\n// Person\nsig Person {\n borrowedBooks: set Book,\n affiliatedDepartment: one Department\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person {\n managedBooks: set Book,\n managingLibrary: one Library\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person {\n membership: lone Membership,\n enrolledCourses: set Course\n}\n\n// Book\nsig Book {\n assignedToCourse: one Course,\n availability: lone Int\n}\n\n// Membership\nsig Membership {\n member: one Student,\n validTill: one Int\n}\n\n// Department\nsig Department {\n coursesOffered: set Course,\n departmentLibrary: one Library\n}\n\n// Course\nsig Course {\n studentsEnrolled: set Student,\n booksRequired: set Book\n}\n\n// Library\nsig Library {\n booksAvailable: set Book,\n librarians: set Librarian\n}\n\n// Facts\n// A student without membership cannot borrow books\nfact studentWithoutMembershipCannotBorrowBooks {\n all s: Student | no s.membership implies no s.borrowedBooks\n}\n\n// Borrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing {\n all b: Book | some s: Student | b in s.borrowedBooks implies none b.availability\n}\n\n// Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some s: Student | some s.borrowedBooks\n}\n\n// Check if at least one librarian exists\npred atLeastOneLibrarianExists {\n some l: Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one cannot borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances\nrun atLeastOneLibrarianExists for 5", "permalink": "yeast-radial-porous-sultry", "time": "2023-12-05 11:23:39.139541", "cmd": 1} {"id": 8016, "parent": 8015, "code": "// Signatures\n\n// Person\nsig Person {\n borrowedBooks: set Book,\n affiliatedDepartment: one Department\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person {\n managedBooks: set Book,\n managingLibrary: one Library\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person {\n membership: lone Membership,\n enrolledCourses: set Course\n}\n\n// Book\nsig Book {\n assignedToCourse: one Course,\n availability: lone Int\n}\n\n// Membership\nsig Membership {\n member: one Student,\n validTill: one Int\n}\n\n// Department\nsig Department {\n coursesOffered: set Course,\n departmentLibrary: one Library\n}\n\n// Course\nsig Course {\n studentsEnrolled: set Student,\n booksRequired: set Book\n}\n\n// Library\nsig Library {\n booksAvailable: set Book,\n librarians: set Librarian\n}\n\n// Facts\n// A student without membership cannot borrow books\nfact studentWithoutMembershipCannotBorrowBooks {\n all s: Student | no s.membership implies no s.borrowedBooks\n}\n\n// Borrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing {\n all b: Book | some s: Student | b in s.borrowedBooks implies none b.availability\n}\n\n// Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some s: Student | some s.borrowedBooks\n}\n\n// Check if at least one librarian exists\npred atLeastOneLibrarianExists {\n some l: Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one cannot borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances\nrun atLeastOneLibrarianExists for 5", "permalink": "unable-expel-dimple-steep", "time": "2023-12-05 11:23:48.592028", "cmd": 2} {"id": 8019, "parent": 8016, "code": "// Signatures\n\n// Person\nsig Person {\n borrowedBooks: set Book,\n affiliatedDepartment: one Department\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person {\n managedBooks: set Book,\n managingLibrary: one Library\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person {\n membership: lone Membership,\n enrolledCourses: set Course\n}\n\n// Book\nsig Book {\n assignedToCourse: one Course,\n availability: lone Int\n}\n\n// Membership\nsig Membership {\n member: one Student,\n validTill: one Int\n}\n\n// Department\nsig Department {\n coursesOffered: set Course,\n departmentLibrary: one Library\n}\n\n// Course\nsig Course {\n studentsEnrolled: set Student,\n booksRequired: set Book\n}\n\n// Library\nsig Library {\n booksAvailable: set Book,\n librarians: set Librarian\n}\n\n// Facts\n// A student without membership cannot borrow books\nfact studentWithoutMembershipCannotBorrowBooks {\n all s: Student | no s.membership implies no s.borrowedBooks\n}\n\n// Borrowed books are not available for borrowing\n// fact borrowedBooksAreNotAvailableForBorrowing {\n// all b: Book | some s: Student | b in s.borrowedBooks implies none b.availability\n// }\n\n// Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some s: Student | some s.borrowedBooks\n}\n\n// Check if at least one librarian exists\npred atLeastOneLibrarianExists {\n some l: Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one cannot borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances\nrun atLeastOneLibrarianExists for 5", "permalink": "romp-mural-stung-floss", "time": "2023-12-05 11:24:19.607016", "cmd": 2} {"id": 8025, "parent": 8024, "code": "sig Animal {\n animalId: Int,\n name: String,\n species: String\n}\n\nsig Enclosure {\n enclosureId: Int,\n name: String,\n capacity: Int\n}\n\nsig Zookeeper {\n zookeeperId: Int,\n name: String\n}\n\nsig Feeding {\n feedingId: Int,\n animal: Animal,\n zookeeper: Zookeeper,\n time: Int\n}\n\nfact AnimalsHaveUniqueIDs {\n all a1, a2: Animal | a1 != a2 => a1.animalId != a2.animalId\n}\n\nfact EnclosuresHaveUniqueIDs {\n all e1, e2: Enclosure | e1 != e2 => e1.enclosureId != e2.enclosureId\n}\n\nfact ZookeepersHaveUniqueIDs {\n all z1, z2: Zookeeper | z1 != z2 => z1.zookeeperId != z2.zookeeperId\n}\n\nfact FeedingsHaveUniqueIDs {\n all f1, f2: Feeding | f1 != f2 => f1.feedingId != f2.feedingId\n}\n\npred AnimalInEnclosure[a: Animal, e: Enclosure] {\n a in e.Animals\n}\n\npred ZookeeperFeedsAnimal[z: Zookeeper, a: Animal] {\n some f: Feeding | f.zookeeper = z and f.animal = a\n}\n\nrun {\n // This run command is intentionally unsatisfiable\n no a: Animal, e: Enclosure | AnimalInEnclosure[a, e] and e.capacity = 0\n} for 5\n\nrun {\n // This run command is satisfiable and returns at least 2 instances\n some a: Animal, e: Enclosure | AnimalInEnclosure[a, e] and e.capacity > 0\n} for 5", "permalink": "pretty-rigid-prude-taunt", "time": "2023-12-05 11:27:01.507971", "cmd": 1} {"id": 8029, "parent": 8026, "code": "sig Animal {\n animalId: Int,\n name: String,\n species: String\n}\n\nsig Enclosure {\n enclosureId: Int,\n name: String,\n capacity: Int,\n animals: set Animal\n}\n\nsig Zookeeper {\n zookeeperId: Int,\n name: String\n}\n\nsig Feeding {\n feedingId: Int,\n animal: Animal,\n zookeeper: Zookeeper,\n time: Int\n}\n\nfact AnimalsHaveUniqueIDs {\n all a1, a2: Animal | a1 != a2 => a1.animalId != a2.animalId\n}\n\nfact EnclosuresHaveUniqueIDs {\n all e1, e2: Enclosure | e1 != e2 => e1.enclosureId != e2.enclosureId\n}\n\nfact ZookeepersHaveUniqueIDs {\n all z1, z2: Zookeeper | z1 != z2 => z1.zookeeperId != z2.zookeeperId\n}\n\nfact FeedingsHaveUniqueIDs {\n all f1, f2: Feeding | f1 != f2 => f1.feedingId != f2.feedingId\n}\n\nrun {\n // First run command is intentionally unsatisfiable\n no a: Animal, e: Enclosure | a in e.animals and e.capacity = 0\n} for 5\n\nrun {\n // Second run command is satisfiable and returns at least 2 instances\n some a: Animal, e: Enclosure, z: Zookeeper | \n some f: Feeding | f.animal = a and f.zookeeper = z and a in e.animals and e.capacity > 0\n} for 5", "permalink": "subway-anyhow-stove-stride", "time": "2023-12-05 11:28:34.173709", "cmd": 1} {"id": 8030, "parent": 8029, "code": "sig Animal {\n animalId: Int,\n name: String,\n species: String\n}\n\nsig Enclosure {\n enclosureId: Int,\n name: String,\n capacity: Int,\n animals: set Animal\n}\n\nsig Zookeeper {\n zookeeperId: Int,\n name: String\n}\n\nsig Feeding {\n feedingId: Int,\n animal: Animal,\n zookeeper: Zookeeper,\n time: Int\n}\n\nfact AnimalsHaveUniqueIDs {\n all a1, a2: Animal | a1 != a2 => a1.animalId != a2.animalId\n}\n\nfact EnclosuresHaveUniqueIDs {\n all e1, e2: Enclosure | e1 != e2 => e1.enclosureId != e2.enclosureId\n}\n\nfact ZookeepersHaveUniqueIDs {\n all z1, z2: Zookeeper | z1 != z2 => z1.zookeeperId != z2.zookeeperId\n}\n\nfact FeedingsHaveUniqueIDs {\n all f1, f2: Feeding | f1 != f2 => f1.feedingId != f2.feedingId\n}\n\nrun {\n // First run command is intentionally unsatisfiable\n no a: Animal, e: Enclosure | a in e.animals and e.capacity = 0\n} for 5\n\nrun {\n // Second run command is satisfiable and returns at least 2 instances\n some a: Animal, e: Enclosure, z: Zookeeper | \n some f: Feeding | f.animal = a and f.zookeeper = z and a in e.animals and e.capacity > 0\n} for 5", "permalink": "denote-hurray-tying-earthy", "time": "2023-12-05 11:28:37.017678", "cmd": 2} {"id": 8035, "parent": 6737, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {\n all a : Assignment | one a.associated_with\n }\n\nrun {}\n// check NoOneCanGradeTheirOwnAssignment for 2", "permalink": "clean-doozy-chance-apron", "time": "2023-12-05 11:35:44.166684", "cmd": 1} {"id": 8041, "parent": 8034, "code": "// University Library Management System\n// Signatures\n\n// Person\nsig Person {\n borrowedBooks: set Book,\n memberOfDepartment: one Department\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person {\n managedBooks: set Book,\n supervises: set Student\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person {\n enrolledCourses: set Course,\n hasMembership: lone Membership\n}\n\n// Book\nsig Book {\n inLibrary: one Library,\n isAvailable: one Boolean\n}\n\n// Course\nsig Course {\n offeredBy: one Library,\n enrolledStudents: set Student\n}\n\n// Membership\nsig Membership {\n belongsTo: set Student,\n validTill: one Date\n}\n\n// Department\nsig Department {\n departmentLibrarian: lone Librarian,\n associatedStudents: set Student\n}\n\n// Library\nsig Library {\n libraryBooks: set Book,\n associatedCourses: set Course\n}\n\n// Date\nsig Date {}\n\nrun{}", "permalink": "cage-couch-babied-sleeve", "time": "2023-12-05 11:39:07.674973", "cmd": 1} {"id": 8042, "parent": 8040, "code": "// University Library Management System\n// Signatures\n\n// Person\nsig Person {\n borrowedBooks: set Book,\n memberOfDepartment: one Department\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person {\n managedBooks: set Book,\n supervises: set Student\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person {\n enrolledCourses: set Course,\n hasMembership: lone Membership\n}\n\n// Book\nsig Book {\n inLibrary: one Library,\n checkedOutBy: set Student\n}\n\n// Course\nsig Course {\n offeredBy: one Library,\n enrolledStudents: set Student\n}\n\n// Membership\nsig Membership {\n belongsTo: set Student,\n validTill: one Date\n}\n\n// Department\nsig Department {\n departmentLibrarian: lone Librarian,\n associatedStudents: set Student\n}\n\n// Library\nsig Library {\n libraryBooks: set Book,\n associatedCourses: set Course\n}\n\n// Date\nsig Date {}\n\n// Facts\n// A student without membership cannot borrow books\nfact studentWithoutMembershipCannotBorrowBooks {\n all s: Student | no s.hasMembership implies no s.borrowedBooks\n}\n\n// All managed books must be in the library\nfact allManagedBooksInLibrary {\n all l: Librarian | all b: l.managedBooks | b in l.memberOfDepartment.libraryBooks\n}\n\n// Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some s: Student | some s.borrowedBooks\n}\n\n// Check if at least one librarian exists\npred atLeastOneLibrarianExists {\n some l: Librarian\n}\n\n// Run commands\n// The first run command should be unsatisfiable\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances\nrun atLeastOneLibrarianExists for 5\n``", "permalink": "next-zodiac-vastly-posh", "time": "2023-12-05 11:41:07.480140", "cmd": 2} {"id": 8048, "parent": 8047, "code": "// University Library Management System\n// Signatures\n\n// Person\nsig Person {\n borrowedBooks: set Book,\n memberOfDepartment: one Department\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person {\n managedBooks: set Book,\n supervises: set Student\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person {\n enrolledCourses: set Course,\n hasMembership: lone Membership\n}\n\n// Book\nsig Book {\n inLibrary: one Library,\n checkedOutBy: set Student\n}\n\n// Course\nsig Course {\n offeredBy: one Library,\n enrolledStudents: set Student\n}\n\n// Membership\nsig Membership {\n belongsTo: set Student,\n validTill: one Date\n}\n\n// Department\nsig Department {\n departmentLibrarian: lone Librarian,\n associatedStudents: set Student\n}\n\n// Library\nsig Library {\n libraryBooks: set Book,\n associatedCourses: set Course\n}\n\n// Date\nsig Date {}\n\n// Facts\n// A student without membership cannot borrow books\nfact studentWithoutMembershipCannotBorrowBooks {\n all s: Student | no s.hasMembership implies no s.borrowedBooks\n}\n\n// // All managed books must be in the library\n// fact allManagedBooksInLibrary {\n// all l: Librarian | all b: l.managedBooks | b in l.memberOfDepartment.libraryBooks\n// }\npred someoneHasBorrowedABook {\n some s: Student | some s.borrowedBooks\n}\n\n\nrun{}", "permalink": "fleshy-dance-tweed-grew", "time": "2023-12-05 11:42:47.171956", "cmd": 1} {"id": 8049, "parent": 8048, "code": "// University Library Management System\n// Signatures\n\n// Person\nsig Person {\n borrowedBooks: set Book,\n memberOfDepartment: one Department\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person {\n managedBooks: set Book,\n supervises: set Student\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person {\n enrolledCourses: set Course,\n hasMembership: lone Membership\n}\n\n// Book\nsig Book {\n inLibrary: one Library,\n checkedOutBy: set Student\n}\n\n// Course\nsig Course {\n offeredBy: one Library,\n enrolledStudents: set Student\n}\n\n// Membership\nsig Membership {\n belongsTo: set Student,\n validTill: one Date\n}\n\n// Department\nsig Department {\n departmentLibrarian: lone Librarian,\n associatedStudents: set Student\n}\n\n// Library\nsig Library {\n libraryBooks: set Book,\n associatedCourses: set Course\n}\n\n// Date\nsig Date {}\n\n// Facts\n// A student without membership cannot borrow books\nfact studentWithoutMembershipCannotBorrowBooks {\n all s: Student | no s.hasMembership implies no s.borrowedBooks\n}\n\n// // All managed books must be in the library\n// fact allManagedBooksInLibrary {\n// all l: Librarian | all b: l.managedBooks | b in l.memberOfDepartment.libraryBooks\n// }\npred someoneHasBorrowedABook {\n some s: Student | some s.borrowedBooks\n}\n\npred atLeastOneLibrarianExists {\n some l: Librarian\n}\n\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\nrun{}", "permalink": "grope-pebbly-unbent-stick", "time": "2023-12-05 11:43:01.005374", "cmd": 1} {"id": 8017, "parent": 8014, "code": "sig Animal {\n animalId: Int,\n name: String,\n species: String\n}\n\nsig Enclosure {\n enclosureId: Int,\n name: String,\n capacity: Int,\n animals: set Animal\n}\n\nsig Zookeeper {\n zookeeperId: Int,\n name: String\n}\n\nsig Feeding {\n feedingId: Int,\n animal: Animal,\n zookeeper: Zookeeper,\n time: Int\n}\n\nfact AnimalsHaveUniqueIDs {\n all a1, a2: Animal | a1 != a2 => a1.animalId != a2.animalId\n}\n\nfact EnclosuresHaveUniqueIDs {\n all e1, e2: Enclosure | e1 != e2 => e1.enclosureId != e2.enclosureId\n}\n\nfact ZookeepersHaveUniqueIDs {\n all z1, z2: Zookeeper | z1 != z2 => z1.zookeeperId != z2.zookeeperId\n}\n\nfact FeedingsHaveUniqueIDs {\n all f1, f2: Feeding | f1 != f2 => f1.feedingId != f2.feedingId\n}\n\npred AnimalInEnclosure[a: Animal, e: Enclosure] {\n a in e.animals\n}\n\npred ZookeeperFeedsAnimal[z: Zookeeper, a: Animal] {\n some f: Feeding | f.zookeeper = z and f.animal = a\n}\n\nrun {\n // This run command is intentionally unsatisfiable\n no a: Animal, e: Enclosure | AnimalInEnclosure[a, e] and e.capacity = 0\n} for 5\n\nrun {\n // This run command is satisfiable and returns at least 2 instances\n some a: Animal, e: Enclosure | AnimalInEnclosure[a, e] and e.capacity > 0\n} for 5", "permalink": "lent-garden-awaken-client", "time": "2023-12-05 11:24:01.111096", "cmd": 1} {"id": 8020, "parent": 8019, "code": "// Signatures\n\n// Person\nsig Person {\n borrowedBooks: set Book,\n affiliatedDepartment: one Department\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person {\n managedBooks: set Book,\n managingLibrary: one Library\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person {\n membership: lone Membership,\n enrolledCourses: set Course\n}\n\n// Book\nsig Book {\n assignedToCourse: one Course,\n availability: lone Int\n}\n\n// Membership\nsig Membership {\n member: one Student,\n validTill: one Int\n}\n\n// Department\nsig Department {\n coursesOffered: set Course,\n departmentLibrary: one Library\n}\n\n// Course\nsig Course {\n studentsEnrolled: set Student,\n booksRequired: set Book\n}\n\n// Library\nsig Library {\n booksAvailable: set Book,\n librarians: set Librarian\n}\n\n// Facts\n// A student without membership cannot borrow books\n// fact studentWithoutMembershipCannotBorrowBooks {\n// all s: Student | no s.membership implies no s.borrowedBooks\n// }\n\n// Borrowed books are not available for borrowing\n// fact borrowedBooksAreNotAvailableForBorrowing {\n// all b: Book | some s: Student | b in s.borrowedBooks implies none b.availability\n// }\n\n// Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some s: Student | some s.borrowedBooks\n}\n\n// Check if at least one librarian exists\npred atLeastOneLibrarianExists {\n some l: Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one cannot borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances\nrun atLeastOneLibrarianExists for 5", "permalink": "theft-cycle-olive-scribe", "time": "2023-12-05 11:24:24.765531", "cmd": 2} {"id": 8021, "parent": 8018, "code": "sig Animal {\n animalId: Int,\n name: String,\n species: String\n}\n\nsig Enclosure {\n enclosureId: Int,\n name: String,\n capacity: Int\n}\n\nsig Zookeeper {\n zookeeperId: Int,\n name: String\n}\n\nsig Feeding {\n feedingId: Int,\n animal: Animal,\n zookeeper: Zookeeper,\n time: Int\n}\n\nfact AnimalsHaveUniqueIDs {\n all a1, a2: Animal | a1 != a2 => a1.animalId != a2.animalId\n}\n\nfact EnclosuresHaveUniqueIDs {\n all e1, e2: Enclosure | e1 != e2 => e1.enclosureId != e2.enclosureId\n}\n\nfact ZookeepersHaveUniqueIDs {\n all z1, z2: Zookeeper | z1 != z2 => z1.zookeeperId != z2.zookeeperId\n}\n\nfact FeedingsHaveUniqueIDs {\n all f1, f2: Feeding | f1 != f2 => f1.feedingId != f2.feedingId\n}\n\nrun {\n // This run command is satisfiable and returns at least 2 instances\n some a: Animal, e: Enclosure, z: Zookeeper | \n some f: Feeding | f.animal = a and f.zookeeper = z and a in e.animals and e.capacity > 0\n} for 5", "permalink": "fox-mashed-kennel-yogurt", "time": "2023-12-05 11:24:47.929319", "cmd": 1} {"id": 8022, "parent": 8020, "code": "// Signatures\n\n// Person\nsig Person {\n borrowedBooks: set Book,\n affiliatedDepartment: one Department\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person {\n managedBooks: set Book,\n managingLibrary: one Library\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person {\n membership: lone Membership,\n enrolledCourses: set Course\n}\n\n// Book\nsig Book {\n assignedToCourse: one Course,\n availability: lone Int\n}\n\n// Membership\nsig Membership {\n member: one Student,\n validTill: one Int\n}\n\n// Department\nsig Department {\n coursesOffered: set Course,\n departmentLibrary: one Library\n}\n\n// Course\nsig Course {\n studentsEnrolled: set Student,\n booksRequired: set Book\n}\n\n// Library\nsig Library {\n booksAvailable: set Book,\n librarians: set Librarian\n}\n\n// Facts\n// A student without membership cannot borrow books\nfact studentWithoutMembershipCannotBorrowBooks {\n all s: Student | no s.membership implies no s.borrowedBooks\n}\n\n// Borrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing {\n all b: Book | some s: Student | b in s.borrowedBooks implies none b.availability\n// }\n\n// Predicates\n// Check if someone has borrowed a book or not\n// pred someoneHasBorrowedABook {\n// some s: Student | some s.borrowedBooks\n// }\n\n// // Check if at least one librarian exists\n// pred atLeastOneLibrarianExists {\n// some l: Librarian\n// }\n\n// The first run command should be unsatisfiable\n// // Without membership, one cannot borrow books\n// run someoneHasBorrowedABook for 5 but 0 Membership\n\n// // The second run command should be satisfiable and return at least 2 instances\n// run atLeastOneLibrarianExists for 5\n\nrun{}", "permalink": "flaky-reflux-widget-ravine", "time": "2023-12-05 11:24:58.567733", "cmd": 1} {"id": 8036, "parent": 8035, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {\n all Assignment | one Assignment.associated_with\n }\n\nrun {}\n// check NoOneCanGradeTheirOwnAssignment for 2", "permalink": "duffel-saved-shifty-curse", "time": "2023-12-05 11:36:01.528864", "cmd": 1} {"id": 8038, "parent": 8037, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {\n all b : Assignment | one b.associated_with\n }\n\nrun {}\n// check NoOneCanGradeTheirOwnAssignment for 2", "permalink": "wind-copied-cymbal-pep", "time": "2023-12-05 11:36:55.749161", "cmd": 1} {"id": 8044, "parent": 8041, "code": "// University Library Management System\n// Signatures\n\n// Person\nsig Person {\n borrowedBooks: set Book,\n memberOfDepartment: one Department\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person {\n managedBooks: set Book,\n supervises: set Student\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person {\n enrolledCourses: set Course,\n hasMembership: lone Membership\n}\n\n// Book\nsig Book {\n inLibrary: one Library,\n checkedOutBy: set Student\n}\n\n// Course\nsig Course {\n offeredBy: one Library,\n enrolledStudents: set Student\n}\n\n// Membership\nsig Membership {\n belongsTo: set Student,\n validTill: one Date\n}\n\n// Department\nsig Department {\n departmentLibrarian: lone Librarian,\n associatedStudents: set Student\n}\n\n// Library\nsig Library {\n libraryBooks: set Book,\n associatedCourses: set Course\n}\n\n// Date\nsig Date {}\n\nrun{}", "permalink": "human-matted-iphone-giggly", "time": "2023-12-05 11:41:36.026812", "cmd": 1} {"id": 8046, "parent": 8045, "code": "// University Library Management System\n// Signatures\n\n// Person\nsig Person {\n borrowedBooks: set Book,\n memberOfDepartment: one Department\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person {\n managedBooks: set Book,\n supervises: set Student\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person {\n enrolledCourses: set Course,\n hasMembership: lone Membership\n}\n\n// Book\nsig Book {\n inLibrary: one Library,\n checkedOutBy: set Student\n}\n\n// Course\nsig Course {\n offeredBy: one Library,\n enrolledStudents: set Student\n}\n\n// Membership\nsig Membership {\n belongsTo: set Student,\n validTill: one Date\n}\n\n// Department\nsig Department {\n departmentLibrarian: lone Librarian,\n associatedStudents: set Student\n}\n\n// Library\nsig Library {\n libraryBooks: set Book,\n associatedCourses: set Course\n}\n\n// Date\nsig Date {}\n\n// Facts\n// A student without membership cannot borrow books\nfact studentWithoutMembershipCannotBorrowBooks {\n all s: Student | no s.hasMembership implies no s.borrowedBooks\n}\n\n// All managed books must be in the library\nfact allManagedBooksInLibrary {\n all l: Librarian | all b: l.managedBooks | b in l.memberOfDepartment.libraryBooks\n}\n\nrun{}", "permalink": "pasta-always-liver-pebble", "time": "2023-12-05 11:42:03.244485", "cmd": 1} {"id": 8051, "parent": 8050, "code": "// University Library Management System\n// Signatures\n\n// Person\nsig Person {\n borrowedBooks: set Book,\n memberOfDepartment: one Department\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person {\n managedBooks: set Book,\n supervises: set Student\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person {\n enrolledCourses: set Course,\n hasMembership: lone Membership\n}\n\n// Book\nsig Book {\n inLibrary: one Library,\n checkedOutBy: set Student\n}\n\n// Course\nsig Course {\n offeredBy: one Library,\n enrolledStudents: set Student\n}\n\n// Membership\nsig Membership {\n belongsTo: set Student,\n validTill: one Date\n}\n\n// Department\nsig Department {\n departmentLibrarian: lone Librarian,\n associatedStudents: set Student\n}\n\n// Library\nsig Library {\n libraryBooks: set Book,\n associatedCourses: set Course\n}\n\n// Date\nsig Date {}\n\n// Facts\n// A student without membership cannot borrow books\nfact studentWithoutMembershipCannotBorrowBooks {\n all s: Student | no s.hasMembership implies no s.borrowedBooks\n}\n\n// // All managed books must be in the library\n// fact allManagedBooksInLibrary {\n// all l: Librarian | all b: l.managedBooks | b in l.memberOfDepartment.libraryBooks\n// }\n// Function to count students who have borrowed books\nfun studentsWhoBorrowedBooks: set Student {\n {s: Student | some s.borrowedBooks}\n}\n\n// Predicate to check if a specific number of students have borrowed books\npred specificNumberOfStudentsHaveBorrowedBooks[n: Int] {\n #studentsWhoBorrowedBooks = n\n}\n\npred atLeastOneLibrarianExists {\n some l: Librarian\n}\n\nrun specificNumberOfStudentsHaveBorrowedBooks for 5 but 0 Membership\nrun atLeastOneLibrarianExists for 5\n\nrun{}", "permalink": "opal-suds-sip-phony", "time": "2023-12-05 11:45:38.179503", "cmd": 2} {"id": 8052, "parent": 8051, "code": "// University Library Management System\n// Signatures\n\n// Person\nsig Person {\n borrowedBooks: set Book,\n memberOfDepartment: one Department\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person {\n managedBooks: set Book,\n supervises: set Student\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person {\n enrolledCourses: set Course,\n hasMembership: lone Membership\n}\n\n// Book\nsig Book {\n inLibrary: one Library,\n checkedOutBy: set Student\n}\n\n// Course\nsig Course {\n offeredBy: one Library,\n enrolledStudents: set Student\n}\n\n// Membership\nsig Membership {\n belongsTo: set Student,\n validTill: one Date\n}\n\n// Department\nsig Department {\n departmentLibrarian: lone Librarian,\n associatedStudents: set Student\n}\n\n// Library\nsig Library {\n libraryBooks: set Book,\n associatedCourses: set Course\n}\n\n// Date\nsig Date {}\n\n// Facts\n// A student without membership cannot borrow books\nfact studentWithoutMembershipCannotBorrowBooks {\n all s: Student | no s.hasMembership implies no s.borrowedBooks\n}\n\n// // All managed books must be in the library\n// fact allManagedBooksInLibrary {\n// all l: Librarian | all b: l.managedBooks | b in l.memberOfDepartment.libraryBooks\n// }\n// Function to count students who have borrowed books\nfun studentsWhoBorrowedBooks: set Student {\n {s: Student | some s.borrowedBooks}\n}\n\n// Predicate to check if a specific number of students have borrowed books\npred specificNumberOfStudentsHaveBorrowedBooks[n: Int] {\n #studentsWhoBorrowedBooks = n\n}\n\npred atLeastOneLibrarianExists {\n some l: Librarian\n}\n\nrun specificNumberOfStudentsHaveBorrowedBooks for 5 but 0 Membership\nrun atLeastOneLibrarianExists for 5\n\nrun{}", "permalink": "deluxe-widely-pueblo-avoid", "time": "2023-12-05 11:45:41.501797", "cmd": 1} {"id": 8054, "parent": 8053, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nsig Person{\n name: one Name,\n email: one Email\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n department: one Department\n \n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// Name\nsig Name{\n firstName: Int,\n lastName: Int\n}\n\n// Email\nsig Email{}\n\n// Title\nsig Title{}\n\n// Membership\nsig Membership{}\n\n// Department\nsig Department {}\n\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "snazzy-rubbed-crowd-frozen", "time": "2023-12-05 11:54:41.541046", "cmd": 2} {"id": 8045, "parent": 8044, "code": "// University Library Management System\n// Signatures\n\n// Person\nsig Person {\n borrowedBooks: set Book,\n memberOfDepartment: one Department\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person {\n managedBooks: set Book,\n supervises: set Student\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person {\n enrolledCourses: set Course,\n hasMembership: lone Membership\n}\n\n// Book\nsig Book {\n inLibrary: one Library,\n checkedOutBy: set Student\n}\n\n// Course\nsig Course {\n offeredBy: one Library,\n enrolledStudents: set Student\n}\n\n// Membership\nsig Membership {\n belongsTo: set Student,\n validTill: one Date\n}\n\n// Department\nsig Department {\n departmentLibrarian: lone Librarian,\n associatedStudents: set Student\n}\n\n// Library\nsig Library {\n libraryBooks: set Book,\n associatedCourses: set Course\n}\n\n// Date\nsig Date {}\n\n// Facts\n// A student without membership cannot borrow books\nfact studentWithoutMembershipCannotBorrowBooks {\n all s: Student | no s.hasMembership implies no s.borrowedBooks\n}\n\nrun{}", "permalink": "aghast-caring-zebra-runny", "time": "2023-12-05 11:41:52.827833", "cmd": 1} {"id": 8050, "parent": 8049, "code": "// University Library Management System\n// Signatures\n\n// Person\nsig Person {\n borrowedBooks: set Book,\n memberOfDepartment: one Department\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person {\n managedBooks: set Book,\n supervises: set Student\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person {\n enrolledCourses: set Course,\n hasMembership: lone Membership\n}\n\n// Book\nsig Book {\n inLibrary: one Library,\n checkedOutBy: set Student\n}\n\n// Course\nsig Course {\n offeredBy: one Library,\n enrolledStudents: set Student\n}\n\n// Membership\nsig Membership {\n belongsTo: set Student,\n validTill: one Date\n}\n\n// Department\nsig Department {\n departmentLibrarian: lone Librarian,\n associatedStudents: set Student\n}\n\n// Library\nsig Library {\n libraryBooks: set Book,\n associatedCourses: set Course\n}\n\n// Date\nsig Date {}\n\n// Facts\n// A student without membership cannot borrow books\nfact studentWithoutMembershipCannotBorrowBooks {\n all s: Student | no s.hasMembership implies no s.borrowedBooks\n}\n\n// // All managed books must be in the library\n// fact allManagedBooksInLibrary {\n// all l: Librarian | all b: l.managedBooks | b in l.memberOfDepartment.libraryBooks\n// }\npred someoneHasBorrowedABook {\n some s: Student | some s.borrowedBooks\n}\n\npred atLeastOneLibrarianExists {\n some l: Librarian\n}\n\nrun someoneHasBorrowedABook for 5 but 0 Membership\nrun atLeastOneLibrarianExists for 5\n\nrun{}", "permalink": "mossy-shorty-twitch-legged", "time": "2023-12-05 11:43:27.598698", "cmd": 2} {"id": 8053, "parent": 7720, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nsig Person{\n name: one Name,\n email: one Email\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n department: one Department\n \n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Book\nsig Book{\n title : one Title,\n // available: one Bool\n availability: one Int\n}\n\n// Name\nsig Name{\n firstName: Int,\n lastName: Int\n}\n\n// Email\nsig Email{}\n\n// Title\nsig Title{}\n\n// Membership\nsig Membership{}\n\n// Department\nsig Department {}\n\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.membership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\nfact borrowedBooksAreNotAvailableForBorrowing{\n all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "runner-depth-hermit-kick", "time": "2023-12-05 11:54:38.436041", "cmd": 1} {"id": 8089, "parent": null, "code": "// Signatures with Fields\nsig Person {\n borrowedBooks: set Books,\n department: Department\n}\nsig Student extends Person {\n courses: set Course,\n membership: Membership\n}\nsig Librarian extends Person {\n assignedDepartment: Department,\n managedBooks: set Books\n}\nsig Books {\n authors: set Person,\n relatedCourse: Course\n}\nsig Department {\n head: one Person,\n coursesOffered: set Course\n}\nsig Course {\n requiredBooks: set Books,\n teachingStaff: set Person\n}\nsig Membership {\n member: one Person,\n validThrough: univ\n}\n\n// Facts\nfact StudentsWithoutMembershipCannotBorrow {\n all s: Student | s.membership = none implies s.borrowedBooks = none\n}\n\nfact LibrariansDoNotBorrowBooks {\n all l: Librarian | l.borrowedBooks = none\n}\n\n// Predicates\npred showBorrowingScenario(s: Student) {\n #s.borrowedBooks > 0\n}\n\npred showLibrarianDetails(l: Librarian) {\n #l.managedBooks > 0\n}\n\n// Run Commands\nrun unsatisfiableScenario for 3 but 1 Student, 1 Librarian, 2 Books {\n some s: Student | showBorrowingScenario[s] and s.membership = none\n}\n\nrun satisfiableScenario for 5 but 2 Student, 2 Librarian, 3 Books, 2 Department, 3 Membership, 4 Course {\n some s: Student | showBorrowingScenario[s] and s.membership != none\n some l: Librarian | showLibrarianDetails[l]\n}", "permalink": "bottle-ipad-recall-filth", "time": "2023-12-05 13:55:41.388332", "cmd": 1} {"id": 8090, "parent": 8089, "code": "// Signatures with Fields\nsig Person {\n borrowedBooks: set Books,\n department: Department\n}\nsig Student extends Person {\n courses: set Course,\n membership: Membership\n}\nsig Librarian extends Person {\n assignedDepartment: Department,\n managedBooks: set Books\n}\nsig Books {\n authors: set Person,\n relatedCourse: Course\n}\nsig Department {\n head: one Person,\n coursesOffered: set Course\n}\nsig Course {\n requiredBooks: set Books,\n teachingStaff: set Person\n}\nsig Membership {\n member: one Person,\n validThrough: univ\n}\n\n// Facts\nfact StudentsWithoutMembershipCannotBorrow {\n all s: Student | s.membership = none implies s.borrowedBooks = none\n}\n\nfact LibrariansDoNotBorrowBooks {\n all l: Librarian | l.borrowedBooks = none\n}\n\n// Predicates\npred showBorrowingScenario(s: Student) {\n #s.borrowedBooks > 0\n}\n\npred showLibrarianDetails(l: Librarian) {\n #l.managedBooks > 0\n}\n\n// Run Commands\nrun unsatisfiableScenario for 3 but 1 Student, 1 Librarian, 2 Books {\n some s: Student | showBorrowingScenario[s] and s.membership = none\n}\n\nrun satisfiableScenario for 5 but 2 Student, 2 Librarian, 3 Books, 2 Department, 3 Membership, 4 Course {\n some s: Student | showBorrowingScenario[s] and s.membership != none\n some l: Librarian | showLibrarianDetails[l]\n}", "permalink": "padded-bucket-polish-fancy", "time": "2023-12-05 13:55:45.781945", "cmd": 2} {"id": 8097, "parent": 8090, "code": "// Abstract signature\nabstract sig Person {\n name: one String,\n age: one Int\n}\n\n// Signatures with inheritance\nsig Student extends Person {\n enrolledCourses: set Course,\n membership: one Membership\n}\n\nsig Librarian extends Person {\n managedDepartment: one Department,\n experienceYears: one Int\n}\n\n// Updated Signatures with fields\nsig Membership {\n validTill: one Date,\n issuedBy: one Librarian\n}\n\nsig Department {\n departmentName: one String,\n head: one Librarian\n}\n\nsig Course {\n courseName: one String,\n associatedBooks: set Books\n}\n\nsig Books {\n title: one String,\n author: one Person\n}\n\n// Facts\nfact StudentsWithoutMembershipCannotBorrow {\n no s: Student | s.membership = none and some s.->Books\n}\n\nfact LibrariansDoNotBorrowBooks {\n all l: Librarian | no l.->Books\n}\n\n// Predicates\npred showStudentDetails(s: Student) {\n some s.enrolledCourses and s.membership != none\n}\n\npred showLibrarianDetails(l: Librarian) {\n some l.managedDepartment and l.experienceYears > 0\n}\n\n// Run Commands\nrun unsatisfiableScenario for 3 but 1 Student, 1 Librarian, 2 Books {\n some s: Student | no s.membership and some s.->Books\n}\n\nrun satisfiableScenario for 5 but 2 Student, 2 Librarian, 3 Books {\n some s: Student | showStudentDetails[s]\n some l: Librarian | showLibrarianDetails[l]\n}", "permalink": "cycle-mouth-maggot-reborn", "time": "2023-12-05 13:59:25.328159", "cmd": 2} {"id": 8098, "parent": 8097, "code": "// Abstract signature\nabstract sig Person {\n name: one String,\n age: one Int\n}\n\n// Signatures with inheritance\nsig Student extends Person {\n enrolledCourses: set Course,\n membership: one Membership\n}\n\nsig Librarian extends Person {\n managedDepartment: one Department,\n experienceYears: one Int\n}\n\n// Updated Signatures with fields\nsig Membership {\n validTill: one Date,\n issuedBy: one Librarian\n}\n\nsig Department {\n departmentName: one String,\n head: one Librarian\n}\n\nsig Course {\n courseName: one String,\n associatedBooks: set Books\n}\n\nsig Books {\n title: one String,\n author: one Person\n}\n\n// Facts\nfact StudentsWithoutMembershipCannotBorrow {\n no s: Student | s.membership = none and some s.->Books\n}\n\nfact LibrariansDoNotBorrowBooks {\n all l: Librarian | no l.->Books\n}\n\n// Predicates\npred showStudentDetails(s: Student) {\n some s.enrolledCourses and s.membership != none\n}\n\npred showLibrarianDetails(l: Librarian) {\n some l.managedDepartment and l.experienceYears > 0\n}\n\n// Run Commands\nrun unsatisfiableScenario for 3 but 1 Student, 1 Librarian, 2 Books {\n some s: Student | no s.membership and some s.->Books\n}\n\nrun satisfiableScenario for 5 but 2 Student, 2 Librarian, 3 Books {\n some s: Student | showStudentDetails[s]\n some l: Librarian | showLibrarianDetails[l]\n}", "permalink": "waggle-frail-battle-bolt", "time": "2023-12-05 13:59:29.624527", "cmd": 1} {"id": 8099, "parent": null, "code": "sig A{\n aa : one A\n}\n\nassert vacuous {\n all a : A | one a.aa\n}\ncheck vacuous", "permalink": "sitcom-obtain-dime-kosher", "time": "2023-12-05 14:44:53.599166", "cmd": 1} {"id": 8100, "parent": 8099, "code": "sig A{\n aa : one A\n}\n\npred vacuous {\n all a : A | one a.aa\n}\nrun { !vacuous}", "permalink": "dean-finer-twins-sleep", "time": "2023-12-05 14:45:26.274893", "cmd": 1} {"id": 8101, "parent": 8100, "code": "sig A{\n aa : one A\n}\n\npred vacuous {\n all a : A | one a.aa\n}\nrun { !vacuous}", "permalink": "action-circle-skied-jogger", "time": "2023-12-05 14:45:35.719239", "cmd": 1} {"id": 8109, "parent": 7058, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\nrun {}", "permalink": "evolve-defeat-scroll-crave", "time": "2023-12-05 15:00:09.157758", "cmd": 1} {"id": 8110, "parent": 8109, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n// Signatures\nabstract sig User {\n userId: Int,\n username: String\n}\n\nsig Admin extends User {\n // Additional fields for Admin\n isAdmin: Bool\n}\n\nsig Post {\n postId: Int,\n content: String,\n author: User\n}\n\nsig Comment {\n commentId: Int,\n text: String,\n author: User,\n onPost: Post\n}\n\nsig Like {\n likeId: Int,\n byUser: User,\n onPost: Post\n}\n\n// Facts\nfact UniqueUserIds {\n // Ensure user IDs are unique\n all u1, u2: User | u1 != u2 implies u1.userId != u2.userId\n}\n\nfact OneAdmin {\n // Ensure there is at least one admin\n some a: Admin | a.isAdmin = true\n}\n\n// Predicates\npred userLikesPost[u: User, p: Post] {\n some l: Like | l.byUser = u and l.onPost = p\n}\n\npred postHasComments[p: Post] {\n some c: Comment | c.onPost = p\n}\n\n// Run commands\nrun unsatisfiableExample {\n // Specify a condition that is unsatisfiable\n no u: User | u.userId > 10\n}\n\nrun satisfiableExample for 2 {\n // Specify a condition that is satisfiable\n some u: User | u.userId < 5\n}\n\n\n\nrun {}", "permalink": "axis-grain-change-tipped", "time": "2023-12-05 15:05:00.587881", "cmd": 1} {"id": 8111, "parent": 8110, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n// Signatures\nabstract sig User {\n userId: Int,\n username: String\n}\n\nsig Admin extends User {\n // Additional fields for Admin\n isAdmin: Bool\n}\n\nsig Post {\n postId: Int,\n content: String,\n author: User\n}\n\nsig Comment {\n commentId: Int,\n text: String,\n author: User,\n onPost: Post\n}\n\nsig Like {\n likeId: Int,\n byUser: User,\n onPost: Post\n}\n\n// Facts\nfact UniqueUserIds {\n // Ensure user IDs are unique\n all u1, u2: User | u1 != u2 implies u1.userId != u2.userId\n}\n\nfact OneAdmin {\n // Ensure there is at least one admin\n some a: Admin | a.isAdmin = true\n}\n\n// Predicates\npred userLikesPost[u: User, p: Post] {\n some l: Like | l.byUser = u and l.onPost = p\n}\n\npred postHasComments[p: Post] {\n some c: Comment | c.onPost = p\n}\n\n// Run commands\nrun unsatisfiableExample {\n // Specify a condition that is unsatisfiable\n no u: User | u.userId > 10\n}\n\nrun satisfiableExample for 2 {\n // Specify a condition that is satisfiable\n some u: User | u.userId < 5\n}\n\n\n\nrun {}", "permalink": "chute-degree-sleep-saucy", "time": "2023-12-05 15:05:09.417793", "cmd": 2} {"id": 8117, "parent": null, "code": "module encapsulate_field\n\nopen javametamodel_withfield_nofieldcall\n\n\nrun show for 2 Package, 3 Class, 1 Field, 3 Method, 3 ClassId, 3 MethodId, 1 FieldId, 3 Body\n\none sig getfieldid, caller extends MethodId {}\n\nfact Encapsulate {\n\n//geral\nsome Field\n\nsomePublicField[] \n\ndifferentIdsForClasses[]\ndifferentIdsForMethods[]\n#Package = 2\nsomeTester[caller]\nsomeTester[getfieldid] \nsomeGetter[]\n}\n\npred someGetter[] {\n one m:Method | m.b in LiteralValue && #m.param = 0 && m.id = getfieldid \n}\n\npred somePublicField[] {\n some f:Field| f.acc = public && f.type = Long_ \n}", "permalink": "bonus-blouse-skiing-dreamt", "time": "2023-12-05 15:52:24.830431", "cmd": 1} {"id": 8118, "parent": 8117, "code": "\nrun show for 2 Package, 3 Class, 1 Field, 3 Method, 3 ClassId, 3 MethodId, 1 FieldId, 3 Body\n\none sig getfieldid, caller extends MethodId {}\n\nfact Encapsulate {\n\n//geral\nsome Field\n\nsomePublicField[] \n\ndifferentIdsForClasses[]\ndifferentIdsForMethods[]\n#Package = 2\nsomeTester[caller]\nsomeTester[getfieldid] \nsomeGetter[]\n}\n\npred someGetter[] {\n one m:Method | m.b in LiteralValue && #m.param = 0 && m.id = getfieldid \n}\n\npred somePublicField[] {\n some f:Field| f.acc = public && f.type = Long_ \n}", "permalink": "erupt-decay-peso-radish", "time": "2023-12-05 15:52:39.858028", "cmd": 1} {"id": 8119, "parent": 8118, "code": "\nrun show for 2 Package, 3 Class, 1 Field, 3 Method, 3 ClassId, 3 MethodId, 1 FieldId, 3 Body\n\none sig getfieldid, caller extends MethodId {}\n\nfact Encapsulate {\n\n//geral\nsome Field\n\nsomePublicField[] \n\ndifferentIdsForClasses[]\ndifferentIdsForMethods[]\n#Package = 2\nsomeTester[caller]\nsomeTester[getfieldid] \nsomeGetter[]\n}\n\npred someGetter[] {\n one m:Method | m.b in LiteralValue && #m.param = 0 && m.id = getfieldid \n}\n\npred somePublicField[] {\n some f:Field| f.acc = public && f.type = Long_ \n}", "permalink": "amuser-salute-clunky-voyage", "time": "2023-12-05 15:53:02.904386", "cmd": 1} {"id": 8120, "parent": 8119, "code": "\nrun show for 2 Package, 3 Class, 1 Field, 3 Method, 3 ClassId, 3 MethodId, 1 FieldId, 3 Body\n\none sig getfieldid, caller {}\n\nfact Encapsulate {\n\n//geral\nsome Field\n\nsomePublicField[] \n\ndifferentIdsForClasses[]\ndifferentIdsForMethods[]\n#Package = 2\nsomeTester[caller]\nsomeTester[getfieldid] \nsomeGetter[]\n}\n\npred someGetter[] {\n one m:Method | m.b in LiteralValue && #m.param = 0 && m.id = getfieldid \n}\n\npred somePublicField[] {\n some f:Field| f.acc = public && f.type = Long_ \n}", "permalink": "rework-retype-elude-rink", "time": "2023-12-05 15:53:15.752012", "cmd": 1} {"id": 8121, "parent": 8120, "code": "\nrun show for 2 Package, 3 Class, 1 Field, 3 Method, 3 ClassId, 3 MethodId, 1 FieldId, 3 Body\n\none sig getfieldid, caller {}\n\n\nfact Encapsulate {\n\n//geral\nsome Field\n\nsomePublicField[] \n\ndifferentIdsForClasses[]\ndifferentIdsForMethods[]\n#Package = 2\nsomeTester[caller]\nsomeTester[getfieldid] \nsomeGetter[]\n}\n\npred someGetter[] {\n one m:Method | m.b in LiteralValue && #m.param = 0 && m.id = getfieldid \n}\n\npred somePublicField[] {\n some f:Field| f.acc = public && f.type = Long_ \n}", "permalink": "dander-pronto-lunacy-axis", "time": "2023-12-05 15:53:30.281260", "cmd": 1} {"id": 8122, "parent": 8121, "code": "\nrun show for 2 Package, 3 Class, 1 Field, 3 Method, 3 ClassId, 3 MethodId, 1 FieldId, 3 Body\n\none sig getfieldid, caller {}\n\n\nfact Encapsulate {\n\n//geral\nsome Field\n\nsomePublicField[] \n\ndifferentIdsForClasses[]\ndifferentIdsForMethods[]\n#Package = 2\nsomeTester[caller]\nsomeTester[getfieldid] \nsomeGetter[]\n}\n\n\n\npred somePublicField[] {\n some f:Field| f.acc = public && f.type = Long_ \n}", "permalink": "equity-gravel-detest-shirt", "time": "2023-12-05 15:53:41.392519", "cmd": 1} {"id": 8123, "parent": 8122, "code": "\nrun show for 2 Package, 3 Class, 1 Field, 3 Method, 3 ClassId, 3 MethodId, 1 FieldId, 3 Body\n\none sig getfieldid, caller {}\n\n\nfact Encapsulate {\n\n//geral\nsome Field\n\nsomePublicField[] \n\ndifferentIdsForClasses[]\ndifferentIdsForMethods[]\n#Package = 2\nsomeTester[caller]\nsomeTester[getfieldid] \nsomeGetter[]\n}\n\n\n", "permalink": "manual-carat-sprig-rename", "time": "2023-12-05 15:53:46.635898", "cmd": 1} {"id": 8124, "parent": 8123, "code": "\nrun show for 2 Package, 3 Class, 1 Field, 3 Method, 3 ClassId, 3 MethodId, 1 FieldId, 3 Body\n\none sig getfieldid, caller {}\n\n\nfact Encapsulate {\n\n//geral\n\n\nsomePublicField[] \n\ndifferentIdsForClasses[]\ndifferentIdsForMethods[]\n#Package = 2\nsomeTester[caller]\nsomeTester[getfieldid] \nsomeGetter[]\n}\n\n\n", "permalink": "stamp-chevy-chief-fifth", "time": "2023-12-05 15:53:52.940916", "cmd": 1} {"id": 8125, "parent": 8124, "code": "\nrun show for 2 Package, 3 Class, 1 Field, 3 Method, 3 ClassId, 3 MethodId, 1 FieldId, 3 Body\n\none sig getfieldid, caller {}\n\n\nfact Encapsulate {\n\n//geral\n\n\n\ndifferentIdsForClasses[]\ndifferentIdsForMethods[]\n#Package = 2\nsomeTester[caller]\nsomeTester[getfieldid] \nsomeGetter[]\n}\n\n\n", "permalink": "train-evoke-ivy-fool", "time": "2023-12-05 15:53:57.166166", "cmd": 1} {"id": 8126, "parent": 8125, "code": "\nrun show for 2 Package, 3 Class, 1 Field, 3 Method, 3 ClassId, 3 MethodId, 1 FieldId, 3 Body\n\none sig getfieldid, caller {}\n\n\nfact Encapsulate {\n\n}\n\n\n", "permalink": "dollop-frenzy-zap-basis", "time": "2023-12-05 15:54:11.094763", "cmd": 1} {"id": 8127, "parent": 8126, "code": "\nrun for 2 Package, 3 Class, 1 Field, 3 Method, 3 ClassId, 3 MethodId, 1 FieldId, 3 Body\n\none sig getfieldid, caller {}\n\n\nfact Encapsulate {\n\n}\n\n\n", "permalink": "nifty-padded-riches-utter", "time": "2023-12-05 15:54:20.907727", "cmd": 1} {"id": 8128, "parent": 7058, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\n\nsig Salesperson, Manager extends Person {}\n\nsig Car {\n model: one String,\n price: one Int\n}\n\nsig Sale {\n car: one Car,\n soldBy: one Salesperson,\n approvedBy: one Manager\n}\n\nfact UniqueSales {\n all disj s1, s2: Sale | s1.car != s2.car\n}\n\nfact ManagerSalespersonSeparation {\n all s: Sale | s.soldBy != s.approvedBy\n}\n\npred hasMadeSale[s: Salesperson] {\n some Sale | s = soldBy\n}\n\npred hasApprovedSale[m: Manager] {\n some Sale | m = approvedBy\n}\n\nassert NoSelfSales {\n all s: Salesperson | no c: Car | (some sa: Sale | sa.car = c and sa.soldBy = s and sa.approvedBy = s)\n}\n\ncheck NoSelfSales for 4\n\nrun {}", "permalink": "twisty-donor-stray-quilt", "time": "2023-12-05 16:56:32.011375", "cmd": 1} {"id": 8134, "parent": 7069, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // Someone killed Agatha\n some x: Person | x.killed = Agatha\n \n // For all x and y, if x killed y, then x hates y and x is not richer than y\n all x, y: Person | x.killed = y implies (x in y.hates and not x in y.richer)\n \n // Everyone who hates Agatha, is not hated by Charles\n all x: Person | x in Agatha.hates implies not x in Charles.hates\n \n // Agatha hates herself and Agatha hates Charles\n Agatha in Agatha.hates and Agatha in Charles.hates\n \n // Everyone is richer than Agatha except for Butler\n all x: Person - Butler | x in Agatha.richer\n \n // Agatha hates everyone whom Butler hates\n all x: Person | x in Butler.hates implies x in Agatha.hates\n \n // Everyone hates someone\n all x: Person | some x.hates\n}\n\nrun puzzle", "permalink": "tarmac-barn-oozy-petite", "time": "2023-12-05 17:28:35.453377", "cmd": 1} {"id": 8136, "parent": 6737, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {all a : Assignment | one a.associated_with}\n\n// Predicate PolicyAllowsGrading defines the policy for allowing grading of an Assignment by a Person.\npred PolicyAllowsGrading(p: Person, a: Assignment) {\n p in a.associated_with.assistant or p in a.associated_with.instructor\n}\n\n// Assert NoOneCanGradeTheirOwnAssignment checks that no Person can grade their own Assignment.\nassert NoOneCanGradeTheirOwnAssignment {\n all p : Person, a : Assignment |\n PolicyAllowsGrading[p, a] implies not p in a.assigned_to\n}\n\ncheck NoOneCanGradeTheirOwnAssignment for 2", "permalink": "crazed-duplex-feline-rubble", "time": "2023-12-05 17:29:28.003134", "cmd": 1} {"id": 8141, "parent": 8140, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // Constraint (1)\n // There exists someone who killed Agatha\n some x: Person | x.killed = Agatha\n\n // Constraint (2)\n // For every x and y, if x killed y, then x hates y and x is not richer than y\n all x, y: Person | x.killed = y implies (x in y.hates and not x in y.richer)\n\n // Constraint (3)\n // For every x, if Agatha hates x, then Charles does not hate x\n all x: Person | x in Agatha.hates implies not x in Charles.hates\n\n // Constraint (4)\n // Agatha hates herself and Agatha hates Charles\n Agatha in Agatha.hates and Agatha in Charles.hates\n\n // Constraint (5)\n // For every x, x is richer than Agatha if and only if x is not Butler\n all x: Person | x != Butler iff x in Agatha.richer\n\n // Constraint (6)\n // For every x, if Agatha hates x, then Butler hates x\n all x: Person | x in Agatha.hates implies x in Butler.hates\n\n // Constraint (7)\n // For every x, there exists some y that x hates\n all x: Person | some y: Person | x in y.hates\n\n}\n\nrun puzzle for exactly 1 Agatha, 1 Butler, 1 Charles", "permalink": "grimy-nibble-level-detail", "time": "2023-12-05 17:42:46.852479", "cmd": 1} {"id": 8144, "parent": 8143, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // (1) There exists someone who killed Agatha\n some x: Person | x.killed = Agatha\n\n // (2) Anyone who killed anyone hates them and is not richer than them\n all x, y: Person | x.killed = y implies (x in y.hates and not x in y.richer)\n\n // (3) Everyone who hates Agatha doesn't hate Charles\n all x: Person | x in Agatha.hates implies not x in Charles.hates\n\n // (4) Agatha hates herself and Charles\n Agatha in Agatha.hates\n Agatha in Charles.hates\n\n // (5) Agatha is not richer than anyone except Butler\n no x: Person - Butler | x in Agatha.richer\n\n // (6) Agatha hates everyone Butler hates\n all x: Person | x in Butler.hates implies x in Agatha.hates\n\n // (7) Everyone hates someone\n all x: Person | some y: Person | x in y.hates\n}\n\nrun for exactly 1 Agatha, 1 Butler, 1 Charles", "permalink": "dollar-duplex-subway-whole", "time": "2023-12-05 17:54:22.092171", "cmd": 1} {"id": 8147, "parent": 8146, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n no File - Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n no (File - Protected - Trash)\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no (File.link & Trash)\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f: File | some f.link and some f.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f in Trash implies all l: f.link | l in Trash\n}\n\nrun inv10", "permalink": "eaten-retry-comic-lucid", "time": "2023-12-05 18:04:48.777899", "cmd": 1} {"id": 8168, "parent": 8167, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nabstract sig Person{\n memberOfDepartment: set Department,\n id : Int\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n hasMembership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n supervises: set Student \n}\n\n// Book\nsig Book {\n inLibrary : one Library,\n checkOutBy: set Student\n}\n\n// Department\nsig Department {\n associatedStudents: set Student,\n departmentLibrarian: one Librarian\n}\n\n//Library\nsig Library{\n contains :some Book,\n incharge: some Librarian\n}\n\n// Membership\nsig Membership{\n belongsTo: set Student,\n validTill : one Date\n}\n\n//Date\nsig Date{\n day: Int,\n month: Int,\n Year: Int\n}\n\n// Facts\n// fact: A student without membership cannot borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.hasMembership implies no student.borrowedBooks\n}\n\n// fact: Each book can be checked out by at most one student at a time\nfact bookCheckedOutByAtMostOneStudent {\n all book: Book | #book.checkOutBy <= 1\n}\n\n// fact: There is only one Library instance\nfact onlyOneLibrary {\n #Library = 1\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "crook-squash-launch-unison", "time": "2023-12-05 19:21:15.574948", "cmd": 1} {"id": 8172, "parent": 7683, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all x: File | x in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some x: File | x in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all x: File | x in Protected implies x not in Trash\n\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all x: File| (x not in Protected implies x in Trash)\n\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n all x: File | lone x.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n// no x: File | some x.link implies x not in Trash\n all x,y: File | y in x.link implies y not in Trash\n\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n all x : File | no x.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n all x: File | some x.link implies no (x.link).link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n all x,y: File | x in y.link and y in Trash implies x in Trash\n}\n\nrun inv10", "permalink": "legacy-tripod-prism-grinch", "time": "2023-12-05 19:22:03.743064", "cmd": 1} {"id": 8173, "parent": 8172, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all x: File | x in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some x: File | x in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n all x: File | x in Protected implies x not in Trash\n\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n all x: File| (x not in Protected implies x in Trash)\n\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n all x: File | lone x.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n// no x: File | some x.link implies x not in Trash\n all x,y: File | y in x.link implies y not in Trash\n\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n all x : File | no x.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n all x: File | some x.link implies no (x.link).link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n all x,y: File | x in y.link and y in Trash implies x in Trash\n}\n\nrun inv10", "permalink": "gorged-shock-impart-fondue", "time": "2023-12-05 19:22:06.484881", "cmd": 9} {"id": 8178, "parent": 8177, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nabstract sig Person{\n memberOfDepartment: set Department,\n id : Int\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n hasMembership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n supervises: set Student \n}\n\n// Book\nsig Book {\n inLibrary : one Library,\n checkOutBy: set Student\n}\n\n// Department\nsig Department {\n associatedStudents: set Student,\n departmentLibrarian: one Librarian\n}\n\n//Library\nsig Library{\n contains :some Book,\n incharge: some Librarian\n}\n\n// Membership\nsig Membership{\n belongsTo: set Student,\n validTill : one Date\n}\n\n//Date\nsig Date{\n day: Int,\n month: Int,\n Year: Int\n}\n\n// Facts\n// fact: A student without membership cannot borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.hasMembership implies no student.borrowedBooks\n}\n\n// fact: Each book can be checked out by at most one student at a time\nfact bookCheckedOutByAtMostOneStudent {\n all book: Book | #book.checkOutBy <= 1\n}\n\n// fact: There is only one Library instance\nfact onlyOneLibrary {\n #Library = 1\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "hankie-unsent-spud-blinks", "time": "2023-12-05 19:23:20.391807", "cmd": 2} {"id": 8211, "parent": 8210, "code": "// Signatures\nabstract sig User {\n userId: Int,\n username: String\n}\n\nsig Admin extends User {\n // Additional fields for Admin\n isAdmin: Bool\n}\n\nsig Post {\n postId: Int,\n content: String,\n author: User\n}\n\nsig Comment {\n commentId: Int,\n text: String,\n author: User,\n onPost: Post\n}\n\nsig Like {\n likeId: Int,\n byUser: User,\n onPost: Post\n}\n\n// Facts\nfact UniqueUserIds {\n // Ensure user IDs are unique\n all u1, u2: User | u1 != u2 implies u1.userId != u2.userId\n}\n\nfact OneAdmin {\n // Ensure there is at least one admin\n some a: Admin | a.isAdmin = true\n}\n\n// Predicates\npred userLikesPost[u: User, p: Post] {\n some l: Like | l.byUser = u and l.onPost = p\n}\n\npred postHasComments[p: Post] {\n some c: Comment | c.onPost = p\n}\n\n// Run commands\nrun unsatisfiableExample {\n // Specify a condition that is unsatisfiable\n no u: User | u.userId > 10\n}\n\nrun satisfiableExample for 2 {\n // Specify a condition that is satisfiable\n some u: User | u.userId < 5\n}\n\nrun{}", "permalink": "syrup-feel-garden-dose", "time": "2023-12-05 21:44:26.009244", "cmd": 3} {"id": 8212, "parent": 8211, "code": "// Signatures\nabstract sig User {\n userId: Int,\n username: String\n}\n\nsig Admin extends User {\n // Additional fields for Admin\n isAdmin: Bool\n}\n\nsig Post {\n postId: Int,\n content: String,\n author: User\n}\n\nsig Comment {\n commentId: Int,\n text: String,\n author: User,\n onPost: Post\n}\n\nsig Like {\n likeId: Int,\n byUser: User,\n onPost: Post\n}\n\n// Facts\nfact UniqueUserIds {\n // Ensure user IDs are unique\n all u1, u2: User | u1 != u2 implies u1.userId != u2.userId\n}\n\nfact OneAdmin {\n // Ensure there is at least one admin\n some a: Admin | a.isAdmin = true\n}\n\n// Predicates\npred userLikesPost[u: User, p: Post] {\n some l: Like | l.byUser = u and l.onPost = p\n}\n\npred postHasComments[p: Post] {\n some c: Comment | c.onPost = p\n}\n\n// Run commands\nrun unsatisfiableExample {\n // Specify a condition that is unsatisfiable\n no u: User | u.userId > 10\n}\n\nrun satisfiableExample for 2 {\n // Specify a condition that is satisfiable\n some u: User | u.userId < 5\n}\n\nrun{}", "permalink": "rink-wilder-zesty-salon", "time": "2023-12-05 21:45:02.403797", "cmd": 1} {"id": 8216, "parent": 8215, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\nabstract sig Person {}\nsig Student, Professor extends Person {}\nsig Class {\ninstructor: one Professor,\nassistant: set Student}\nsig Assignment {\nassociated_with: set Class,\nassigned_to: some Student}\nfact {all a : Assignment | one a.associated_with}\npred PolicyAllowsGrading(p: Person, a: Assignment) {\np in a.associated_with.assistant or p in\na.associated_with.instructor}\nassert NoOneCanGradeTheirOwnAssignment {\nall p : Person, a : Assignment |\nPolicyAllowsGrading[p, a] implies not p in a.assigned_to}\ncheck NoOneCanGradeTheirOwnAssignment for 2\n\nrun {}", "permalink": "donor-plated-shimmy-froth", "time": "2023-12-05 22:47:49.517973", "cmd": 2} {"id": 8219, "parent": 8217, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\nmodule OnlineMarketplace\n\n// Signatures\nsig User {\n username: String,\n email: String\n}\n\nsig Product {\n productId: Int,\n name: String,\n price: Int,\n seller: User\n}\n\nsig Transaction {\n transactionId: Int,\n buyer: User,\n seller: User,\n product: Product\n}\n\nsig Feedback {\n feedbackId: Int,\n rating: Int,\n comment: String,\n user: User\n}\n\n// Fields\nfact uniqueUsernames {\n all u1, u2: User | u1 != u2 implies u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all t1, t2: Transaction | t1 != t2 implies t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all f1, f2: Feedback | f1 != f2 implies f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is intentionally unsatisfiable for demonstration purposes\n some u: User | no p: Product | validTransaction[some t: Transaction | t.buyer = u]\n}\n\nrun satisfiableExample for 2 {\n // This command is designed to be satisfiable\n some t: Transaction | validTransaction[t] and positiveFeedback[some f: Feedback | f.user = t.buyer]\n}\n\n\nrun {}", "permalink": "risk-envoy-malt-barrel", "time": "2023-12-05 22:53:41.196744", "cmd": 1} {"id": 8220, "parent": 8219, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// Signatures\nsig User {\n username: String,\n email: String\n}\n\nsig Product {\n productId: Int,\n name: String,\n price: Int,\n seller: User\n}\n\nsig Transaction {\n transactionId: Int,\n buyer: User,\n seller: User,\n product: Product\n}\n\nsig Feedback {\n feedbackId: Int,\n rating: Int,\n comment: String,\n user: User\n}\n\n// Fields\nfact uniqueUsernames {\n all u1, u2: User | u1 != u2 implies u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all t1, t2: Transaction | t1 != t2 implies t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all f1, f2: Feedback | f1 != f2 implies f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is intentionally unsatisfiable for demonstration purposes\n some u: User | no p: Product | validTransaction[some t: Transaction | t.buyer = u]\n}\n\nrun satisfiableExample for 2 {\n // This command is designed to be satisfiable\n some t: Transaction | validTransaction[t] and positiveFeedback[some f: Feedback | f.user = t.buyer]\n}\n\n\nrun {}", "permalink": "unsnap-slacks-fancy-cane", "time": "2023-12-05 22:54:02.262846", "cmd": 1} {"id": 8221, "parent": 8220, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// Signatures\nsig User {\n username: String,\n email: String\n}\n\nsig Product {\n productId: Int,\n name: String,\n price: Int,\n seller: User\n}\n\nsig Transaction {\n transactionId: Int,\n buyer: User,\n seller: User,\n product: Product\n}\n\nsig Feedback {\n feedbackId: Int,\n rating: Int,\n comment: String,\n user: User\n}\n\n// Fields\nfact uniqueUsernames {\n all u1, u2: User | u1 != u2 implies u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all t1, t2: Transaction | t1 != t2 implies t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all f1, f2: Feedback | f1 != f2 implies f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is intentionally unsatisfiable for demonstration purposes\n some u: User | no p: Product | validTransaction[some t: Transaction | t.buyer = u]\n}\n\nrun satisfiableExample for 2 {\n // This command is designed to be satisfiable\n some t: Transaction | validTransaction[t] and positiveFeedback[some f: Feedback | f.user = t.buyer]\n}\n\n\nrun {}", "permalink": "spoils-freely-credit-impart", "time": "2023-12-05 22:54:06.180807", "cmd": 2} {"id": 8222, "parent": 8221, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// Signatures\nsig User {\n username: String,\n email: String\n}\n\nsig Product {\n productId: Int,\n name: String,\n price: Int,\n seller: User\n}\n\nsig Transaction {\n transactionId: Int,\n buyer: User,\n seller: User,\n product: Product\n}\n\nsig Feedback {\n feedbackId: Int,\n rating: Int,\n comment: String,\n user: User\n}\n\n// Fields\nfact uniqueUsernames {\n all u1, u2: User | u1 != u2 implies u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all t1, t2: Transaction | t1 != t2 implies t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all f1, f2: Feedback | f1 != f2 implies f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is intentionally unsatisfiable for demonstration purposes\n some u: User | no p: Product | validTransaction[some t: Transaction | t.buyer = u]\n}\n\nrun satisfiableExample for 2 {\n // This command is designed to be satisfiable\n some t: Transaction | validTransaction[t] and positiveFeedback[some f: Feedback | f.user = t.buyer]\n}\n\n\nrun {}", "permalink": "rack-stable-cussed-either", "time": "2023-12-05 22:54:19.604482", "cmd": 3} {"id": 8228, "parent": 8227, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// Signatures\nsig User {\n username: String,\n email: String\n}\n\nabstract sig Product {\n productId: Int,\n name: String,\n price: Int,\n seller: User\n}\n\nsig ElectronicProduct extends Product {\n brand: String,\n warrantyPeriod: Int\n}\n\nsig ClothingProduct extends Product {\n size: String,\n brand: String\n}\n\nsig Transaction {\n transactionId: Int,\n buyer: User,\n seller: User,\n product: Product\n}\n\nsig Feedback {\n feedbackId: Int,\n rating: Int,\n comment: String,\n user: User\n}\n\n// Fields\nfact uniqueUsernames {\n all u1, u2: User | u1 != u2 implies u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all t1, t2: Transaction | t1 != t2 implies t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all f1, f2: Feedback | f1 != f2 implies f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is intentionally unsatisfiable for demonstration purposes\n some u: User | no p: Product | validTransaction[some t: Transaction | t.buyer = u]\n}\n\nrun satisfiableExample {\n // This command is designed to be satisfiable\n some t: Transaction | validTransaction[t] and positiveFeedback[some f: Feedback | f.user = t.buyer]\n}\n\nrun {}", "permalink": "filler-roman-jiffy-sly", "time": "2023-12-05 23:03:55.267955", "cmd": 1} {"id": 8233, "parent": null, "code": "abstract sig Source {}\n\nsig User extends Source {\n\n profile : set Work,\n\n visible : set Work\n\n}\n\nsig Institution extends Source {}\n\n\n\nsig Id {}\n\nsig Work {\n\n ids : some Id,\n\n source : one Source\n\n}\n\n\n\npred inv1_faulty {\n\n all w : Work | some (User<:visible).w implies some w.(User<:profile) --incorrect 1\n}\n\n\n\nrun inv1_faulty", "permalink": "icing-bagel-talcum-player", "time": "2023-12-06 09:19:47.761424", "cmd": 1} {"id": 8300, "parent": 8299, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n// Social Network Model\n\n// Signatures\nabstract sig User {\n userID: Int,\n username: String\n}\n\nsig Post {\n postID: Int,\n content: String,\n author: User\n}\n\nsig Comment {\n commentID: Int,\n text: String,\n author: User,\n commentedPost: Post\n}\n\nsig Like {\n likeID: Int,\n user: User,\n likedPost: Post\n}\n\n// Inheritance\nsig Admin extends User {}\n\n// Facts\nfact uniqueUserIDs {\n all u, v: User | u != v => u.userID != v.userID\n}\n\nfact eachPostHasAuthor {\n all p: Post | one u: User | p.author = u\n}\n\n// Predicates\npred userLikesOwnPost {\n all u: User, p: Post | no l: Like | l.user = u and l.likedPost = p and p.author = u\n}\n\npred commentAndLikeOnSamePost {\n all c: Comment, l: Like | c.commentedPost = l.likedPost\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is designed to be unsatisfiable\n no u: User, p: Post | u in p.author\n}\n\n/*run satisfiableExample for 4 but 3 Comment, 3 Like {\n // This command is designed to be satisfiable\n some u: User, p: Post, c: Comment, l: Like |\n c.author = u and c.commentedPost = p and l.user = u and l.likedPost = p\n}\n*/", "permalink": "eleven-hazing-clause-cobweb", "time": "2023-12-07 12:50:36.664746", "cmd": 1} {"id": 8303, "parent": null, "code": "// Library Model\n\n// Signatures\nabstract sig Person {\n pid: Int,\n name: String\n}\n\nsig Author extends Person {\n booksAuthored: set Book\n}\n\nsig Patron extends Person {\n borrowedBooks: set Book\n}\n\nsig LibraryStaff extends Person {\n staffID: Int\n}\n\nsig Book {\n bookID: Int,\n title: String,\n author: Author,\n available: Bool\n}\n\n// Inheritance\nsig Librarian extends LibraryStaff {}\n\n// Facts\nfact uniqueIDs {\n all p: Person | no q: Person | p != q and p.pid = q.pid\n}\n\nfact eachBookHasAuthor {\n all b: Book | one a: Author | b.author = a\n}\n\n// Predicates\npred patronHasBorrowedBook {\n all p: Patron, b: Book | b in p.borrowedBooks\n}\n\npred librarianCanCheckOut {\n all l: Librarian, p: Patron, b: Book | l.staffID = b.bookID and p.pid = l.pid\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is designed to be unsatisfiable\n no p: Patron, b: Book | p in b.borrowedBooks and b.available\n}\n\nrun satisfiableExample for 2 but 3 Book, 2 Author, 2 Patron, 1 Librarian {\n // This command is designed to be satisfiable\n some p: Patron, b: Book, a: Author, l: Librarian |\n p.borrowedBooks = b and b.author = a and l.staffID = b.bookID\n}", "permalink": "rectal-sandy-buddy-blurt", "time": "2023-12-07 13:01:44.514950", "cmd": 1} {"id": 8307, "parent": 8306, "code": "// Library Model\n\n// Signatures\nabstract sig Person {\n pid: Int,\n name: String\n}\n\nsig Author extends Person {\n booksAuthored: set Book\n}\n\nsig Patron extends Person {\n borrowedBooks: set Book\n}\n\nsig LibraryStaff extends Person {\n staffID: Int\n}\n\nsig Book {\n bookID: Int,\n title: String,\n author: Author,\n available: Bool\n}\n\n// Inheritance\nsig Librarian extends LibraryStaff {}\n\n// Facts\nfact uniqueIDs {\n all p: Person | no q: Person | p != q and p.pid = q.pid\n}\n\nfact eachBookHasAuthor {\n all b: Book | one a: Author | b.author = a\n}\n\n// Predicates\npred patronHasBorrowedBook {\n all p: Patron, b: Book | b in p.borrowedBooks\n}\n\npred librarianCanCheckOut {\n all l: Librarian, p: Patron, b: Book | l.staffID = b.bookID and p.pid = l.pid\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is designed to be unsatisfiable\n no p: Patron, b: Book | (p in b.borrowedBooks) and (not b.available)\n}\n\n/*run satisfiableExample for 2 but 3 Book, 2 Author, 2 Patron, 1 Librarian {\n // This command is designed to be satisfiable\n some p: Patron, b: Book, a: Author, l: Librarian |\n p.borrowedBooks = b and b.author = a and l.staffID = b.bookID\n}*/", "permalink": "output-rocket-dude-trough", "time": "2023-12-07 13:05:00.108216", "cmd": 1} {"id": 8313, "parent": 8312, "code": "// Library Model\n\n// Signatures\nabstract sig Person {\n pid: Int,\n name: String\n}\n\nsig Author extends Person {\n booksAuthored: set Book\n}\n\nsig Patron extends Person {\n borrowedBooks: set Book\n}\n\nsig LibraryStaff extends Person {\n staffID: Int\n}\n\nsig Book {\n bookID: Int,\n title: String,\n author: Author,\n available: bool\n}\n\n// Inheritance\nsig Librarian extends LibraryStaff {}\n\n// Facts\nfact uniqueIDs {\n all p: Person | no q: Person | p != q and p.pid = q.pid\n}\n\nfact eachBookHasAuthor {\n all b: Book | one a: Author | b.author = a\n}\n\n// Predicates\npred patronHasBorrowedBook {\n all p: Patron, b: Book | b in p.borrowedBooks\n}\n\npred librarianCanCheckOut {\n all l: Librarian, p: Patron, b: Book | l.staffID = b.bookID and p.pid = l.pid\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is designed to be unsatisfiable\n no p: Patron, b: Book | (p in b.borrowedBooks) and (not b.available)\n}\n\n/*run satisfiableExample for 2 but 3 Book, 2 Author, 2 Patron, 1 Librarian {\n // This command is designed to be satisfiable\n some p: Patron, b: Book, a: Author, l: Librarian |\n p.borrowedBooks = b and b.author = a and l.staffID = b.bookID\n}*/", "permalink": "nibble-living-sizzle-length", "time": "2023-12-07 13:08:22.564744", "cmd": 1} {"id": 8315, "parent": 8314, "code": "// Library Model\n\n// Signatures\nabstract sig Person {\n pid: Int,\n name: String\n}\n\nsig Author extends Person {\n booksAuthored: set Book\n}\n\nsig Patron extends Person {\n borrowedBooks: set Book\n}\n\nsig LibraryStaff extends Person {\n staffID: Int\n}\n\nsig Book {\n bookID: Int,\n title: String,\n author: Author,\n available: Int // Use integer to represent boolean (0 for false, 1 for true)\n}\n\n// Inheritance\nsig Librarian extends LibraryStaff {}\n\n// Facts\nfact uniqueIDs {\n all p: Person | no q: Person | p != q and p.pid = q.pid\n}\n\nfact eachBookHasAuthor {\n all b: Book | one a: Author | b.author = a\n}\n\n// Predicates\npred patronHasBorrowedBook {\n all p: Patron, b: Book | b in p.borrowedBooks\n}\n\npred librarianCanCheckOut {\n all l: Librarian, p: Patron, b: Book | l.staffID = b.bookID and p.pid = l.pid\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is designed to be unsatisfiable\n no p: Patron, b: Book | (p in b.borrowedBooks) and (b.available = 0)\n}\n\n/*run satisfiableExample for 2 but 3 Book, 2 Author, 2 Patron, 1 Librarian {\n // This command is designed to be satisfiable\n some p: Patron, b: Book, a: Author, l: Librarian |\n p.borrowedBooks = b and b.author = a and l.staffID = b.bookID\n}*/", "permalink": "monday-pout-corny-tubby", "time": "2023-12-07 13:09:46.623833", "cmd": 1} {"id": 8319, "parent": 8318, "code": "// Library Model\n\n// Signatures\nabstract sig Person {\n pid: Int,\n name: String\n}\n\nsig Author extends Person {\n booksAuthored: set Book\n}\n\nsig Patron extends Person {\n borrowedBooks: set Book\n}\n\nsig LibraryStaff extends Person {\n staffID: Int\n}\n\nsig Book {\n bookID: Int,\n title: String,\n author: Author,\n available: Int // Use integer to represent boolean (0 for false, 1 for true)\n}\n\n// Inheritance\nsig Librarian extends LibraryStaff {}\n\n// Facts\nfact uniqueIDs {\n all p: Person | no q: Person | p != q and p.pid = q.pid\n}\n\nfact eachBookHasAuthor {\n all b: Book | one a: Author | b.author = a\n}\n\n// Predicates\npred patronHasBorrowedBook {\n all p: Patron, b: Book | b in p.borrowedBooks\n}\n\npred librarianCanCheckOut {\n all l: Librarian, p: Patron, b: Book | l.staffID = b.bookID and p.pid = l.pid\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is designed to be unsatisfiable\n no p: Patron, b: Book | (b in p.borrowedBooks) and b.available = 1\n}\n\nrun satisfiableExample for 2 but 3 Book, 2 Author, 2 Patron, 1 Librarian {\n // This command is designed to be satisfiable\n some p: Patron, b: Book, a: Author, l: Librarian |\n p.borrowedBooks = b and b.author = a and l.staffID = b.bookID\n}", "permalink": "emit-wager-scone-catsup", "time": "2023-12-07 13:12:42.368511", "cmd": 1} {"id": 8321, "parent": 8320, "code": "// Library Model\n\n// Signatures\nabstract sig Person {\n pid: Int,\n name: String\n}\n\nsig Author extends Person {\n booksAuthored: set Book\n}\n\nsig Patron extends Person {\n borrowedBooks: set Book\n}\n\nsig LibraryStaff extends Person {\n staffID: Int\n}\n\nsig Book {\n bookID: Int,\n title: String,\n author: Author,\n available: Int // Use integer to represent boolean (0 for false, 1 for true)\n}\n\n// Inheritance\nsig Librarian extends LibraryStaff {}\n\n// Facts\nfact uniqueIDs {\n all p: Person | no q: Person | p != q and p.pid = q.pid\n}\n\nfact eachBookHasAuthor {\n all b: Book | one a: Author | b.author = a\n}\n\n// Predicates\npred patronHasBorrowedBook {\n all p: Patron, b: Book | b in p.borrowedBooks\n}\n\npred librarianCanCheckOut {\n all l: Librarian, p: Patron, b: Book | l.staffID = b.bookID and p.pid = l.pid\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is designed to be unsatisfiable\n no p: Patron, b: Book | b in p.borrowedBooks and b.available = 1\n}\n\nrun satisfiableExample for 2 but 3 Book, 2 Author, 2 Patron, 1 Librarian {\n // This command is designed to be satisfiable\n some p: Patron, b: Book, a: Author, l: Librarian |\n p.borrowedBooks = b and b.author = a and l.staffID = b.bookID\n}", "permalink": "lazily-yonder-cope-brute", "time": "2023-12-07 13:14:38.207982", "cmd": 2} {"id": 8329, "parent": 8328, "code": "// Library Model\n\n// Signatures\nabstract sig Person {\n pid: Int,\n name: String\n}\n\nsig Author extends Person {\n booksAuthored: set Book\n}\n\nsig Patron extends Person {\n borrowedBooks: set Book\n}\n\nsig LibraryStaff extends Person {\n staffID: Int\n}\n\nsig Book {\n bookID: Int,\n title: String,\n author: Author,\n available: lone Patron // Book is available if no patron has borrowed it\n}\n\n// Inheritance\nsig Librarian extends LibraryStaff {}\n\n// Facts\nfact uniqueIDs {\n all p: Person | no q: Person | p != q and p.pid = q.pid\n}\n\nfact eachBookHasAuthor {\n all b: Book | one a: Author | b.author = a\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is designed to be unsatisfiable\n no p: Patron, b: Book | b in p.borrowedBooks and b.available != none\n}\n\nrun satisfiableExample for 2 but 3 Book, 2 Author, 2 Patron, 1 Librarian {\n // This command is designed to be satisfiable\n some p: Patron, b: Book, a: Author, l: Librarian |\n p.borrowedBooks = b and b.author = a and l.staffID = b.bookID\n}", "permalink": "veto-shut-tremor-smooth", "time": "2023-12-07 13:17:46.756007", "cmd": 1} {"id": 8347, "parent": 8346, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\nfact KillingRelation {\n // There exists a person x who killed Agatha\n some x: Person | Agatha in x.killed\n}\n\npred puzzle {\n KillingRelation\n all x : Person, y:Person | KillingRelation(x)\n}\n\nrun puzzle", "permalink": "video-catsup-factor-gilled", "time": "2023-12-07 15:10:09.553126", "cmd": 1} {"id": 8355, "parent": 8354, "code": "// Social Networking Alloy Model\n\n// Signatures\nabstract sig User {\n userId: Int,\n username: String\n}\n\nsig RegularUser extends User {\n email: String\n}\n\nsig AdminUser extends User {\n adminLevel: Int\n}\n\nsig Post {\n postId: Int,\n content: String,\n timestamp: Int\n}\n\nsig Like {\n likeId: Int,\n user: User,\n post: Post\n}\n\n// Fields\nfact uniqueUserId {\n all disj u1, u2: User | u1.userId != u2.userId\n}\n\nfact uniquePostId {\n all disj p1, p2: Post | p1.postId != p2.postId\n}\n\n// Inheritance\nfact adminInheritance {\n all u: AdminUser | u in User\n}\n\n// Facts\nfact likeConsistency {\n all l: Like | l.user in User and l.post in Post\n}\n\nfact postsByRegularUsers {\n all p: Post, u: RegularUser | p in u.post\n}\n\n// Predicates\npred userLikesPost[u: User, p: Post] {\n some l: Like | l.user = u and l.post = p\n}\n\npred popularPost[p: Post] {\n some u: User | userLikesPost[u, p] and some v: User | userLikesPost[v, p] and u != v\n}\n\n// Run commands\nrun unsatisfiableExample {\n // This run command should be unsatisfiable\n // Add constraints that make the model unsatisfiable\n no u: User | u in RegularUser and u in AdminUser\n}\n\nrun satisfiableExample for 3 {\n // This run command should be satisfiable\n // Adjust the bound as needed\n some p: Post, u: RegularUser | userLikesPost[u, p] and popularPost[p]\n}\n", "permalink": "bacon-modify-snazzy-brute", "time": "2023-12-07 16:49:04.974576", "cmd": 2} {"id": 8368, "parent": 8360, "code": "// Music Festival Alloy Model\n\n// Signatures\nabstract sig Person { pid: Int, name: String }\n\nsig Artist extends Person { genre: String }\n\nsig Attendee extends Person { ticketId: Int }\n\nsig Stage { stageId: Int, name: String, capacity: Int }\n\nsig Organizer extends Person { role: String }\n\n// Fields\nfact uniquePersonId {\n all disj p1, p2: Person | p1.pid != p2.pid\n}\n\nfact uniqueStageId {\n all disj st1, st2: Stage | st1.stageId != st2.stageId\n}\n\n// Inheritance\nfact artistInheritance { all a: Artist | a in Person }\n\n// Facts\nfact artistsPerformOnDifferentStages {\n all disj a1, a2: Artist, s1, s2: Stage |\n (a1 != a2 and s1 != s2) implies a1.performanceStage != s2\n}\n\nfact organizersHaveUniqueRoles {\n all disj o1, o2: Organizer | o1 != o2 implies o1.role != o2.role\n}\n\n// Predicates\npred attendeeBuysTicket[a: Attendee] {\n some f: Stage | a in f.attendees\n}\n\npred artistPerformsOnStage[a: Artist, s: Stage] {\n a.performanceStage = s\n}\n\n// Run commands\nrun unsatisfiableExample {\n // This run command should be unsatisfiable\n // Add constraints that make the model unsatisfiable\n no s: Stage, a: Artist | s.capacity < #a.artistPerformance\n}\n\nrun satisfiableExample for 2 {\n // This run command should be satisfiable\n // Adjust the bound as needed\n some a: Artist, s: Stage | artistPerformsOnStage[a, s] and attendeeBuysTicket[s.attendees]\n}", "permalink": "couch-pants-purity-diaper", "time": "2023-12-07 17:24:44.614687", "cmd": 2} {"id": 8373, "parent": 8372, "code": "// Music Festival Alloy Model\n\n// Signatures\nabstract sig Person { pid: Int, name: String }\n\nsig Artist extends Person { genre: String }\n\nsig Attendee extends Person { ticketId: Int }\n\nsig Stage { stageId: Int, name: String, capacity: Int }\n\nsig Organizer extends Person { role: String }\n\n// Fields\nfact uniquePersonId {\n all disj p1, p2: Person | p1.pid != p2.pid\n}\n\nfact uniqueStageId {\n all disj st1, st2: Stage | st1.stageId != st2.stageId\n}\n\n// Inheritance\nfact artistInheritance { all a: Artist | a in Person }\n\n// Facts\nfact artistsPerformOnDifferentStages {\n all disj a1, a2: Artist, s1, s2: Stage |\n (a1 != a2 and s1 != s2) implies a1.performanceStage != s2\n}\n\nfact organizersHaveUniqueRoles {\n all disj o1, o2: Organizer | o1 != o2 implies o1.role != o2.role\n}\n\n// Predicates\npred attendeeBuysTicket[a: Attendee] {\n some f: Stage | a in f.Attendee\n}\n\npred artistPerformsOnStage[a: Artist, s: Stage] {\n a.performanceStage = s\n}\n\n// Run commands\nrun unsatisfiableExample {\n // This run command should be unsatisfiable\n // Add constraints that make the model unsatisfiable\n no s: Stage, a: Artist | s.capacity < #a.artistPerformance\n}\n\nrun satisfiableExample {\n // This run command should be satisfiable\n // Adjust the bound as needed\n some a: Artist, s: Stage | artistPerformsOnStage[a, s] and attendeeBuysTicket[s.attendees]\n}", "permalink": "cacti-portly-jolly-tipper", "time": "2023-12-07 17:30:42.271385", "cmd": 2} {"id": 8387, "parent": 8386, "code": "// Define a simple model\nsig Person {\n name: String,\n age: Int\n}\n\nfact LegalDrivingAge {\n all p: Person | p.age >= 20\n}\n\n// Run command to check if all persons are under 16 years old\nrun underagePersonsExample {\n all p: Person | p.age = 0\n}", "permalink": "gala-wobbly-taco-agreed", "time": "2023-12-07 17:59:41.594127", "cmd": 1} {"id": 8412, "parent": 8411, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: set File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n all f: Trash | no f.link\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no p.link\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n all f: File, l: f.link | l not in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f: File, l: f.link | some l.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | (l in Trash) implies (f in Trash)\n}\n\nrun inv10", "permalink": "bagful-degree-barn-morse", "time": "2023-12-07 19:47:54.652680", "cmd": 1} {"id": 8413, "parent": 7069, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // Constraint 1\n some x: Person | x in Agatha.killed\n \n // Constraint 2\n all x, y: Person | x.killed = y implies (x.hates = y and not x.richer = y)\n \n // Constraint 3\n all x: Person - Agatha | not x.hates & Agatha implies not x.hates & Charles\n \n // Constraint 4\n Agatha.hates = Agatha + Charles\n \n // Constraint 5\n all x: Person | not x.richer & Agatha implies x.hates & Butler\n \n // Constraint 6\n all x: Person | x.hates & Agatha implies x.hates & Butler\n \n // Constraint 7\n all x: Person | some y: Person | x.hates = y\n \n // Additional Constraints\n no Agatha.hates // Constraint 8\n Agatha != Butler // Constraint 9\n no x: Person | x.hates = x // Constraint 10\n}\n\nrun puzzle for 3", "permalink": "duct-jaunt-mating-ivory", "time": "2023-12-07 20:04:28.640345", "cmd": 1} {"id": 8418, "parent": 8417, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // Constraint 1\n some x: Person | x in Agatha.killed\n \n // Constraint 2\n all x, y: Person | x.killed = y implies (x.hates = y and not x.richer = y)\n \n // Constraint 3\n all x: Person - Agatha | (not x.hates) and Agatha implies (not x.hates) and Charles\n \n // Constraint 4\n Agatha.hates = Agatha + Charles\n \n // Constraint 5\n all x: Person | not x.richer & Agatha implies x.hates & Butler\n \n // Constraint 6\n all x: Person | x.hates & Agatha implies x.hates & Butler\n \n // Constraint 7\n all x: Person | some y: Person | x.hates = y\n \n // Additional Constraints\n no Agatha.hates // Constraint 8\n Agatha != Butler // Constraint 9\n no x: Person | x.hates = x // Constraint 10\n}\n\nrun puzzle for 3", "permalink": "croak-unbend-pulse-anime", "time": "2023-12-07 20:07:00.073323", "cmd": 1} {"id": 8424, "parent": 8423, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // Constraint 1\n some x: Person | x in Agatha.killed\n \n // Constraint 2\n all x, y: Person | x.killed = y implies (x.hates = y and not x.richer = y)\n \n // Constraint 3\n all x: Person - Agatha | not x.hates & Agatha implies not x.hates & Charles\n \n // Constraint 4\n Agatha.hates = Agatha + Charles\n \n // Constraint 5\n all x: Person | not x.richer & Agatha implies x.hates & Butler\n \n // Constraint 6\n all x: Person | x.hates & Agatha implies x.hates & Butler\n \n // Constraint 7\n all x: Person | some y: Person | x.hates = y\n \n // Additional Constraints\n no Agatha.hates // Constraint 8\n Agatha != Butler // Constraint 9\n no x: Person | x.hates = x // Constraint 10\n}\n\nrun puzzle for 3", "permalink": "truck-jaws-salute-easter", "time": "2023-12-07 20:10:58.805342", "cmd": 1} {"id": 8129, "parent": 8128, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\n\nsig Salesperson, Manager extends Person {}\n\nsig Car {\n model: one String,\n price: one Int\n}\n\nsig Sale {\n car: one Car,\n soldBy: one Salesperson,\n approvedBy: one Manager\n}\n\nfact UniqueSales {\n all disj s1, s2: Sale | s1.car != s2.car\n}\n\nfact ManagerSalespersonSeparation {\n all s: Sale | s.soldBy != s.approvedBy\n}\n\npred hasMadeSale[s: Salesperson] {\n some Sale | s = soldBy\n}\n\npred hasApprovedSale[m: Manager] {\n some Sale | m = approvedBy\n}\n\nassert NoSelfSales {\n all s: Salesperson | no c: Car | (some sa: Sale | sa.car = c and sa.soldBy = s and sa.approvedBy = s)\n}\n\ncheck NoSelfSales for 4\n\n// ÷\\run {}", "permalink": "wolf-denote-cola-lucid", "time": "2023-12-05 16:56:44.291046", "cmd": 1} {"id": 8130, "parent": 8129, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nFor this Alloy model, let's create a scenario involving a hospital system that includes doctors, nurses, patients, and appointments. We will use inheritance, define necessary fields, facts, predicates, and include two run commands as per your requirements.\n\n1. **Signatures and Fields**:\n - `abstract sig Person { name: one String, age: one Int }`\n - `sig Doctor extends Person { specialty: one String, patients: set Patient }`\n - `sig Nurse extends Person { department: one String, assignedDoctors: set Doctor }`\n - `sig Patient extends Person { disease: one String, attendingDoctor: one Doctor }`\n - `sig Appointment { patient: one Patient, doctor: one Doctor, timeSlot: one TimeSlot }`\n - `sig TimeSlot { startTime: one Int, endTime: one Int }`\n\n2. **Facts**:\n - `fact NoSelfTreatment { all d: Doctor | no p: Patient | p in d.patients and p.attendingDoctor = d }`\n - `fact ConsistentDoctorAssignment { all p: Patient, d: Doctor | p.attendingDoctor = d iff p in d.patients }`\n\n3. **Predicates**:\n - `pred isAvailable[d: Doctor, t: TimeSlot] { no a: Appointment | a.doctor = d and a.timeSlot = t }`\n - `pred needsSpecialist[p: Patient, s: String] { p.disease = s }`\n\n4. **Run Commands**:\n - `run { some p: Patient, d: Doctor | p.attendingDoctor = d and p in d.patients } for 3 but 2 Doctor, 2 Patient, 3 TimeSlot, 2 Nurse`\n - `run { all d: Doctor | no p: Patient | p in d.patients and p.attendingDoctor = d } for 3 but 2 Doctor, 2 Patient, 3 TimeSlot, 2 Nurse`\n\nHere's how the Alloy model would look:\n\n```alloy\nabstract sig Person {\n name: one String,\n age: one Int\n}\n\nsig Doctor extends Person {\n specialty: one String,\n patients: set Patient\n}\n\nsig Nurse extends Person {\n department: one String,\n assignedDoctors: set Doctor\n}\n\nsig Patient extends Person {\n disease: one String,\n attendingDoctor: one Doctor\n}\n\nsig Appointment {\n patient: one Patient,\n doctor: one Doctor,\n timeSlot: one TimeSlot\n}\n\nsig TimeSlot {\n startTime: one Int,\n endTime: one Int\n}\n\nfact NoSelfTreatment {\n all d: Doctor | no p: d.patients | p.attendingDoctor = d\n}\n\nfact ConsistentDoctorAssignment {\n all p: Patient, d: Doctor | p.attendingDoctor = d iff p in d.patients\n}\n\npred isAvailable[d: Doctor, t: TimeSlot] {\n no a: Appointment | a.doctor = d and a.timeSlot = t\n}\n\npred needsSpecialist[p: Patient, s: String] {\n p.disease = s\n}\n\nrun { some p: Patient, d: Doctor | p.attendingDoctor = d and p in d.patients } for 3 but 2 Doctor, 2 Patient, 3 TimeSlot, 2 Nurse\nrun { all d: Doctor | no p: Patient | p in d}", "permalink": "sponge-sequel-cage-remedy", "time": "2023-12-05 16:59:00.267300", "cmd": 2} {"id": 8131, "parent": 8130, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {\n name: one String,\n age: one Int\n}\n\nsig Doctor extends Person {\n specialty: one String,\n patients: set Patient\n}\n\nsig Nurse extends Person {\n department: one String,\n assignedDoctors: set Doctor\n}\n\nsig Patient extends Person {\n disease: one String,\n attendingDoctor: one Doctor\n}\n\nsig Appointment {\n patient: one Patient,\n doctor: one Doctor,\n timeSlot: one TimeSlot\n}\n\nsig TimeSlot {\n startTime: one Int,\n endTime: one Int\n}\n\nfact NoSelfTreatment {\n all d: Doctor | no p: d.patients | p.attendingDoctor = d\n}\n\nfact ConsistentDoctorAssignment {\n all p: Patient, d: Doctor | p.attendingDoctor = d iff p in d.patients\n}\n\npred isAvailable[d: Doctor, t: TimeSlot] {\n no a: Appointment | a.doctor = d and a.timeSlot = t\n}\n\npred needsSpecialist[p: Patient, s: String] {\n p.disease = s\n}\n\nrun { some p: Patient, d: Doctor | p.attendingDoctor = d and p in d.patients } for 3 but 2 Doctor, 2 Patient, 3 TimeSlot, 2 Nurse\nrun { all d: Doctor | no p: Patient | p in d}", "permalink": "change-dice-chump-chirpy", "time": "2023-12-05 17:00:12.402373", "cmd": 2} {"id": 8139, "parent": 8138, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n //Someone killed Agatha\n some x: Person | x.killed = Agatha\n \n //If a person killed another, the killer hates the victim and is not richer than the victim\n all x, y: Person | x.killed = y implies (x in y.hates and not x in y.richer)\n \n //Everyone who hates Agatha is not hated by Charles\n all x: Person | x in Agatha.hates implies not x in Charles.hates\n \n //Agatha hates herself and Agatha hates Charles\n Agatha in Agatha.hates and Agatha in Charles.hates\n \n //Everyone except Butler is richer than Agatha\n all x: Person - Butler | x in Agatha.richer\n \n //Agatha hates everyone whom Butler hates\n all x: Person | x in Butler.hates implies x in Agatha.hates\n \n //Everyone hates someone\n all x: Person | some x.hates\n}\n\nrun puzzle", "permalink": "croak-huff-portal-mutate", "time": "2023-12-05 17:35:18.994787", "cmd": 1} {"id": 8142, "parent": 8141, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // (1) ∃x • killed(x, Agatha)\n some x: Person | x.killed = Agatha\n\n // (2) ∀x • ∀y • killed(x, y) ⇒ (hates(x, y) ∧ ¬richer(x, y))\n all x, y: Person | x.killed = y implies (x in y.hates and not x in y.richer)\n\n // (3) ∀x • hates(Agatha, x) ⇒ ¬hates(Charles, x)\n all x: Person | x in Agatha.hates implies not x in Charles.hates\n\n // (4) hates(Agatha, Agatha) ∧ hates(Agatha, Charles)\n Agatha in Agatha.hates and Agatha in Charles.hates\n\n // (5) ∀x • ¬richer(x, Agatha) ⇒ hates(Butler, x)\n // This constraint is rephrased because it's originally incorrect in the provided model.\n // It should state that everyone who is not richer than Agatha is hated by the Butler,\n // which implies that Butler hates Agatha since she is not richer than herself.\n Agatha in Butler.hates\n\n // (6) ∀x • hates(Agatha, x) ⇒ hates(Butler, x)\n all x: Person | x in Agatha.hates implies x in Butler.hates\n\n // (7) ∀x • ∃y • ¬hates(x, y)\n // This constraint is incorrect as stated because it implies everyone is not hated by someone,\n // which is not the same as everyone hates someone. The correct constraint should ensure\n // that everyone hates at least one person.\n all x: Person | some y: Person | x in y.hates\n\n}\n\nrun puzzle for exactly 1 Agatha, 1 Butler, 1 Charles", "permalink": "bundle-emu-rhyme-nag", "time": "2023-12-05 17:48:22.095445", "cmd": 1} {"id": 8145, "parent": 8144, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // (1) There exists someone who killed Agatha\n some x: Person | x.killed = Agatha\n\n // (2) Anyone who killed anyone hates them and is not richer than them\n all x, y: Person | x.killed = y implies (x in y.hates and not x in y.richer)\n\n // (3) Everyone who hates Agatha doesn't hate Charles\n all x: Person | x in Agatha.hates implies not x in Charles.hates\n\n // (4) Agatha hates herself and Charles\n Agatha in Agatha.hates\n Agatha in Charles.hates\n\n // (5) Agatha is not richer than anyone except Butler\n no x: Person - Butler | x in Agatha.richer\n\n // (6) Agatha hates everyone Butler hates\n all x: Person | x in Butler.hates implies x in Agatha.hates\n\n // (7) Everyone hates someone\n all x: Person | some y: Person | x in y.hates\n}\n\nrun for exactly 1 Agatha, 1 Butler, 1 Charles", "permalink": "plasma-wise-giggly-gap", "time": "2023-12-05 17:54:46.382106", "cmd": 1} {"id": 8152, "parent": 6737, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {all a : Assignment | one a.associated_with}\n\n// Predicate PolicyAllowsGrading defines the policy for allowing grading of an Assignment by a Person.\npred PolicyAllowsGrading(p: Person, a: Assignment) {\n p in a.associated_with.assistant or p in a.associated_with.instructor\n}\n\n// Assert NoOneCanGradeTheirOwnAssignment checks that no Person can grade their own Assignment.\nassert NoOneCanGradeTheirOwnAssignment {\n all p : Person, a : Assignment |\n PolicyAllowsGrading[p, a] implies not p in a.assigned_to\n}\n\ncheck NoOneCanGradeTheirOwnAssignment for 2", "permalink": "decay-cross-cobalt-rumble", "time": "2023-12-05 18:44:38.849973", "cmd": 1} {"id": 8154, "parent": 8054, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nabstract sig Person{\n memberOfDepartment: set Department,\n id : Int\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n hasMembership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n supervises: set Student \n}\n\n// Book\nsig Book{\n inLibrary : one Library,\n // available: one Bool\n checkOutBy: set Student\n}\n\n// Department\nsig Department {\n associatedStudents: set Student,\n departmentLibrarian: one Librarian\n}\n\nsig Library{\n contains :some Books,\n incharge: some Librarian\n}\n\n// Membership\nsig Membership{\n belongsTo: set Student,\n validTill : one Date\n}\n\n//Date\nsig Date{\n day: Int,\n month: Int,\n Year: Int\n}\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.hasMembership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\n// fact borrowedBooksAreNotAvailableForBorrowing{\n// all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n// }\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "stride-pupil-diving-avatar", "time": "2023-12-05 19:15:04.064775", "cmd": 1} {"id": 8156, "parent": 8155, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nabstract sig Person{\n memberOfDepartment: set Department,\n id : Int\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n hasMembership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n supervises: set Student \n}\n\n// Book\nsig Book {\n inLibrary : one Library,\n checkOutBy: set Student\n}\n\n// Department\nsig Department {\n associatedStudents: set Student,\n departmentLibrarian: one Librarian\n}\n\nsig Library{\n contains :some Book,\n incharge: some Librarian\n}\n\n// Membership\nsig Membership{\n belongsTo: set Student,\n validTill : one Date\n}\n\n//Date\nsig Date{\n day: Int,\n month: Int,\n Year: Int\n}\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.hasMembership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\n// fact borrowedBooksAreNotAvailableForBorrowing{\n// all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n// }\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "eraser-much-self-crispy", "time": "2023-12-05 19:15:32.453092", "cmd": 2} {"id": 8157, "parent": 8156, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nabstract sig Person{\n memberOfDepartment: set Department,\n id : Int\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n hasMembership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n supervises: set Student \n}\n\n// Book\nsig Book {\n inLibrary : one Library,\n checkOutBy: set Student\n}\n\n// Department\nsig Department {\n associatedStudents: set Student,\n departmentLibrarian: one Librarian\n}\n\nsig Library{\n contains :some Book,\n incharge: some Librarian\n}\n\n// Membership\nsig Membership{\n belongsTo: set Student,\n validTill : one Date\n}\n\n//Date\nsig Date{\n day: Int,\n month: Int,\n Year: Int\n}\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.hasMembership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\n// fact borrowedBooksAreNotAvailableForBorrowing{\n// all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n// }\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists for 1 Library", "permalink": "slurp-waving-cold-badge", "time": "2023-12-05 19:16:11.863553", "cmd": 2} {"id": 8158, "parent": 8157, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nabstract sig Person{\n memberOfDepartment: set Department,\n id : Int\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n hasMembership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n supervises: set Student \n}\n\n// Book\nsig Book {\n inLibrary : one Library,\n checkOutBy: set Student\n}\n\n// Department\nsig Department {\n associatedStudents: set Student,\n departmentLibrarian: one Librarian\n}\n\nsig Library{\n contains :some Book,\n incharge: some Librarian\n}\n\n// Membership\nsig Membership{\n belongsTo: set Student,\n validTill : one Date\n}\n\n//Date\nsig Date{\n day: Int,\n month: Int,\n Year: Int\n}\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.hasMembership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\n// fact borrowedBooksAreNotAvailableForBorrowing{\n// all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n// }\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists for 1 Library", "permalink": "swerve-living-faucet-remark", "time": "2023-12-05 19:16:21.831136", "cmd": 1} {"id": 8159, "parent": 8158, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nabstract sig Person{\n memberOfDepartment: set Department,\n id : Int\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n hasMembership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n supervises: set Student \n}\n\n// Book\nsig Book {\n inLibrary : one Library,\n checkOutBy: set Student\n}\n\n// Department\nsig Department {\n associatedStudents: set Student,\n departmentLibrarian: one Librarian\n}\n\nsig Library{\n contains :some Book,\n incharge: some Librarian\n}\n\n// Membership\nsig Membership{\n belongsTo: set Student,\n validTill : one Date\n}\n\n//Date\nsig Date{\n day: Int,\n month: Int,\n Year: Int\n}\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.hasMembership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\n// fact borrowedBooksAreNotAvailableForBorrowing{\n// all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n// }\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists for 1 Library", "permalink": "unwary-moody-wasp-reps", "time": "2023-12-05 19:16:25.740961", "cmd": 2} {"id": 8162, "parent": 8161, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nabstract sig Person{\n memberOfDepartment: set Department,\n id : Int\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n hasMembership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n supervises: set Student \n}\n\n// Book\nsig Book {\n inLibrary : one Library,\n checkOutBy: set Student\n}\n\n// Department\nsig Department {\n associatedStudents: set Student,\n departmentLibrarian: one Librarian\n}\n\nsig Library{\n contains :some Book,\n incharge: some Librarian\n}\n\n// Membership\nsig Membership{\n belongsTo: set Student,\n validTill : one Date\n}\n\n//Date\nsig Date{\n day: Int,\n month: Int,\n Year: Int\n}\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.hasMembership implies no student.borrowedBooks\n}\n\n// fact: Each book can be checked out by at most one student at a time\nfact bookCheckedOutByAtMostOneStudent {\n all book: Book | #book.checkOutBy <= 1\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "outbid-baffle-rare-shown", "time": "2023-12-05 19:18:40.416960", "cmd": 1} {"id": 8170, "parent": 7623, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // TODO Implement the constraints here\n // Constraint 1\n some x : Person | Agatha in x.killed\n\n // Constraint 2\n all x,y: Person | (y in x.killed implies (y in x.hates and not y in x.richer))\n\n // Constraint 3\n all x: Person | (x in Agatha.hates implies not x in Charles.hates)\n\n // Constraint 4\n (Agatha in Agatha.hates) and (Charles in Agatha.hates)\n\n // Constraint 5\n all x : Person | (not Agatha in x.richer implies x in Butler.hates)\n\n // Constraint 6\n all x:Person | (x in Agatha.hates implies x in Butler.hates)\n\n // Constraint 7\n all x :Person | some y: Person | not y in x.hates\n}\n\nrun puzzle", "permalink": "snazzy-shield-catty-vanish", "time": "2023-12-05 19:21:58.628883", "cmd": 1} {"id": 8193, "parent": 7058, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\nabstract sig Person{}\nsig Professor, Student extends Person{}\n\nsig Class{\n instructor: one Professor,\n assistant: one Student\n}\n\nsig Assignment{\n associated_with: set Class,\n assigned_to: some Student\n}\n\nrun {}", "permalink": "stylus-remedy-cacti-deacon", "time": "2023-12-05 20:14:30.404212", "cmd": 1} {"id": 8194, "parent": 8193, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\nabstract sig Person{}\nsig Professor, Student extends Person{}\n\nsig Class{\n instructor: one Professor,\n assistant: one Student\n}\n\nsig Assignment{\n associated_with: set Class,\n assigned_to: some Student\n}\n\nfact{\n all a: Assignment | one a.associated_with\n}\n\nrun {}", "permalink": "enrage-shadow-pacify-gender", "time": "2023-12-05 20:15:46.233247", "cmd": 1} {"id": 8196, "parent": 8195, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\nabstract sig Person{}\nsig Professor, Student extends Person{}\n\nsig Class{\n instructor: one Professor,\n assistant: one Student\n}\n\nsig Assignment{\n associated_with: set Class,\n assigned_to: some Student\n}\n\nfact{\n all a: Assignment | one a.associated_with\n no Professor\n}\n\nrun {}", "permalink": "tutor-pounce-viewer-shawl", "time": "2023-12-05 20:17:14.567770", "cmd": 1} {"id": 8197, "parent": 8196, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\nabstract sig Person{}\nsig Professor, Student extends Person{}\n\nsig Class{\n instructor: one Professor,\n assistant: one Student\n}\n\nsig Assignment{\n associated_with: set Class,\n assigned_to: some Student\n}\n\nfact{\n all a: Assignment | one a.associated_with\n no Professor\n}\n\nrun {} for 2", "permalink": "follow-affair-rejoin-dreamy", "time": "2023-12-05 20:18:36.178999", "cmd": 1} {"id": 8198, "parent": 8197, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\nabstract sig Person{}\nsig Professor, Student extends Person{}\n\nsig Class{\n instructor: one Professor,\n assistant: one Student\n}\n\nsig Assignment{\n associated_with: set Class,\n assigned_to: some Student\n}\n\nfact{\n all a: Assignment | one a.associated_with\n no Professor\n}\n\nrun {} for 4", "permalink": "erased-old-squeak-props", "time": "2023-12-05 20:18:45.094884", "cmd": 1} {"id": 8213, "parent": 8212, "code": "// Signatures\nabstract sig User {\n userId: Int,\n username: String\n}\n\nsig Admin extends User {\n \n // Additional fields for Admin\n isAdmin: Bool\n}\n\n\n\nrun{}", "permalink": "hamlet-saga-wobbly-ambush", "time": "2023-12-05 21:45:10.483474", "cmd": 1} {"id": 8217, "parent": 8216, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\nabstract sig Person {}\nsig Student, Professor extends Person {}\nsig Class {\ninstructor: one Professor,\nassistant: set Student}\nsig Assignment {\nassociated_with: set Class,\nassigned_to: some Student}\nfact {all a : Assignment | one a.associated_with}\npred PolicyAllowsGrading(p: Person, a: Assignment) {\np in a.associated_with.assistant or p in\na.associated_with.instructor}\nassert NoOneCanGradeTheirOwnAssignment {\nall p : Person, a : Assignment |\nPolicyAllowsGrading[p, a] implies not p in a.assigned_to}\ncheck NoOneCanGradeTheirOwnAssignment for 2\n\nrun {}", "permalink": "blitz-aroma-savor-hungry", "time": "2023-12-05 22:47:53.931586", "cmd": 1} {"id": 8223, "parent": 8222, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// Signatures\nsig User {\n username: String,\n email: String\n}\n\nabstract sig Product {\n productId: Int,\n name: String,\n price: Int,\n seller: User\n}\n\nsig ElectronicProduct extends Product {\n brand: String,\n warrantyPeriod: Int\n}\n\nsig ClothingProduct extends Product {\n size: String,\n brand: String\n}\n\nsig Transaction {\n transactionId: Int,\n buyer: User,\n seller: User,\n product: Product\n}\n\nsig Feedback {\n feedbackId: Int,\n rating: Int,\n comment: String,\n user: User\n}\n\nrun {}", "permalink": "rerun-anemic-yam-armful", "time": "2023-12-05 23:01:26.631552", "cmd": 1} {"id": 8224, "parent": 8223, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// Signatures\nsig User {\n username: String,\n email: String\n}\n\nabstract sig Product {\n productId: Int,\n name: String,\n price: Int,\n seller: User\n}\n\nsig ElectronicProduct extends Product {\n brand: String,\n warrantyPeriod: Int\n}\n\nsig ClothingProduct extends Product {\n size: String,\n brand: String\n}\n\nsig Transaction {\n transactionId: Int,\n buyer: User,\n seller: User,\n product: Product\n}\n\nsig Feedback {\n feedbackId: Int,\n rating: Int,\n comment: String,\n user: User\n}\n\n// Fields\nfact uniqueUsernames {\n all u1, u2: User | u1 != u2 implies u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all t1, t2: Transaction | t1 != t2 implies t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all f1, f2: Feedback | f1 != f2 implies f1.feedbackId != f2.feedbackId\n}\n\nrun {}", "permalink": "motor-sanded-clash-pang", "time": "2023-12-05 23:02:03.288780", "cmd": 1} {"id": 8229, "parent": 8228, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// Signatures\nsig User {\n username: String,\n email: String\n}\n\nabstract sig Product {\n productId: Int,\n name: String,\n price: Int,\n seller: User\n}\n\nsig ElectronicProduct extends Product {\n brand: String,\n warrantyPeriod: Int\n}\n\nsig ClothingProduct extends Product {\n size: String,\n brand: String\n}\n\nsig Transaction {\n transactionId: Int,\n buyer: User,\n seller: User,\n product: Product\n}\n\nsig Feedback {\n feedbackId: Int,\n rating: Int,\n comment: String,\n user: User\n}\n\n// Fields\nfact uniqueUsernames {\n all u1, u2: User | u1 != u2 implies u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all t1, t2: Transaction | t1 != t2 implies t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all f1, f2: Feedback | f1 != f2 implies f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is intentionally unsatisfiable for demonstration purposes\n some u: User | no p: Product | validTransaction[some t: Transaction | t.buyer = u]\n}\n\nrun satisfiableExample {\n // This command is designed to be satisfiable\n some t: Transaction | validTransaction[t] and positiveFeedback[some f: Feedback | f.user = t.buyer]\n}\n\nrun {}", "permalink": "smock-gecko-upload-unsaid", "time": "2023-12-05 23:04:06.997200", "cmd": 2} {"id": 8232, "parent": null, "code": "module graphAF\n\nopen graph\n\none sig AbsFun {\n af: Node -> Node\n}\n\nfact AbsFunDef {\n AbsFun.af = ^edges\n}\n\nrun {} for 4", "permalink": "drum-voting-cleat-moaner", "time": "2023-12-05 23:29:53.858265", "cmd": 1} {"id": 8234, "parent": 7297, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "citrus-shrubs-venue-karma", "time": "2023-12-06 13:55:15.724687", "cmd": 1} {"id": 8237, "parent": null, "code": "\nopen util/ternary\n\n--------\n\nsig Elem {\n\trel: Elem -> one Elem\n}{\n\t-- total\n\trel.Elem = Elem\n}\none sig Id extends Elem {}\n\nfact {\n\t-- identity\n\t//all x: Elem | rel[Id][x] = x and rel[x][Id] = x\n\tId.rel in iden and Id.(flip12[rel]) in iden\n\t-- associativity\n\tall x,y,z: Elem | rel[rel[x][y]][z] = rel[x][rel[y][z]]\n\t-- inverse\n\t//all x: Elem | some inv: Elem | rel[x][inv] = Id and rel[inv][x] = Id\n\t(rel.Id).Elem = Elem and Elem.(rel.Id) = Elem\n}\n\n--------\n\nfun closure(gen: set Elem): set Elem {\n\tId.*(gen.rel)\n}\npred generator(gen: set Elem) {\n\tclosure[gen] = Elem\n}\npred gen1 {\t\t-- aka cyclic\n\tsome c: Elem | generator[c]\n}\npred gen2 {\n\tsome disj c1,c2: Elem | generator[c1+c2]\n}\npred gen3 {\n\tsome disj c1,c2,c3: Elem | generator[c1+c2+c3]\n}\n\n--------\n\nrun Some { some Elem } for exactly 6 Elem\nrun Gen1 { gen1 } for exactly 6 Elem\nrun Gen2 { gen2 and not gen1 } for exactly 6 Elem\nrun Gen3 { gen3 and not gen2 } for exactly 8 Elem\nrun D6 {\n\tsome disj s,r: Elem-Id {\n\t\trel[s][s] = Id\n\t\trel[r][rel[r][r]] = Id\n\t}\n} for exactly 6 Elem\n\n\n\n\n\n\n\n\n\n\n", "permalink": "vision-hurray-judo-mud", "time": "2023-12-06 15:11:27.312924", "cmd": 1} {"id": 8238, "parent": 8236, "code": "// Define a simple model\nsig Person {\n name: String,\n age: Int\n}\n\nfact LegalDrivingAge {\n all p: Person | p.age >= 16\n}\n\n// Run command to check if all persons are under 16 years old\nrun underagePersonsExample {\n all p: Person | p.age < 16\n}", "permalink": "buzz-ankle-chirpy-wobble", "time": "2023-12-06 20:26:29.189270", "cmd": 1} {"id": 8242, "parent": 8241, "code": "// Define a simple model\nsig Person {\n name: String,\n age: Int\n}\n\nfact LegalDrivingAge {\n all p: Person | p.age >= 20\n}\n\n// Run command to check if all persons are under 16 years old\nrun underagePersonsExample {\n all p: Person | p.age < 16 \n}", "permalink": "onyx-trophy-tipoff-gladly", "time": "2023-12-06 20:29:07.025803", "cmd": 1} {"id": 8244, "parent": 8243, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// Signatures\nsig User {\n username: String,\n email: String\n}\n\nabstract sig Product {\n productId: Int,\n name: String,\n price: Int,\n seller: User\n}\n\nsig ElectronicProduct extends Product {\n brand: String,\n warrantyPeriod: Int\n}\n\nsig ClothingProduct extends Product {\n size: String,\n brand: String\n}\n\nsig Transaction {\n transactionId: Int,\n buyer: User,\n seller: User,\n product: Product\n}\n\nsig Feedback {\n feedbackId: Int,\n rating: Int,\n comment: String,\n user: User\n}\n\n// Fields\nfact uniqueUsernames {\n all u1, u2: User | u1 != u2 implies u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all t1, t2: Transaction | t1 != t2 implies t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all f1, f2: Feedback | f1 != f2 implies f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\n// run unsatisfiableExample {\n// // This command is intentionally unsatisfiable for demonstration purposes\n// some u: User | no p: Product | validTransaction[some t: Transaction | t.buyer = u]\n// }\n\n// run satisfiableExample {\n// // This command is designed to be satisfiable\n// some t: Transaction | validTransaction[t] and positiveFeedback[some f: Feedback | f.user = t.buyer]\n// }\n\nrun {}", "permalink": "stitch-onyx-plank-knoll", "time": "2023-12-06 20:43:28.929669", "cmd": 1} {"id": 8247, "parent": 8246, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// Signatures\nsig User {\n username: String,\n email: String\n}\n\nabstract sig Product {\n productId: Int,\n name: String,\n price: Int,\n seller: User\n}\n\nsig ElectronicProduct extends Product {\n brand: String,\n warrantyPeriod: Int\n}\n\nsig ClothingProduct extends Product {\n size: String,\n brand: String\n}\n\nsig Transaction {\n transactionId: Int,\n buyer: User,\n seller: User,\n product: Product\n}\n\nsig Feedback {\n feedbackId: Int,\n rating: Int,\n comment: String,\n user: User\n}\n\n// Fields\nfact uniqueUsernames {\n all u1, u2: User | u1 != u2 implies u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all t1, t2: Transaction | t1 != t2 implies t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all f1, f2: Feedback | f1 != f2 implies f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\n// run unsatisfiableExample {\n// // This command is intentionally unsatisfiable for demonstration purposes\n// some u: User | no p: Product | validTransaction[some t: Transaction | t.buyer = u]\n// }\n\n// run satisfiableExample {\n// // This command is designed to be satisfiable\n// some t: Transaction | validTransaction[t] and positiveFeedback[some f: Feedback | f.user = t.buyer]\n// }\n\nrun {}", "permalink": "neon-worst-badass-fondly", "time": "2023-12-06 20:50:46.114326", "cmd": 1} {"id": 8250, "parent": 8249, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// Signatures\nsig User {\n username: String,\n email: String\n}\n\nabstract sig Product {\n productId: Int,\n name: String,\n price: Int,\n seller: User\n}\n\nsig ElectronicProduct extends Product {\n brand: String,\n warrantyPeriod: Int\n}\n\nsig ClothingProduct extends Product {\n size: String,\n brand: String\n}\n\nsig Transaction {\n transactionId: Int,\n buyer: User,\n seller: User,\n product: Product\n}\n\nsig Feedback {\n feedbackId: Int,\n rating: Int,\n comment: String,\n user: User\n}\n\n// Fields\nfact uniqueUsernames {\n all u1, u2: User | u1 != u2 implies u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all t1, t2: Transaction | t1 != t2 implies t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all f1, f2: Feedback | f1 != f2 implies f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is intentionally unsatisfiable for demonstration purposes\n all p1, p2: Product | p1 = p2 implies p1.productId = p2.productId\n}\n\nrun satisfiableExample {\n // This command is designed to be satisfiable\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\n// run {} for 3", "permalink": "deeply-hungry-gilled-defuse", "time": "2023-12-06 21:02:32.449829", "cmd": 2} {"id": 8282, "parent": 8281, "code": "abstract sig Person {}\none sig Agatha, Butler, Charles extends Person {}\n\nfun killed(x, y: Person): Bool {}\n\nfun hates(x, y: Person): Bool {}\n\nfun richer(x, y: Person): Bool {}\n\npred existsKilled {\n some x: Person | killed[x, Agatha]\n}\n\npred relationships {\n all x, y: Person |\n (killed[x, y] implies hates[x, y] and not richer[x, y]) and\n (hates[Agatha, x] implies not hates[Charles, x]) and\n (hates[Agatha, Agatha] and hates[Agatha, Charles]) and\n (not richer[x, Agatha] implies hates[Butler, x]) and\n (hates[Agatha, x] implies hates[Butler, x]) and\n some y: Person | not hates[x, y]\n}\n\nrun existsKilled\nrun relationships", "permalink": "sadly-avenge-dimmed-truck", "time": "2023-12-07 12:15:47.605540", "cmd": 2} {"id": 8289, "parent": 8284, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // There exists a person x such that x killed Agatha\n some x: Person | x in Agatha.killed\n\n // If someone x killed someone y, then x hates y and x is not richer than y\n all x, y: Person |\n (x in y.killed => x in y.hates and not x' | x' in y.richer)\n\n // Additional constraints specified in the SMT-LIB code\n all x: Person | (Agatha.hates[x] implies not Charles.hates[x])\n Agatha.hates[Agatha] and Agatha.hates[Charles]\n all x: Person | (not x.richer[Agatha] implies Butler.hates[x])\n all x: Person | (Agatha.hates[x] implies Butler.hates[x])\n all x: Person | some y: Person | not x.hates[y]\n}\n\nrun puzzle", "permalink": "drench-judo-justly-landed", "time": "2023-12-07 12:24:21.070267", "cmd": 1} {"id": 8296, "parent": 7058, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n// Social Network Model\n\n// Signatures\nabstract sig User {\n userID: Int,\n username: String\n}\n\nsig Post {\n postID: Int,\n content: String,\n author: User\n}\n\nsig Comment {\n commentID: Int,\n text: String,\n author: User,\n commentedPost: Post\n}\n\nsig Like {\n likeID: Int,\n user: User,\n likedPost: Post\n}\n\n// Inheritance\nsig Admin extends User {}\n\n// Facts\nfact uniqueUserIDs {\n all u, v: User | u != v => u.userID != v.userID\n}\n\nfact eachPostHasAuthor {\n all p: Post | one u: User | p.author = u\n}\n\n// Predicates\npred userLikesOwnPost {\n all u: User, p: Post | no l: Like | l.user = u and l.likedPost = p and p.author = u\n}\n\npred commentAndLikeOnSamePost {\n all c: Comment, l: Like | c.commentedPost = l.likedPost\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is designed to be unsatisfiable\n no u: User, p: Post | u in p.author\n}\n\nrun satisfiableExample for 4 but 3 Comment, 3 Like {\n // This command is designed to be satisfiable\n some u: User, p: Post, c: Comment, l: Like |\n c.author = u and c.commentedPost = p and l.user = u and l.likedPost = p\n}\n\n\nrun {}", "permalink": "blip-avenue-carat-shiny", "time": "2023-12-07 12:48:24.135436", "cmd": 1} {"id": 8297, "parent": 8296, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n// Social Network Model\n\n// Signatures\nabstract sig User {\n userID: Int,\n username: String\n}\n\nsig Post {\n postID: Int,\n content: String,\n author: User\n}\n\nsig Comment {\n commentID: Int,\n text: String,\n author: User,\n commentedPost: Post\n}\n\nsig Like {\n likeID: Int,\n user: User,\n likedPost: Post\n}\n\n// Inheritance\nsig Admin extends User {}\n\n// Facts\nfact uniqueUserIDs {\n all u, v: User | u != v => u.userID != v.userID\n}\n\nfact eachPostHasAuthor {\n all p: Post | one u: User | p.author = u\n}\n\n// Predicates\npred userLikesOwnPost {\n all u: User, p: Post | no l: Like | l.user = u and l.likedPost = p and p.author = u\n}\n\npred commentAndLikeOnSamePost {\n all c: Comment, l: Like | c.commentedPost = l.likedPost\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is designed to be unsatisfiable\n no u: User, p: Post | u in p.author\n}\n\nrun satisfiableExample for 4 but 3 Comment, 3 Like {\n // This command is designed to be satisfiable\n some u: User, p: Post, c: Comment, l: Like |\n c.author = u and c.commentedPost = p and l.user = u and l.likedPost = p\n}", "permalink": "spoof-squall-rental-acts", "time": "2023-12-07 12:49:27.864334", "cmd": 1} {"id": 8302, "parent": 8301, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n// Social Network Model\n\n// Signatures\nabstract sig User { userID: Int, username: String }\n\nsig Post { postID: Int, content: String, author: User }\n\nsig Comment { commentID: Int, text: String,\n author: User, commentedPost: Post }\n\nsig Like { likeID: Int, user: User, likedPost: Post }\n\n// Inheritance\nsig Admin extends User {}\n\n// Facts\nfact uniqueUserIDs {\n all u, v: User | u != v => u.userID != v.userID }\n\nfact eachPostHasAuthor {\n all p: Post | one u: User | p.author = u }\n\n// Predicates\npred userLikesOwnPost {\n all u: User, p: Post | no l: Like | l.user = u and l.likedPost = p and p.author = u }\n\npred commentAndLikeOnSamePost {\n all c: Comment, l: Like | c.commentedPost = l.likedPost }\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is designed to be unsatisfiable\n no u: User, p: Post | u in p.author\n}\n\n/*run satisfiableExample for 4 but 3 Comment, 3 Like {\n // This command is designed to be satisfiable\n some u: User, p: Post, c: Comment, l: Like |\n c.author = u and c.commentedPost = p and l.user = u and l.likedPost = p\n}*/", "permalink": "crimp-swirl-quack-aptly", "time": "2023-12-07 12:57:25.846717", "cmd": 1} {"id": 8304, "parent": 8303, "code": "// Library Model\n\n// Signatures\nabstract sig Person {\n pid: Int,\n name: String\n}\n\nsig Author extends Person {\n booksAuthored: set Book\n}\n\nsig Patron extends Person {\n borrowedBooks: set Book\n}\n\nsig LibraryStaff extends Person {\n staffID: Int\n}\n\nsig Book {\n bookID: Int,\n title: String,\n author: Author,\n available: Bool\n}\n\n// Inheritance\nsig Librarian extends LibraryStaff {}\n\n// Facts\nfact uniqueIDs {\n all p: Person | no q: Person | p != q and p.pid = q.pid\n}\n\nfact eachBookHasAuthor {\n all b: Book | one a: Author | b.author = a\n}\n\n// Predicates\npred patronHasBorrowedBook {\n all p: Patron, b: Book | b in p.borrowedBooks\n}\n\npred librarianCanCheckOut {\n all l: Librarian, p: Patron, b: Book | l.staffID = b.bookID and p.pid = l.pid\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is designed to be unsatisfiable\n no p: Patron, b: Book | p in b.borrowedBooks and not b.available\n}\n\nrun satisfiableExample for 2 but 3 Book, 2 Author, 2 Patron, 1 Librarian {\n // This command is designed to be satisfiable\n some p: Patron, b: Book, a: Author, l: Librarian |\n p.borrowedBooks = b and b.author = a and l.staffID = b.bookID\n}", "permalink": "filing-chosen-pebbly-manor", "time": "2023-12-07 13:03:22.260051", "cmd": 1} {"id": 8308, "parent": 8307, "code": "// Library Model\n\n// Signatures\nabstract sig Person {\n pid: Int,\n name: String\n}\n\nsig Author extends Person {\n booksAuthored: set Book\n}\n\nsig Patron extends Person {\n borrowedBooks: set Book\n}\n\nsig LibraryStaff extends Person {\n staffID: Int\n}\n\nsig Book {\n bookID: Int,\n title: String,\n author: Author,\n available: bool\n}\n\n// Inheritance\nsig Librarian extends LibraryStaff {}\n\n// Facts\nfact uniqueIDs {\n all p: Person | no q: Person | p != q and p.pid = q.pid\n}\n\nfact eachBookHasAuthor {\n all b: Book | one a: Author | b.author = a\n}\n\n// Predicates\npred patronHasBorrowedBook {\n all p: Patron, b: Book | b in p.borrowedBooks\n}\n\npred librarianCanCheckOut {\n all l: Librarian, p: Patron, b: Book | l.staffID = b.bookID and p.pid = l.pid\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is designed to be unsatisfiable\n no p: Patron, b: Book | (p in b.borrowedBooks) and (not b.available)\n}\n\nrun satisfiableExample for 2 but 3 Book, 2 Author, 2 Patron, 1 Librarian {\n // This command is designed to be satisfiable\n some p: Patron, b: Book, a: Author, l: Librarian |\n p.borrowedBooks = b and b.author = a and l.staffID = b.bookID\n}", "permalink": "graded-waltz-study-skinny", "time": "2023-12-07 13:05:58.892249", "cmd": 1} {"id": 8309, "parent": 8308, "code": "// Library Model\n\n// Signatures\nabstract sig Person {\n pid: Int,\n name: String\n}\n\nsig Author extends Person {\n booksAuthored: set Book\n}\n\nsig Patron extends Person {\n borrowedBooks: set Book\n}\n\nsig LibraryStaff extends Person {\n staffID: Int\n}\n\nsig Book {\n bookID: Int,\n title: String,\n author: Author,\n available: bool\n}\n\n// Inheritance\nsig Librarian extends LibraryStaff {}\n\n// Facts\nfact uniqueIDs {\n all p: Person | no q: Person | p != q and p.pid = q.pid\n}\n\nfact eachBookHasAuthor {\n all b: Book | one a: Author | b.author = a\n}\n\n// Predicates\npred patronHasBorrowedBook {\n all p: Patron, b: Book | b in p.borrowedBooks\n}\n\npred librarianCanCheckOut {\n all l: Librarian, p: Patron, b: Book | l.staffID = b.bookID and p.pid = l.pid\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is designed to be unsatisfiable\n no p: Patron, b: Book | (p in b.borrowedBooks) and (not b.available)\n}\n\nrun satisfiableExample for 2 but 3 Book, 2 Author, 2 Patron, 1 Librarian {\n // This command is designed to be satisfiable\n some p: Patron, b: Book, a: Author, l: Librarian |\n p.borrowedBooks = b and b.author = a and l.staffID = b.bookID\n}", "permalink": "filth-rigid-almost-energy", "time": "2023-12-07 13:06:03.153039", "cmd": 2} {"id": 8310, "parent": 8309, "code": "// Library Model\n\n// Signatures\nabstract sig Person {\n pid: Int,\n name: String\n}\n\nsig Author extends Person {\n booksAuthored: set Book\n}\n\nsig Patron extends Person {\n borrowedBooks: set Book\n}\n\nsig LibraryStaff extends Person {\n staffID: Int\n}\n\nsig Book {\n bookID: Int,\n title: String,\n author: Author,\n available: bool\n}\n\n// Inheritance\nsig Librarian extends LibraryStaff {}\n\n// Facts\nfact uniqueIDs {\n all p: Person | no q: Person | p != q and p.pid = q.pid\n}\n\nfact eachBookHasAuthor {\n all b: Book | one a: Author | b.author = a\n}\n\n// Predicates\npred patronHasBorrowedBook {\n all p: Patron, b: Book | b in p.borrowedBooks\n}\n\npred librarianCanCheckOut {\n all l: Librarian, p: Patron, b: Book | l.staffID = b.bookID and p.pid = l.pid\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is designed to be unsatisfiable\n no p: Patron, b: Book | (p in b.borrowedBooks) and (not b.available)\n}\n\n/*run satisfiableExample for 2 but 3 Book, 2 Author, 2 Patron, 1 Librarian {\n // This command is designed to be satisfiable\n some p: Patron, b: Book, a: Author, l: Librarian |\n p.borrowedBooks = b and b.author = a and l.staffID = b.bookID\n}*/", "permalink": "rake-ruby-rubbed-prude", "time": "2023-12-07 13:06:15.225986", "cmd": 1} {"id": 8312, "parent": 8311, "code": "// Library Model\n\n// Signatures\nabstract sig Person {\n pid: Int,\n name: String\n}\n\nsig Author extends Person {\n booksAuthored: set Book\n}\n\nsig Patron extends Person {\n borrowedBooks: set Book\n}\n\nsig LibraryStaff extends Person {\n staffID: Int\n}\n\nsig Book {\n bookID: Int,\n title: String,\n author: Author,\n available: bool\n}\n\n// Inheritance\nsig Librarian extends LibraryStaff {}\n\n// Facts\nfact uniqueIDs {\n all p: Person | no q: Person | p != q and p.pid = q.pid\n}\n\nfact eachBookHasAuthor {\n all b: Book | one a: Author | b.author = a\n}\n\n// Predicates\npred patronHasBorrowedBook {\n all p: Patron, b: Book | b in p.borrowedBooks\n}\n\npred librarianCanCheckOut {\n all l: Librarian, p: Patron, b: Book | l.staffID = b.bookID and p.pid = l.pid\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is designed to be unsatisfiable\n no p: Patron, b: Book | (p in b.borrowedBooks) and (not b.available)\n}\n\n/*run satisfiableExample for 2 but 3 Book, 2 Author, 2 Patron, 1 Librarian {\n // This command is designed to be satisfiable\n some p: Patron, b: Book, a: Author, l: Librarian |\n p.borrowedBooks = b and b.author = a and l.staffID = b.bookID\n}*/", "permalink": "usage-shrubs-parole-take", "time": "2023-12-07 13:06:31.062142", "cmd": 1} {"id": 8132, "parent": null, "code": "\nabstract sig Person {\n name: one String,\n age: one Int\n}\n\nsig Doctor extends Person {\n specialty: one String,\n patients: set Patient\n}\n\nsig Nurse extends Person {\n department: one String,\n assignedDoctors: set Doctor\n}\n\nsig Patient extends Person {\n disease: one String,\n attendingDoctor: one Doctor\n}\n\nsig Appointment {\n patient: one Patient,\n doctor: one Doctor,\n timeSlot: one TimeSlot\n}\n\nsig TimeSlot {\n startTime: one Int,\n endTime: one Int\n}\n\nfact NoSelfTreatment {\n all d: Doctor | no p: d.patients | p.attendingDoctor = d\n}\n\nfact ConsistentDoctorAssignment {\n all p: Patient, d: Doctor | p.attendingDoctor = d iff p in d.patients\n}\n\npred isAvailable[d: Doctor, t: TimeSlot] {\n no a: Appointment | a.doctor = d and a.timeSlot = t\n}\n\npred needsSpecialist[p: Patient, s: String] {\n p.disease = s\n}\n\nrun { some p: Patient, d: Doctor | p.attendingDoctor = d and p in d.patients } for 3 but 2 Doctor, 2 Patient, 3 TimeSlot, 2 Nurse\nrun { \n all d: Doctor | \n no p: Patient | p in d.patients and p.attendingDoctor = d \n} for 3 but 2 Doctor, 2 Patient, 3 TimeSlot, 2 Nurse", "permalink": "cure-fetch-ditzy-author", "time": "2023-12-05 17:02:13.776575", "cmd": 2} {"id": 8137, "parent": 8134, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // Someone killed Agatha\n some x: Person | x.killed = Agatha\n \n // For all x and y, if x killed y, then x hates y and x is not richer than y\n all x, y: Person | x.killed = y implies (x in y.hates and not x in y.richer)\n \n // Everyone who hates Agatha, is not hated by Charles\n all x: Person | x in Agatha.hates implies not x in Charles.hates\n \n // Agatha hates herself and Agatha hates Charles\n Agatha in Agatha.hates and Agatha in Charles.hates\n \n // Everyone is richer than Agatha except for Butler\n all x: Person - Butler | x in Agatha.richer\n // Butler is not richer than Agatha\n no Butler.richer\n \n // Agatha hates everyone whom Butler hates\n all x: Person | x in Butler.hates implies x in Agatha.hates\n \n // Everyone hates someone\n all x: Person | some x.hates\n}\n\nrun puzzle", "permalink": "coping-ought-gotten-humped", "time": "2023-12-05 17:31:02.775982", "cmd": 1} {"id": 8138, "parent": 8137, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // Someone killed Agatha\n some x: Person | x.killed = Agatha\n \n // For all x and y, if x killed y, then x hates y and x is not richer than y\n all x, y: Person | x.killed = y implies (x in y.hates and not x in y.richer)\n \n // Everyone who hates Agatha, is not hated by Charles\n all x: Person | x in Agatha.hates implies not x in Charles.hates\n \n // Agatha hates herself and Agatha hates Charles\n Agatha in Agatha.hates and Agatha in Charles.hates\n \n // Everyone is richer than Agatha except for Butler\n all x: Person - Butler | x in Agatha.richer\n \n // Agatha hates everyone whom Butler hates\n all x: Person | x in Butler.hates implies x in Agatha.hates\n \n // Everyone hates someone\n all x: Person | some x.hates\n}\n\nrun puzzle", "permalink": "easel-tingly-dusk-junior", "time": "2023-12-05 17:31:06.827575", "cmd": 1} {"id": 8140, "parent": 8139, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // Constraint (1)\n // There exists someone who killed Agatha\n some x: Person | x.killed = Agatha\n\n // Constraint (2)\n // For every x and y, if x killed y, then x hates y and x is not richer than y\n all x, y: Person | x.killed = y implies (x in y.hates and not x in y.richer)\n\n // Constraint (3)\n // For every x, if Agatha hates x, then Charles does not hate x\n all x: Person | x in Agatha.hates implies not x in Charles.hates\n\n // Constraint (4)\n // Agatha hates herself and Agatha hates Charles\n Agatha in Agatha.hates and Agatha in Charles.hates\n\n // Constraint (5)\n // For every x, x is richer than Agatha if and only if x is not Butler\n all x: Person | x != Butler iff x in Agatha.richer\n\n // Constraint (6)\n // For every x, if Agatha hates x, then Butler hates x\n all x: Person | x in Agatha.hates implies x in Butler.hates\n\n // Constraint (7)\n // For every x, there exists some y that x hates\n all x: Person | some y: Person | x in y.hates\n\n}\n\nrun puzzle", "permalink": "liable-valium-rice-neatly", "time": "2023-12-05 17:42:32.781240", "cmd": 1} {"id": 8146, "parent": 7297, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n no File - Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n no (File - Protected - Trash)\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no (File.link & Trash)\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f: File | f.link in f.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f in Trash implies some f.link & Trash\n}\n\nrun inv10", "permalink": "bribe-sheep-bobbed-plenty", "time": "2023-12-05 17:58:56.362839", "cmd": 1} {"id": 8149, "parent": 8148, "code": "// Define signatures for people\nabstract sig Person {}\none sig Agatha, Butler, Charles extends Person {}\n\n// Define relations for killing, hating, and being richer\nsig Relation {}\n\n// A fact to represent the killing relation\nfact Killing {\n killed: Person -> Person -> Relation\n}\n\n// A fact to represent the hating relation\nfact Hating {\n hates: Person -> Person -> Relation\n}\n\n// A fact to represent the richer relation\nfact Richer {\n richer: Person -> Person -> Relation\n}\n\n// Formula (1): Someone killed Agatha\nfact Formula1 {\n some p: Person | killed[p, Agatha]\n}\n\n// Formula (2): If someone killed someone else, then the killer hates the victim and is not richer than the victim\nfact Formula2 {\n all p1, p2: Person | (killed[p1, p2] implies (hates[p1, p2] && not richer[p1, p2]))\n}\n\n// Formula (3): If Agatha hates someone, Charles does not hate that person\nfact Formula3 {\n all p: Person | (hates[Agatha, p] implies not hates[Charles, p])\n}\n\n// Formula (4): Agatha hates herself and Charles\nfact Formula4 {\n hates[Agatha, Agatha]\n hates[Agatha, Charles]\n}\n\n// Formula (5): If someone is not richer than Agatha, then that person hates the Butler\nfact Formula5 {\n all p: Person | (not richer[p, Agatha] implies hates[p, Butler])\n}\n\n// Formula (6): If Agatha hates someone, that person also hates the Butler\nfact Formula6 {\n all p: Person | (hates[Agatha, p] implies hates[Butler, p])\n}\n\n// Formula (7): For every person, there exists someone they do not hate\nfact Formula7 {\n all p: Person | some q: Person | not hates[p, q]\n}\n\n// Check the satisfaction of the model\nrun {}\n\n// You can also add additional constraints or run specific predicates to check specific scenarios", "permalink": "aware-hertz-kudos-curly", "time": "2023-12-05 18:08:53.021397", "cmd": 2} {"id": 8150, "parent": 8149, "code": "// Define signatures for people\nabstract sig Person {}\none sig Agatha, Butler, Charles extends Person {}\n\n// Define relations for killing, hating, and being richer\nsig Relation {}\n\n// A fact to represent the killing relation\nfact Killing {\n killed: Person -> Person -> Relation\n}\n\n// A fact to represent the hating relation\nfact Hating {\n hates: Person -> Person -> Relation\n}\n\n// A fact to represent the richer relation\nfact Richer {\n richer: Person -> Person -> Relation\n}\n\n// Formula (1): Someone killed Agatha\nfact Formula1 {\n some p: Person | killed[p, Agatha]\n}\n\n// Formula (2): If someone killed someone else, then the killer hates the victim and is not richer than the victim\nfact Formula2 {\n all p1, p2: Person | (killed[p1, p2] implies (hates[p1, p2] && not richer[p1, p2]))\n}\n\n// Formula (3): If Agatha hates someone, Charles does not hate that person\nfact Formula3 {\n all p: Person | (hates[Agatha, p] implies not hates[Charles, p])\n}\n\n// Formula (4): Agatha hates herself and Charles\nfact Formula4 {\n hates[Agatha, Agatha]\n hates[Agatha, Charles]\n}\n\n// Formula (5): If someone is not richer than Agatha, then that person hates the Butler\nfact Formula5 {\n all p: Person | (not richer[p, Agatha] implies hates[p, Butler])\n}\n\n// Formula (6): If Agatha hates someone, that person also hates the Butler\nfact Formula6 {\n all p: Person | (hates[Agatha, p] implies hates[Butler, p])\n}\n\n// Formula (7): For every person, there exists someone they do not hate\nfact Formula7 {\n all p: Person | some q: Person | not hates[p, q]\n}\n\n// Check the satisfaction of the model\nrun {}\n\n// You can also add additional constraints or run specific predicates to check specific scenarios", "permalink": "wake-jester-clinic-strict", "time": "2023-12-05 18:08:56.058080", "cmd": 3} {"id": 8163, "parent": 8162, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nabstract sig Person{\n memberOfDepartment: set Department,\n id : Int\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n hasMembership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n supervises: set Student \n}\n\n// Book\nsig Book {\n inLibrary : one Library,\n checkOutBy: set Student\n}\n\n// Department\nsig Department {\n associatedStudents: set Student,\n departmentLibrarian: one Librarian\n}\n\nsig Library{\n contains :some Book,\n incharge: some Librarian\n}\n\n// Membership\nsig Membership{\n belongsTo: set Student,\n validTill : one Date\n}\n\n//Date\nsig Date{\n day: Int,\n month: Int,\n Year: Int\n}\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.hasMembership implies no student.borrowedBooks\n}\n\n// fact: Each book can be checked out by at most one student at a time\nfact bookCheckedOutByAtMostOneStudent {\n all book: Book | #book.checkOutBy <= 1\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "lapdog-fang-gulp-earwig", "time": "2023-12-05 19:18:44.566249", "cmd": 2} {"id": 8195, "parent": 8194, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\nabstract sig Person{}\nsig Professor, Student extends Person{}\n\nsig Class{\n instructor: one Professor,\n assistant: one Student\n}\n\nsig Assignment{\n associated_with: set Class,\n assigned_to: some Student\n}\n\nfact{\n all a: Assignment | one a.associated_with\n}\n\nrun {}", "permalink": "giving-amiss-concur-huddle", "time": "2023-12-05 20:16:58.695640", "cmd": 1} {"id": 8214, "parent": 6739, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\nrun {}", "permalink": "collar-ranch-nature-dried", "time": "2023-12-05 21:49:53.456698", "cmd": 1} {"id": 8218, "parent": 6737, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {all a : Assignment | one a.associated_with}\n\n// Predicate PolicyAllowsGrading defines the policy for allowing grading of an Assignment by a Person.\npred PolicyAllowsGrading(p: Person, a: Assignment) {\n p in a.associated_with.assistant or p in a.associated_with.instructor\n}\n\n// Assert NoOneCanGradeTheirOwnAssignment checks that no Person can grade their own Assignment.\nassert NoOneCanGradeTheirOwnAssignment {\n all p : Person, a : Assignment |\n PolicyAllowsGrading[p, a] implies not p in a.assigned_to\n}\n\ncheck NoOneCanGradeTheirOwnAssignment for 2", "permalink": "wages-paced-hunger-lance", "time": "2023-12-05 22:48:11.131377", "cmd": 1} {"id": 8225, "parent": 8224, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// Signatures\nsig User {\n username: String,\n email: String\n}\n\nabstract sig Product {\n productId: Int,\n name: String,\n price: Int,\n seller: User\n}\n\nsig ElectronicProduct extends Product {\n brand: String,\n warrantyPeriod: Int\n}\n\nsig ClothingProduct extends Product {\n size: String,\n brand: String\n}\n\nsig Transaction {\n transactionId: Int,\n buyer: User,\n seller: User,\n product: Product\n}\n\nsig Feedback {\n feedbackId: Int,\n rating: Int,\n comment: String,\n user: User\n}\n\n// Fields\nfact uniqueUsernames {\n all u1, u2: User | u1 != u2 implies u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all t1, t2: Transaction | t1 != t2 implies t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all f1, f2: Feedback | f1 != f2 implies f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is intentionally unsatisfiable for demonstration purposes\n some u: User | no p: Product | validTransaction[some t: Transaction | t.buyer = u]\n}\n\nrun satisfiableExample for 2 {\n // This command is designed to be satisfiable\n some t: Transaction | validTransaction[t] and positiveFeedback[some f: Feedback | f.user = t.buyer]\n}\n\nrun {}", "permalink": "bubbly-job-riding-filth", "time": "2023-12-05 23:02:28.408744", "cmd": 1} {"id": 8226, "parent": 8225, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// Signatures\nsig User {\n username: String,\n email: String\n}\n\nabstract sig Product {\n productId: Int,\n name: String,\n price: Int,\n seller: User\n}\n\nsig ElectronicProduct extends Product {\n brand: String,\n warrantyPeriod: Int\n}\n\nsig ClothingProduct extends Product {\n size: String,\n brand: String\n}\n\nsig Transaction {\n transactionId: Int,\n buyer: User,\n seller: User,\n product: Product\n}\n\nsig Feedback {\n feedbackId: Int,\n rating: Int,\n comment: String,\n user: User\n}\n\n// Fields\nfact uniqueUsernames {\n all u1, u2: User | u1 != u2 implies u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all t1, t2: Transaction | t1 != t2 implies t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all f1, f2: Feedback | f1 != f2 implies f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is intentionally unsatisfiable for demonstration purposes\n some u: User | no p: Product | validTransaction[some t: Transaction | t.buyer = u]\n}\n\nrun satisfiableExample {\n // This command is designed to be satisfiable\n some t: Transaction | validTransaction[t] and positiveFeedback[some f: Feedback | f.user = t.buyer]\n}\n\nrun {}", "permalink": "jot-email-latch-refill", "time": "2023-12-05 23:02:41.311451", "cmd": 1} {"id": 8230, "parent": 8229, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// Signatures\nsig User {\n username: String,\n email: String\n}\n\nabstract sig Product {\n productId: Int,\n name: String,\n price: Int,\n seller: User\n}\n\nsig ElectronicProduct extends Product {\n brand: String,\n warrantyPeriod: Int\n}\n\nsig ClothingProduct extends Product {\n size: String,\n brand: String\n}\n\nsig Transaction {\n transactionId: Int,\n buyer: User,\n seller: User,\n product: Product\n}\n\nsig Feedback {\n feedbackId: Int,\n rating: Int,\n comment: String,\n user: User\n}\n\n// Fields\nfact uniqueUsernames {\n all u1, u2: User | u1 != u2 implies u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all t1, t2: Transaction | t1 != t2 implies t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all f1, f2: Feedback | f1 != f2 implies f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n some b: User | t.buyer = b and t.product.seller != b\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is intentionally unsatisfiable for demonstration purposes\n some u: User | no p: Product | validTransaction[some t: Transaction | t.buyer = u]\n}\n\nrun satisfiableExample {\n // This command is designed to be satisfiable\n some t: Transaction | validTransaction[t] and positiveFeedback[some f: Feedback | f.user = t.buyer]\n}\n\nrun {}", "permalink": "patio-nerd-whole-paltry", "time": "2023-12-05 23:05:28.868561", "cmd": 2} {"id": 8236, "parent": 8235, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {all a : Assignment | one a.associated_with}\n\n// Predicate PolicyAllowsGrading defines the policy for allowing grading of an Assignment by a Person.\npred PolicyAllowsGrading(p: Person, a: Assignment) {\n p in a.associated_with.assistant or p in a.associated_with.instructor\n}\n\n// Assert NoOneCanGradeTheirOwnAssignment checks that no Person can grade their own Assignment.\nassert NoOneCanGradeTheirOwnAssignment {\n all p : Person, a : Assignment |\n PolicyAllowsGrading[p, a] implies not p in a.assigned_to\n}\n\ncheck NoOneCanGradeTheirOwnAssignment for 0", "permalink": "stinky-aloft-spore-valid", "time": "2023-12-06 14:08:49.826214", "cmd": 1} {"id": 8243, "parent": 8231, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// Signatures\nsig User {\n username: String,\n email: String\n}\n\nabstract sig Product {\n productId: Int,\n name: String,\n price: Int,\n seller: User\n}\n\nsig ElectronicProduct extends Product {\n brand: String,\n warrantyPeriod: Int\n}\n\nsig ClothingProduct extends Product {\n size: String,\n brand: String\n}\n\nsig Transaction {\n transactionId: Int,\n buyer: User,\n seller: User,\n product: Product\n}\n\nsig Feedback {\n feedbackId: Int,\n rating: Int,\n comment: String,\n user: User\n}\n\n// Fields\nfact uniqueUsernames {\n all u1, u2: User | u1 != u2 implies u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all t1, t2: Transaction | t1 != t2 implies t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all f1, f2: Feedback | f1 != f2 implies f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is intentionally unsatisfiable for demonstration purposes\n some u: User | no p: Product | validTransaction[some t: Transaction | t.buyer = u]\n}\n\nrun satisfiableExample {\n // This command is designed to be satisfiable\n some t: Transaction | validTransaction[t] and positiveFeedback[some f: Feedback | f.user = t.buyer]\n}\n\nrun {}", "permalink": "around-skiing-slain-banked", "time": "2023-12-06 20:43:13.656945", "cmd": 1} {"id": 8246, "parent": 8245, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// Signatures\nsig User {\n username: String,\n email: String\n}\n\nabstract sig Product {\n productId: Int,\n name: String,\n price: Int,\n seller: User\n}\n\nsig ElectronicProduct extends Product {\n brand: String,\n warrantyPeriod: Int\n}\n\nsig ClothingProduct extends Product {\n size: String,\n brand: String\n}\n\nsig Transaction {\n transactionId: Int,\n buyer: User,\n seller: User,\n product: Product\n}\n\nsig Feedback {\n feedbackId: Int,\n rating: Int,\n comment: String,\n user: User\n}\n\n// Fields\nfact uniqueUsernames {\n all u1, u2: User | u1 != u2 implies u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all t1, t2: Transaction | t1 != t2 implies t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all f1, f2: Feedback | f1 != f2 implies f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\n// run unsatisfiableExample {\n// // This command is intentionally unsatisfiable for demonstration purposes\n// some u: User | no p: Product | validTransaction[some t: Transaction | t.buyer = u]\n// }\n\n// run satisfiableExample {\n// // This command is designed to be satisfiable\n// some t: Transaction | validTransaction[t] and positiveFeedback[some f: Feedback | f.user = t.buyer]\n// }\n\nrun {}", "permalink": "squash-thinly-wreath-chop", "time": "2023-12-06 20:43:51.490680", "cmd": 1} {"id": 8248, "parent": 8247, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// Signatures\nsig User {\n username: String,\n email: String\n}\n\nabstract sig Product {\n productId: Int,\n name: String,\n price: Int,\n seller: User\n}\n\nsig ElectronicProduct extends Product {\n brand: String,\n warrantyPeriod: Int\n}\n\nsig ClothingProduct extends Product {\n size: String,\n brand: String\n}\n\nsig Transaction {\n transactionId: Int,\n buyer: User,\n seller: User,\n product: Product\n}\n\nsig Feedback {\n feedbackId: Int,\n rating: Int,\n comment: String,\n user: User\n}\n\n// Fields\nfact uniqueUsernames {\n all u1, u2: User | u1 != u2 implies u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all t1, t2: Transaction | t1 != t2 implies t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all f1, f2: Feedback | f1 != f2 implies f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\n// run unsatisfiableExample {\n// // This command is intentionally unsatisfiable for demonstration purposes\n// some u: User | no p: Product | validTransaction[some t: Transaction | t.buyer = u]\n// }\n\n// run satisfiableExample {\n// // This command is designed to be satisfiable\n// some t: Transaction | validTransaction[t] and positiveFeedback[some f: Feedback | f.user = t.buyer]\n// }\n\nrun {} for 3", "permalink": "patchy-fall-anger-punch", "time": "2023-12-06 20:55:52.187655", "cmd": 1} {"id": 8249, "parent": 8248, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// Signatures\nsig User {\n username: String,\n email: String\n}\n\nabstract sig Product {\n productId: Int,\n name: String,\n price: Int,\n seller: User\n}\n\nsig ElectronicProduct extends Product {\n brand: String,\n warrantyPeriod: Int\n}\n\nsig ClothingProduct extends Product {\n size: String,\n brand: String\n}\n\nsig Transaction {\n transactionId: Int,\n buyer: User,\n seller: User,\n product: Product\n}\n\nsig Feedback {\n feedbackId: Int,\n rating: Int,\n comment: String,\n user: User\n}\n\n// Fields\nfact uniqueUsernames {\n all u1, u2: User | u1 != u2 implies u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all t1, t2: Transaction | t1 != t2 implies t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all f1, f2: Feedback | f1 != f2 implies f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\n// run unsatisfiableExample {\n// // This command is intentionally unsatisfiable for demonstration purposes\n// some u: User | no p: Product | validTransaction[some t: Transaction | t.buyer = u]\n// }\n\nrun satisfiableExample {\n // This command is designed to be satisfiable\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\n// run {} for 3", "permalink": "precut-denial-dowry-envoy", "time": "2023-12-06 21:01:13.525178", "cmd": 1} {"id": 8251, "parent": 8250, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// Signatures\nsig User {\n username: String,\n email: String\n}\n\nabstract sig Product {\n productId: Int,\n name: String,\n price: Int,\n seller: User\n}\n\nsig ElectronicProduct extends Product {\n brand: String,\n warrantyPeriod: Int\n}\n\nsig ClothingProduct extends Product {\n size: String,\n brand: String\n}\n\nsig Transaction {\n transactionId: Int,\n buyer: User,\n seller: User,\n product: Product\n}\n\nsig Feedback {\n feedbackId: Int,\n rating: Int,\n comment: String,\n user: User\n}\n\n// Fields\nfact uniqueUsernames {\n all u1, u2: User | u1 != u2 implies u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all t1, t2: Transaction | t1 != t2 implies t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all f1, f2: Feedback | f1 != f2 implies f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is intentionally unsatisfiable for demonstration purposes\n all p1, p2: Product | p1 = p2 implies p1.productId = p2.productId\n}\n\n// run satisfiableExample {\n// // This command is designed to be satisfiable\n// all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n// }\n\n// run {} for 3", "permalink": "vessel-foe-shock-eraser", "time": "2023-12-06 21:13:45.162176", "cmd": 1} {"id": 8281, "parent": null, "code": "abstract sig Person {}\none sig Agatha, Butler, Charles extends Person {}\n\nfun killed(x, y: Person): Bool {}\n\nfun hates(x, y: Person): Bool {}\n\nfun richer(x, y: Person): Bool {}\n\npred existsKilled {\n some x: Person | killed[x, Agatha]\n}\n\npred relationships {\n all x, y: Person |\n (killed[x, y] implies hates[x, y] and not richer[x, y]) and\n (hates[Agatha, x] implies not hates[Charles, x]) and\n (hates[Agatha, Agatha] and hates[Agatha, Charles]) and\n (not richer[x, Agatha] implies hates[Butler, x]) and\n (hates[Agatha, x] implies hates[Butler, x]) and\n some y: Person | not hates[x, y]\n}\n\nrun existsKilled\nrun relationships", "permalink": "onion-tilt-xerox-serve", "time": "2023-12-07 12:15:44.024920", "cmd": 1} {"id": 8283, "parent": 8282, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // There exists a person x such that x killed Agatha\n some x: Person | x in Agatha.killed\n\n // If someone x killed someone y, then x hates y and x is not richer than y\n all x, y: Person |\n (x in y.killed => x in y.hates and no x' | x' in y.richer)\n\n // Additional constraints specified in the SMT-LIB code\n all x: Person | (Agatha.hates[x] implies no Charles.hates[x])\n Agatha.hates[Agatha] and Agatha.hates[Charles]\n all x: Person | (no x.richer[Agatha] implies Butler.hates[x])\n all x: Person | (Agatha.hates[x] implies Butler.hates[x])\n all x: Person | some y: Person | no x.hates[y]\n}\n\nrun puzzle", "permalink": "quit-crease-mardi-latter", "time": "2023-12-07 12:18:30.321130", "cmd": 1} {"id": 8284, "parent": 8283, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // There exists a person x such that x killed Agatha\n some x: Person | x in Agatha.killed\n\n // If someone x killed someone y, then x hates y and x is not richer than y\n all x, y: Person |\n (x in y.killed => x in y.hates and no x' | x' in y.richer)\n\n // Additional constraints specified in the SMT-LIB code\n all x: Person | (Agatha.hates[x] implies no Charles.hates[x])\n Agatha.hates[Agatha] and Agatha.hates[Charles]\n all x: Person | (no x.richer[Agatha] implies Butler.hates[x])\n all x: Person | (Agatha.hates[x] implies Butler.hates[x])\n all x: Person | some y: Person | no x.hates[y]\n}\n\nrun puzzle", "permalink": "either-stock-jumble-emote", "time": "2023-12-07 12:21:29.660123", "cmd": 1} {"id": 8290, "parent": 8289, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // There exists a person x such that x killed Agatha\n some x: Person | x in Agatha.killed\n\n // If someone x killed someone y, then x hates y and x is not richer than y\n all x, y: Person |\n (x in y.killed => x in y.hates and not x' | x' in y.richer)\n\n // Additional constraints specified in the SMT-LIB code\n all x: Person | (Agatha.hates[x] implies not Charles.hates[x])\n Agatha.hates[Agatha] and Agatha.hates[Charles]\n all x: Person | (not x.richer[Agatha] implies Butler.hates[x])\n all x: Person | (Agatha.hates[x] implies Butler.hates[x])\n all x: Person | some y: Person | not x.hates[y]\n}\n\nrun puzzle", "permalink": "thread-rocky-hurt-defeat", "time": "2023-12-07 12:24:58.203487", "cmd": 1} {"id": 8298, "parent": 8297, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n// Social Network Model\n\n// Signatures\nabstract sig User {\n userID: Int,\n username: String\n}\n\nsig Post {\n postID: Int,\n content: String,\n author: User\n}\n\nsig Comment {\n commentID: Int,\n text: String,\n author: User,\n commentedPost: Post\n}\n\nsig Like {\n likeID: Int,\n user: User,\n likedPost: Post\n}\n\n// Inheritance\nsig Admin extends User {}\n\n// Facts\nfact uniqueUserIDs {\n all u, v: User | u != v => u.userID != v.userID\n}\n\nfact eachPostHasAuthor {\n all p: Post | one u: User | p.author = u\n}\n\n// Predicates\npred userLikesOwnPost {\n all u: User, p: Post | no l: Like | l.user = u and l.likedPost = p and p.author = u\n}\n\npred commentAndLikeOnSamePost {\n all c: Comment, l: Like | c.commentedPost = l.likedPost\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is designed to be unsatisfiable\n no u: User, p: Post | u in p.author\n}\n\nrun satisfiableExample for 4 but 3 Comment, 3 Like {\n // This command is designed to be satisfiable\n some u: User, p: Post, c: Comment, l: Like |\n c.author = u and c.commentedPost = p and l.user = u and l.likedPost = p\n}", "permalink": "nibble-plenty-askew-lagoon", "time": "2023-12-07 12:49:31.853623", "cmd": 2} {"id": 8299, "parent": 8298, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n// Social Network Model\n\n// Signatures\nabstract sig User {\n userID: Int,\n username: String\n}\n\nsig Post {\n postID: Int,\n content: String,\n author: User\n}\n\nsig Comment {\n commentID: Int,\n text: String,\n author: User,\n commentedPost: Post\n}\n\nsig Like {\n likeID: Int,\n user: User,\n likedPost: Post\n}\n\n// Inheritance\nsig Admin extends User {}\n\n// Facts\nfact uniqueUserIDs {\n all u, v: User | u != v => u.userID != v.userID\n}\n\nfact eachPostHasAuthor {\n all p: Post | one u: User | p.author = u\n}\n\n// Predicates\npred userLikesOwnPost {\n all u: User, p: Post | no l: Like | l.user = u and l.likedPost = p and p.author = u\n}\n\npred commentAndLikeOnSamePost {\n all c: Comment, l: Like | c.commentedPost = l.likedPost\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is designed to be unsatisfiable\n no u: User, p: Post | u in p.author\n}\n\nrun satisfiableExample for 4 but 3 Comment, 3 Like {\n // This command is designed to be satisfiable\n some u: User, p: Post, c: Comment, l: Like |\n c.author = u and c.commentedPost = p and l.user = u and l.likedPost = p\n}", "permalink": "clammy-speech-casing-banter", "time": "2023-12-07 12:49:35.751970", "cmd": 1} {"id": 8301, "parent": 8300, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n// Social Network Model\n\n// Signatures\nabstract sig User {\n userID: Int,\n username: String\n}\n\nsig Post {\n postID: Int,\n content: String,\n author: User\n}\n\nsig Comment {\n commentID: Int,\n text: String,\n author: User,\n commentedPost: Post\n}\n\nsig Like {\n likeID: Int,\n user: User,\n likedPost: Post\n}\n\n// Inheritance\nsig Admin extends User {}\n\n// Facts\nfact uniqueUserIDs {\n all u, v: User | u != v => u.userID != v.userID\n}\n\nfact eachPostHasAuthor {\n all p: Post | one u: User | p.author = u\n}\n\n// Predicates\npred userLikesOwnPost {\n all u: User, p: Post | no l: Like | l.user = u and l.likedPost = p and p.author = u\n}\n\npred commentAndLikeOnSamePost {\n all c: Comment, l: Like | c.commentedPost = l.likedPost\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is designed to be unsatisfiable\n no u: User, p: Post | u in p.author\n}\n\nrun satisfiableExample for 4 but 3 Comment, 3 Like {\n // This command is designed to be satisfiable\n some u: User, p: Post, c: Comment, l: Like |\n c.author = u and c.commentedPost = p and l.user = u and l.likedPost = p\n}", "permalink": "wispy-army-timing-sitcom", "time": "2023-12-07 12:51:44.951983", "cmd": 2} {"id": 8305, "parent": 8304, "code": "// Library Model\n\n// Signatures\nabstract sig Person {\n pid: Int,\n name: String\n}\n\nsig Author extends Person {\n booksAuthored: set Book\n}\n\nsig Patron extends Person {\n borrowedBooks: set Book\n}\n\nsig LibraryStaff extends Person {\n staffID: Int\n}\n\nsig Book {\n bookID: Int,\n title: String,\n author: Author,\n available: Bool\n}\n\n// Inheritance\nsig Librarian extends LibraryStaff {}\n\n// Facts\nfact uniqueIDs {\n all p: Person | no q: Person | p != q and p.pid = q.pid\n}\n\nfact eachBookHasAuthor {\n all b: Book | one a: Author | b.author = a\n}\n\n// Predicates\npred patronHasBorrowedBook {\n all p: Patron, b: Book | b in p.borrowedBooks\n}\n\npred librarianCanCheckOut {\n all l: Librarian, p: Patron, b: Book | l.staffID = b.bookID and p.pid = l.pid\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is designed to be unsatisfiable\n no p: Patron, b: Book | (p in b.borrowedBooks) and (not b.available)\n}\n\nrun satisfiableExample for 2 but 3 Book, 2 Author, 2 Patron, 1 Librarian {\n // This command is designed to be satisfiable\n some p: Patron, b: Book, a: Author, l: Librarian |\n p.borrowedBooks = b and b.author = a and l.staffID = b.bookID\n}", "permalink": "snooze-cabana-lake-cotton", "time": "2023-12-07 13:04:18.974681", "cmd": 1} {"id": 8306, "parent": 8305, "code": "// Library Model\n\n// Signatures\nabstract sig Person {\n pid: Int,\n name: String\n}\n\nsig Author extends Person {\n booksAuthored: set Book\n}\n\nsig Patron extends Person {\n borrowedBooks: set Book\n}\n\nsig LibraryStaff extends Person {\n staffID: Int\n}\n\nsig Book {\n bookID: Int,\n title: String,\n author: Author,\n available: Bool\n}\n\n// Inheritance\nsig Librarian extends LibraryStaff {}\n\n// Facts\nfact uniqueIDs {\n all p: Person | no q: Person | p != q and p.pid = q.pid\n}\n\nfact eachBookHasAuthor {\n all b: Book | one a: Author | b.author = a\n}\n\n// Predicates\npred patronHasBorrowedBook {\n all p: Patron, b: Book | b in p.borrowedBooks\n}\n\npred librarianCanCheckOut {\n all l: Librarian, p: Patron, b: Book | l.staffID = b.bookID and p.pid = l.pid\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is designed to be unsatisfiable\n no p: Patron, b: Book | (p in b.borrowedBooks) and (not b.available)\n}\n\n/*run satisfiableExample for 2 but 3 Book, 2 Author, 2 Patron, 1 Librarian {\n // This command is designed to be satisfiable\n some p: Patron, b: Book, a: Author, l: Librarian |\n p.borrowedBooks = b and b.author = a and l.staffID = b.bookID\n}*/", "permalink": "foyer-frayed-squirt-liquid", "time": "2023-12-07 13:04:52.222531", "cmd": 1} {"id": 8311, "parent": 8310, "code": "// Library Model\n\n// Signatures\nabstract sig Person {\n pid: Int,\n name: String\n}\n\nsig Author extends Person {\n booksAuthored: set Book\n}\n\nsig Patron extends Person {\n borrowedBooks: set Book\n}\n\nsig LibraryStaff extends Person {\n staffID: Int\n}\n\nsig Book {\n bookID: Int,\n title: String,\n author: Author,\n available: bool\n}\n\n// Inheritance\nsig Librarian extends LibraryStaff {}\n\n// Facts\nfact uniqueIDs {\n all p: Person | no q: Person | p != q and p.pid = q.pid\n}\n\nfact eachBookHasAuthor {\n all b: Book | one a: Author | b.author = a\n}\n\n// Predicates\npred patronHasBorrowedBook {\n all p: Patron, b: Book | b in p.borrowedBooks\n}\n\npred librarianCanCheckOut {\n all l: Librarian, p: Patron, b: Book | l.staffID = b.bookID and p.pid = l.pid\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is designed to be unsatisfiable\n no p: Patron, b: Book | (p in b.borrowedBooks) and (not b.available)\n}\n\n/*run satisfiableExample for 2 but 3 Book, 2 Author, 2 Patron, 1 Librarian {\n // This command is designed to be satisfiable\n some p: Patron, b: Book, a: Author, l: Librarian |\n p.borrowedBooks = b and b.author = a and l.staffID = b.bookID\n}*/", "permalink": "slot-nest-lunacy-debtor", "time": "2023-12-07 13:06:21.787004", "cmd": 1} {"id": 8314, "parent": 8313, "code": "// Library Model\n\n// Signatures\nabstract sig Person {\n pid: Int,\n name: String\n}\n\nsig Author extends Person {\n booksAuthored: set Book\n}\n\nsig Patron extends Person {\n borrowedBooks: set Book\n}\n\nsig LibraryStaff extends Person {\n staffID: Int\n}\n\nsig Book {\n bookID: Int,\n title: String,\n author: Author,\n available: bool\n}\n\n// Inheritance\nsig Librarian extends LibraryStaff {}\n\n// Facts\nfact uniqueIDs {\n all p: Person | no q: Person | p != q and p.pid = q.pid\n}\n\nfact eachBookHasAuthor {\n all b: Book | one a: Author | b.author = a\n}\n\n// Predicates\npred patronHasBorrowedBook {\n all p: Patron, b: Book | b in p.borrowedBooks\n}\n\npred librarianCanCheckOut {\n all l: Librarian, p: Patron, b: Book | l.staffID = b.bookID and p.pid = l.pid\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is designed to be unsatisfiable\n no p: Patron, b: Book | (p in b.borrowedBooks) and (not b.available)\n}\n\n/*run satisfiableExample for 2 but 3 Book, 2 Author, 2 Patron, 1 Librarian {\n // This command is designed to be satisfiable\n some p: Patron, b: Book, a: Author, l: Librarian |\n p.borrowedBooks = b and b.author = a and l.staffID = b.bookID\n}*/", "permalink": "frill-unrest-lizard-array", "time": "2023-12-07 13:08:28.277415", "cmd": 1} {"id": 8316, "parent": 8315, "code": "// Library Model\n\n// Signatures\nabstract sig Person {\n pid: Int,\n name: String\n}\n\nsig Author extends Person {\n booksAuthored: set Book\n}\n\nsig Patron extends Person {\n borrowedBooks: set Book\n}\n\nsig LibraryStaff extends Person {\n staffID: Int\n}\n\nsig Book {\n bookID: Int,\n title: String,\n author: Author,\n available: Int // Use integer to represent boolean (0 for false, 1 for true)\n}\n\n// Inheritance\nsig Librarian extends LibraryStaff {}\n\n// Facts\nfact uniqueIDs {\n all p: Person | no q: Person | p != q and p.pid = q.pid\n}\n\nfact eachBookHasAuthor {\n all b: Book | one a: Author | b.author = a\n}\n\n// Predicates\npred patronHasBorrowedBook {\n all p: Patron, b: Book | b in p.borrowedBooks\n}\n\npred librarianCanCheckOut {\n all l: Librarian, p: Patron, b: Book | l.staffID = b.bookID and p.pid = l.pid\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is designed to be unsatisfiable\n no p: Patron, b: Book | p.borrowedBooks & b.available = b.borrowedBooks\n}\n\n/*run satisfiableExample for 2 but 3 Book, 2 Author, 2 Patron, 1 Librarian {\n // This command is designed to be satisfiable\n some p: Patron, b: Book, a: Author, l: Librarian |\n p.borrowedBooks & b.available = b.borrowedBooks and b.author = a and l.staffID = b.bookID\n}*/", "permalink": "lazily-neuron-bulge-stump", "time": "2023-12-07 13:10:49.628211", "cmd": 1} {"id": 8317, "parent": 8316, "code": "// Library Model\n\n// Signatures\nabstract sig Person {\n pid: Int,\n name: String\n}\n\nsig Author extends Person {\n booksAuthored: set Book\n}\n\nsig Patron extends Person {\n borrowedBooks: set Book\n}\n\nsig LibraryStaff extends Person {\n staffID: Int\n}\n\nsig Book {\n bookID: Int,\n title: String,\n author: Author,\n available: Int // Use integer to represent boolean (0 for false, 1 for true)\n}\n\n// Inheritance\nsig Librarian extends LibraryStaff {}\n\n// Facts\nfact uniqueIDs {\n all p: Person | no q: Person | p != q and p.pid = q.pid\n}\n\nfact eachBookHasAuthor {\n all b: Book | one a: Author | b.author = a\n}\n\n// Predicates\npred patronHasBorrowedBook {\n all p: Patron, b: Book | b in p.borrowedBooks\n}\n\npred librarianCanCheckOut {\n all l: Librarian, p: Patron, b: Book | l.staffID = b.bookID and p.pid = l.pid\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is designed to be unsatisfiable\n no p: Patron, b: Book | (b in p.borrowedBooks) and b.available = 1\n}\n\n/*run satisfiableExample for 2 but 3 Book, 2 Author, 2 Patron, 1 Librarian {\n // This command is designed to be satisfiable\n some p: Patron, b: Book, a: Author, l: Librarian |\n p.borrowedBooks = b and b.author = a and l.staffID = b.bookID\n}*/", "permalink": "bony-itunes-object-taking", "time": "2023-12-07 13:12:05.159787", "cmd": 1} {"id": 8318, "parent": 8317, "code": "// Library Model\n\n// Signatures\nabstract sig Person {\n pid: Int,\n name: String\n}\n\nsig Author extends Person {\n booksAuthored: set Book\n}\n\nsig Patron extends Person {\n borrowedBooks: set Book\n}\n\nsig LibraryStaff extends Person {\n staffID: Int\n}\n\nsig Book {\n bookID: Int,\n title: String,\n author: Author,\n available: Int // Use integer to represent boolean (0 for false, 1 for true)\n}\n\n// Inheritance\nsig Librarian extends LibraryStaff {}\n\n// Facts\nfact uniqueIDs {\n all p: Person | no q: Person | p != q and p.pid = q.pid\n}\n\nfact eachBookHasAuthor {\n all b: Book | one a: Author | b.author = a\n}\n\n// Predicates\npred patronHasBorrowedBook {\n all p: Patron, b: Book | b in p.borrowedBooks\n}\n\npred librarianCanCheckOut {\n all l: Librarian, p: Patron, b: Book | l.staffID = b.bookID and p.pid = l.pid\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is designed to be unsatisfiable\n no p: Patron, b: Book | (b in p.borrowedBooks) and b.available = 1\n}\n\nrun satisfiableExample for 2 but 3 Book, 2 Author, 2 Patron, 1 Librarian {\n // This command is designed to be satisfiable\n some p: Patron, b: Book, a: Author, l: Librarian |\n p.borrowedBooks = b and b.author = a and l.staffID = b.bookID\n}", "permalink": "cuddly-evolve-rift-panama", "time": "2023-12-07 13:12:37.475674", "cmd": 2} {"id": 8330, "parent": 8329, "code": "// Library Model\n\n// Signatures\nabstract sig Person {\n pid: Int,\n name: String\n}\n\nsig Author extends Person {\n booksAuthored: set Book\n}\n\nsig Patron extends Person {\n borrowedBooks: set Book\n}\n\nsig LibraryStaff extends Person {\n staffID: Int\n}\n\nsig Book {\n bookID: Int,\n title: String,\n author: Author,\n borrowed: set Patron\n}\n\n// Inheritance\nsig Librarian extends LibraryStaff {}\n\n// Facts\nfact uniqueIDs {\n all p: Person | no q: Person | p != q and p.pid = q.pid\n}\n\nfact eachBookHasAuthor {\n all b: Book | one a: Author | b.author = a\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is designed to be unsatisfiable\n no p: Patron, b: Book | b in p.borrowed and b in b.borrowed\n}\n\nrun satisfiableExample for 2 but 3 Book, 2 Author, 2 Patron, 1 Librarian {\n // This command is designed to be satisfiable\n some p: Patron, b: Book, a: Author, l: Librarian |\n p.borrowed = b and b.author = a and l.staffID = b.bookID\n}", "permalink": "oaf-marlin-entrap-aghast", "time": "2023-12-07 13:19:05.563558", "cmd": 1} {"id": 8346, "parent": 8345, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n some x: Person | Agatha in x.killed\n}\n\nrun puzzle", "permalink": "wince-python-uptown-cage", "time": "2023-12-07 15:06:24.349258", "cmd": 1} {"id": 8349, "parent": 8348, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\n\npred puzzle {\n some x: Person | Agatha in x.killed\n all x, y: Person | (x in y.killed) => ((y in x.hates) && !(y in x.richer) )\n}\n\nrun puzzle", "permalink": "frenzy-drab-clench-chirpy", "time": "2023-12-07 15:13:48.134756", "cmd": 1} {"id": 8351, "parent": 8350, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\n\npred puzzle {\n some x: Person | Agatha in x.killed\n all x, y: Person | (y in x.killed) => ((y in x.hates) && !(y in x.richer) )\n all x: Person | x in Agatha.hates => !(x in Charles.hates)\n Agatha in Agatha.hates && Charles in Agatha.hates\n all x : Person | !(Agatha in x.richer) => x in Butler.hates\n all x : Person | x in Agatha.hates => x in Butler.hates\n all x: Person | some y :Person | !(y in x.hates)\n}\n\nrun puzzle", "permalink": "starch-unbent-error-tycoon", "time": "2023-12-07 15:28:34.104107", "cmd": 1} {"id": 8352, "parent": 8351, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n some x: Person | x in Agatha.killed // (1)\n all x, y: Person | (y in x.killed) => (y in x.hates && !(y in x.richer)) // (2)\n all x: Person | (x in Agatha.hates => !(x in Charles.hates)) // (3)\n Agatha in Agatha.hates && Charles in Agatha.hates // (4)\n all x : Person | !(x in Agatha.richer) => x in Butler.hates // (5)\n all x : Person | (x in Agatha.hates => x in Butler.hates) // (6)\n all x: Person | some y: Person | !(y in x.hates) // (7)\n}\n\nrun puzzle for 3 but exactly 3 Person", "permalink": "geek-shrill-fried-jargon", "time": "2023-12-07 15:33:08.635182", "cmd": 1} {"id": 8356, "parent": 8355, "code": "// Social Networking Alloy Model\n\n// Signatures\nabstract sig User {\n userId: Int,\n username: String\n}\n\nsig RegularUser extends User {\n email: String\n}\n\nsig AdminUser extends User {\n adminLevel: Int\n}\n\nsig Post {\n postId: Int,\n content: String,\n timestamp: Int\n}\n\nsig Like {\n likeId: Int,\n user: User,\n post: Post\n}\n\n// Fields\nfact uniqueUserId {\n all disj u1, u2: User | u1.userId != u2.userId\n}\n\nfact uniquePostId {\n all disj p1, p2: Post | p1.postId != p2.postId\n}\n\n// Inheritance\nfact adminInheritance {\n all u: AdminUser | u in User\n}\n\n// Facts\nfact likeConsistency {\n all l: Like | l.user in User and l.post in Post\n}\n\nfact postsByRegularUsers {\n all p: Post, u: RegularUser | p in u.post\n}\n\n// Predicates\npred userLikesPost[u: User, p: Post] {\n some l: Like | l.user = u and l.post = p\n}\n\npred popularPost[p: Post] {\n some u: User | userLikesPost[u, p] and some v: User | userLikesPost[v, p] and u != v\n}\n\n// Run commands\nrun unsatisfiableExample {\n // This run command should be unsatisfiable\n // Add constraints that make the model unsatisfiable\n no u: User | u in RegularUser and u in AdminUser\n}\n\n/*run satisfiableExample for 3 {\n // This run command should be satisfiable\n // Adjust the bound as needed\n some p: Post, u: RegularUser | userLikesPost[u, p] and popularPost[p]\n}*/\n", "permalink": "pagan-tidy-ebay-sake", "time": "2023-12-07 16:49:17.106255", "cmd": 1} {"id": 8357, "parent": 8356, "code": "// Social Networking Alloy Model\n\n// Signatures\nabstract sig User {\n userId: Int,\n username: String\n}\n\nsig RegularUser extends User {\n email: String\n}\n\nsig AdminUser extends User {\n adminLevel: Int\n}\n\nsig Post {\n postId: Int,\n content: String,\n timestamp: Int\n}\n\nsig Like {\n likeId: Int,\n user: User,\n post: Post\n}\n\n// Fields\nfact uniqueUserId {\n all disj u1, u2: User | u1.userId != u2.userId\n}\n\nfact uniquePostId {\n all disj p1, p2: Post | p1.postId != p2.postId\n}\n\n// Inheritance\nfact adminInheritance {\n all u: AdminUser | u in User\n}\n\n// Facts\nfact likeConsistency {\n all l: Like | l.user in User and l.post in Post\n}\n\nfact postsByRegularUsers {\n all p: Post, u: RegularUser | p in u.post\n}\n\n// Predicates\npred userLikesPost[u: User, p: Post] {\n some l: Like | l.user = u and l.post = p\n}\n\npred popularPost[p: Post] {\n some u: User | userLikesPost[u, p] and some v: User | userLikesPost[v, p] and u != v\n}\n\n// Run commands\nrun unsatisfiableExample {\n // This run command should be unsatisfiable\n // Add constraints that make the model unsatisfiable\n no u: User | u in RegularUser and u in AdminUser\n}\n\nrun satisfiableExample for 3 {\n // This run command should be satisfiable\n // Adjust the bound as needed\n some p: Post, u: RegularUser | userLikesPost[u, p] and popularPost[p]\n}\n", "permalink": "wince-snap-acting-scorn", "time": "2023-12-07 16:51:08.873110", "cmd": 2} {"id": 8133, "parent": 8132, "code": "\nabstract sig Person {\n name: one String,\n age: one Int\n}\n\nsig Doctor extends Person {\n specialty: one String,\n patients: set Patient\n}\n\nsig Nurse extends Person {\n department: one String,\n assignedDoctors: set Doctor\n}\n\nsig Patient extends Person {\n disease: one String,\n attendingDoctor: one Doctor\n}\n\nsig Appointment {\n patient: one Patient,\n doctor: one Doctor,\n timeSlot: one TimeSlot\n}\n\nsig TimeSlot {\n startTime: one Int,\n endTime: one Int\n}\n\nfact NoSelfTreatment {\n all d: Doctor | no p: d.patients | p.attendingDoctor = d\n}\n\nfact ConsistentDoctorAssignment {\n all p: Patient, d: Doctor | p.attendingDoctor = d iff p in d.patients\n}\n\npred isAvailable[d: Doctor, t: TimeSlot] {\n no a: Appointment | a.doctor = d and a.timeSlot = t\n}\n\npred needsSpecialist[p: Patient, s: String] {\n p.disease = s\n}\n\nrun { some p: Patient, d: Doctor | p.attendingDoctor = d and p in d.patients } for 3 but 2 Doctor, 2 Patient, 3 TimeSlot, 2 Nurse\nrun { all d: Doctor | no p: Patient | p in d.patients and p.attendingDoctor = d } for 3 but 2 Doctor, 2 Patient, 3 TimeSlot, 2 Nurse", "permalink": "vegan-wham-dial-result", "time": "2023-12-05 17:03:11.290089", "cmd": 2} {"id": 8135, "parent": 6744, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "boxy-talcum-hurray-oaf", "time": "2023-12-05 17:29:00.617878", "cmd": 1} {"id": 8143, "parent": 8142, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // (1) There exists someone who killed Agatha\n some x: Person | x.killed = Agatha\n\n // (2) Anyone who killed anyone hates them and is not richer than them\n all x, y: Person | x.killed = y implies (x in y.hates and not x in y.richer)\n\n // (3) Everyone who hates Agatha doesn't hate Charles\n all x: Person | x in Agatha.hates implies not x in Charles.hates\n\n // (4) Agatha hates herself and Charles\n Agatha in Agatha.hates\n Agatha in Charles.hates\n\n // (5) Agatha is not richer than anyone except Butler\n no x: Person - Butler | x in Agatha.richer\n\n // (6) Agatha hates everyone Butler hates\n all x: Person | x in Butler.hates implies x in Agatha.hates\n\n // (7) Everyone hates someone\n all x: Person | some y: Person | x in y.hates\n}\n\nrun puzzle for exactly 1 Agatha, 1 Butler, 1 Charles", "permalink": "supper-hunger-squash-unwed", "time": "2023-12-05 17:53:20.547123", "cmd": 1} {"id": 8148, "parent": null, "code": "// Define signatures for people\nabstract sig Person {}\none sig Agatha, Butler, Charles extends Person {}\n\n// Define relations for killing, hating, and being richer\nsig Relation {}\n\n// A fact to represent the killing relation\nfact Killing {\n killed: Person -> Person -> Relation\n}\n\n// A fact to represent the hating relation\nfact Hating {\n hates: Person -> Person -> Relation\n}\n\n// A fact to represent the richer relation\nfact Richer {\n richer: Person -> Person -> Relation\n}\n\n// Formula (1): Someone killed Agatha\nfact Formula1 {\n some p: Person | killed[p, Agatha]\n}\n\n// Formula (2): If someone killed someone else, then the killer hates the victim and is not richer than the victim\nfact Formula2 {\n all p1, p2: Person | (killed[p1, p2] implies (hates[p1, p2] && not richer[p1, p2]))\n}\n\n// Formula (3): If Agatha hates someone, Charles does not hate that person\nfact Formula3 {\n all p: Person | (hates[Agatha, p] implies not hates[Charles, p])\n}\n\n// Formula (4): Agatha hates herself and Charles\nfact Formula4 {\n hates[Agatha, Agatha]\n hates[Agatha, Charles]\n}\n\n// Formula (5): If someone is not richer than Agatha, then that person hates the Butler\nfact Formula5 {\n all p: Person | (not richer[p, Agatha] implies hates[p, Butler])\n}\n\n// Formula (6): If Agatha hates someone, that person also hates the Butler\nfact Formula6 {\n all p: Person | (hates[Agatha, p] implies hates[Butler, p])\n}\n\n// Formula (7): For every person, there exists someone they do not hate\nfact Formula7 {\n all p: Person | some q: Person | not hates[p, q]\n}\n\n// Check the satisfaction of the model\nrun {}\n\n// You can also add additional constraints or run specific predicates to check specific scenarios", "permalink": "driven-john-cube-nuzzle", "time": "2023-12-05 18:08:49.126163", "cmd": 1} {"id": 8151, "parent": 7069, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // TODO Implement the constraints here\n\n // A fact to represent the killing relation\nfact Killing {\n killed: Person -> Person -> Relation}\n\n// A fact to represent the hating relation\nfact Hating {\n hates: Person -> Person -> Relation}\n\n// A fact to represent the richer relation\nfact Richer {\n richer: Person -> Person -> Relation}\n\n// Formula (1): Someone killed Agatha\nfact Formula1 {\n some p: Person | killed[p, Agatha]}\n\n// Formula (2): If someone killed someone else, then the killer hates the victim and is not richer than the victim\nfact Formula2 {\n all p1, p2: Person | (killed[p1, p2] implies (hates[p1, p2] && not richer[p1, p2]))\n}\n\n// Formula (3): If Agatha hates someone, Charles does not hate that person\nfact Formula3 {\n all p: Person | (hates[Agatha, p] implies not hates[Charles, p])\n}\n\n// Formula (4): Agatha hates herself and Charles\nfact Formula4 {\n hates[Agatha, Agatha]\n hates[Agatha, Charles]\n}\n\n// Formula (5): If someone is not richer than Agatha, then that person hates the Butler\nfact Formula5 {\n all p: Person | (not richer[p, Agatha] implies hates[p, Butler])\n}\n\n// Formula (6): If Agatha hates someone, that person also hates the Butler\nfact Formula6 {\n all p: Person | (hates[Agatha, p] implies hates[Butler, p])\n}\n\n// Formula (7): For every person, there exists someone they do not hate\nfact Formula7 {\n all p: Person | some q: Person | not hates[p, q]\n}\n\n}\n\nrun puzzle", "permalink": "vastly-move-cocoa-flirt", "time": "2023-12-05 18:14:48.560454", "cmd": 1} {"id": 8153, "parent": 8111, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n// Signatures\nabstract sig User {\n userId: Int,\n username: String\n}\n\nsig Admin extends User {\n // Additional fields for Admin\n isAdmin: Bool\n}\n\nsig Post {\n postId: Int,\n content: String,\n author: User\n}\n\nsig Comment {\n commentId: Int,\n text: String,\n author: User,\n onPost: Post\n}\n\nsig Like {\n likeId: Int,\n byUser: User,\n onPost: Post\n}\n\n// Facts\nfact UniqueUserIds {\n // Ensure user IDs are unique\n all u1, u2: User | u1 != u2 implies u1.userId != u2.userId\n}\n\nfact OneAdmin {\n // Ensure there is at least one admin\n some a: Admin | a.isAdmin = true\n}\n\n// Predicates\npred userLikesPost[u: User, p: Post] {\n some l: Like | l.byUser = u and l.onPost = p\n}\n\npred postHasComments[p: Post] {\n some c: Comment | c.onPost = p\n}\n\n// Run commands\nrun unsatisfiableExample {\n // Specify a condition that is unsatisfiable\n no u: User | u.userId > 10\n}\n\nrun satisfiableExample for 2 {\n // Specify a condition that is satisfiable\n some u: User | u.userId < 5\n}\n\n\n\nrun {}", "permalink": "spouse-bluish-strum-storm", "time": "2023-12-05 19:11:37.398360", "cmd": 3} {"id": 8155, "parent": 8154, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nabstract sig Person{\n memberOfDepartment: set Department,\n id : Int\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n hasMembership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n supervises: set Student \n}\n\n// Book\nsig Book {\n inLibrary : one Library,\n checkOutBy: set Student\n}\n\n// Department\nsig Department {\n associatedStudents: set Student,\n departmentLibrarian: one Librarian\n}\n\nsig Library{\n contains :some Book,\n incharge: some Librarian\n}\n\n// Membership\nsig Membership{\n belongsTo: set Student,\n validTill : one Date\n}\n\n//Date\nsig Date{\n day: Int,\n month: Int,\n Year: Int\n}\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.hasMembership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\n// fact borrowedBooksAreNotAvailableForBorrowing{\n// all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n// }\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "defog-pond-script-yarn", "time": "2023-12-05 19:15:29.236735", "cmd": 1} {"id": 8160, "parent": 8159, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nabstract sig Person{\n memberOfDepartment: set Department,\n id : Int\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n hasMembership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n supervises: set Student \n}\n\n// Book\nsig Book {\n inLibrary : one Library,\n checkOutBy: set Student\n}\n\n// Department\nsig Department {\n associatedStudents: set Student,\n departmentLibrarian: one Librarian\n}\n\nsig Library{\n contains :some Book,\n incharge: some Librarian\n}\n\n// Membership\nsig Membership{\n belongsTo: set Student,\n validTill : one Date\n}\n\n//Date\nsig Date{\n day: Int,\n month: Int,\n Year: Int\n}\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.hasMembership implies no student.borrowedBooks\n}\n\n// Borrowed books are not available for borrowingBorrowed books are not available for borrowing\n// fact borrowedBooksAreNotAvailableForBorrowing{\n// all book : Book | some student :Student | book in student.borrowedBooks implies book.availability = 0\n// }\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "faucet-pronto-denial-decree", "time": "2023-12-05 19:16:35.202105", "cmd": 2} {"id": 8161, "parent": 8160, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nabstract sig Person{\n memberOfDepartment: set Department,\n id : Int\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n hasMembership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n supervises: set Student \n}\n\n// Book\nsig Book {\n inLibrary : one Library,\n checkOutBy: set Student\n}\n\n// Department\nsig Department {\n associatedStudents: set Student,\n departmentLibrarian: one Librarian\n}\n\nsig Library{\n contains :some Book,\n incharge: some Librarian\n}\n\n// Membership\nsig Membership{\n belongsTo: set Student,\n validTill : one Date\n}\n\n//Date\nsig Date{\n day: Int,\n month: Int,\n Year: Int\n}\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.hasMembership implies no student.borrowedBooks\n}\n\n// fact: Each book can be checked out by at most one student at a time\nfact bookCheckedOutByAtMostOneStudent {\n all book: Book | #book.checkOutBy <= 1\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "giant-chimp-moaner-smock", "time": "2023-12-05 19:18:35.236142", "cmd": 2} {"id": 8166, "parent": 8163, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nabstract sig Person{\n memberOfDepartment: set Department,\n id : Int\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n hasMembership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n supervises: set Student \n}\n\n// Book\nsig Book {\n inLibrary : one Library,\n checkOutBy: set Student\n}\n\n// Department\nsig Department {\n associatedStudents: set Student,\n departmentLibrarian: one Librarian\n}\n\nsig Library{\n contains :some Book,\n incharge: some Librarian\n}\n\n// Membership\nsig Membership{\n belongsTo: set Student,\n validTill : one Date\n}\n\n//Date\nsig Date{\n day: Int,\n month: Int,\n Year: Int\n}\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.hasMembership implies no student.borrowedBooks\n}\n\n// fact: Each book can be checked out by at most one student at a time\nfact bookCheckedOutByAtMostOneStudent {\n all book: Book | #book.checkOutBy <= 1\n}\n\n// There is only one Library instance\nfact onlyOneLibrary {\n #Library = 1\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "retry-entail-those-quake", "time": "2023-12-05 19:20:05.713367", "cmd": 2} {"id": 8167, "parent": 8166, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nabstract sig Person{\n memberOfDepartment: set Department,\n id : Int\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n hasMembership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n supervises: set Student \n}\n\n// Book\nsig Book {\n inLibrary : one Library,\n checkOutBy: set Student\n}\n\n// Department\nsig Department {\n associatedStudents: set Student,\n departmentLibrarian: one Librarian\n}\n\nsig Library{\n contains :some Book,\n incharge: some Librarian\n}\n\n// Membership\nsig Membership{\n belongsTo: set Student,\n validTill : one Date\n}\n\n//Date\nsig Date{\n day: Int,\n month: Int,\n Year: Int\n}\n\n// Facts\n// A student without membership can not borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.hasMembership implies no student.borrowedBooks\n}\n\n// fact: Each book can be checked out by at most one student at a time\nfact bookCheckedOutByAtMostOneStudent {\n all book: Book | #book.checkOutBy <= 1\n}\n\n// There is only one Library instance\nfact onlyOneLibrary {\n #Library = 1\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "ranged-prozac-dill-deuce", "time": "2023-12-05 19:20:18.406839", "cmd": 1} {"id": 8169, "parent": 8168, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nabstract sig Person{\n memberOfDepartment: set Department,\n id : Int\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n hasMembership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n supervises: set Student \n}\n\n// Book\nsig Book {\n inLibrary : one Library,\n checkOutBy: set Student\n}\n\n// Department\nsig Department {\n associatedStudents: set Student,\n departmentLibrarian: one Librarian\n}\n\n//Library\nsig Library{\n contains :some Book,\n incharge: some Librarian\n}\n\n// Membership\nsig Membership{\n belongsTo: set Student,\n validTill : one Date\n}\n\n//Date\nsig Date{\n day: Int,\n month: Int,\n Year: Int\n}\n\n// Facts\n// fact: A student without membership cannot borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.hasMembership implies no student.borrowedBooks\n}\n\n// fact: Each book can be checked out by at most one student at a time\nfact bookCheckedOutByAtMostOneStudent {\n all book: Book | #book.checkOutBy <= 1\n}\n\n// fact: There is only one Library instance\nfact onlyOneLibrary {\n #Library = 1\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "stony-detest-raider-fit", "time": "2023-12-05 19:21:18.303103", "cmd": 2} {"id": 8177, "parent": 8169, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nabstract sig Person{\n memberOfDepartment: set Department,\n id : Int\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n hasMembership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n supervises: set Student \n}\n\n// Book\nsig Book {\n inLibrary : one Library,\n checkOutBy: set Student\n}\n\n// Department\nsig Department {\n associatedStudents: set Student,\n departmentLibrarian: one Librarian\n}\n\n//Library\nsig Library{\n contains :some Book,\n incharge: some Librarian\n}\n\n// Membership\nsig Membership{\n belongsTo: set Student,\n validTill : one Date\n}\n\n//Date\nsig Date{\n day: Int,\n month: Int,\n Year: Int\n}\n\n// Facts\n// fact: A student without membership cannot borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.hasMembership implies no student.borrowedBooks\n}\n\n// fact: Each book can be checked out by at most one student at a time\nfact bookCheckedOutByAtMostOneStudent {\n all book: Book | #book.checkOutBy <= 1\n}\n\n// fact: There is only one Library instance\nfact onlyOneLibrary {\n #Library = 1\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "sake-mulch-causal-fondue", "time": "2023-12-05 19:23:17.922367", "cmd": 1} {"id": 8207, "parent": 8153, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n// Signatures\nabstract sig User {\n userId: Int,\n username: String\n}\n\nsig Admin extends User {\n // Additional fields for Admin\n isAdmin: Bool\n}\n\nsig Post {\n postId: Int,\n content: String,\n author: User\n}\n\nsig Comment {\n commentId: Int,\n text: String,\n author: User,\n onPost: Post\n}\n\nsig Like {\n likeId: Int,\n byUser: User,\n onPost: Post\n}\n\n// Facts\nfact UniqueUserIds {\n // Ensure user IDs are unique\n all u1, u2: User | u1 != u2 implies u1.userId != u2.userId\n}\n\nfact OneAdmin {\n // Ensure there is at least one admin\n some a: Admin | a.isAdmin = true\n}\n\n// Predicates\npred userLikesPost[u: User, p: Post] {\n some l: Like | l.byUser = u and l.onPost = p\n}\n\npred postHasComments[p: Post] {\n some c: Comment | c.onPost = p\n}\n\n// Run commands\nrun unsatisfiableExample {\n // Specify a condition that is unsatisfiable\n no u: User | u.userId > 10\n}\n\nrun satisfiableExample for 2 {\n // Specify a condition that is satisfiable\n some u: User | u.userId < 5\n}\n\n\n\nrun {}", "permalink": "wavy-saved-oboe-quill", "time": "2023-12-05 21:40:01.981592", "cmd": 1} {"id": 8210, "parent": 8207, "code": "// Signatures\nabstract sig User {\n userId: Int,\n username: String\n}\n\nsig Admin extends User {\n // Additional fields for Admin\n isAdmin: Bool\n}\n\nsig Post {\n postId: Int,\n content: String,\n author: User\n}\n\nsig Comment {\n commentId: Int,\n text: String,\n author: User,\n onPost: Post\n}\n\nsig Like {\n likeId: Int,\n byUser: User,\n onPost: Post\n}\n\n// Facts\nfact UniqueUserIds {\n // Ensure user IDs are unique\n all u1, u2: User | u1 != u2 implies u1.userId != u2.userId\n}\n\nfact OneAdmin {\n // Ensure there is at least one admin\n some a: Admin | a.isAdmin = true\n}\n\n// Predicates\npred userLikesPost[u: User, p: Post] {\n some l: Like | l.byUser = u and l.onPost = p\n}\n\npred postHasComments[p: Post] {\n some c: Comment | c.onPost = p\n}\n\n// Run commands\nrun unsatisfiableExample {\n // Specify a condition that is unsatisfiable\n no u: User | u.userId > 10\n}\n\nrun satisfiableExample for 2 {\n // Specify a condition that is satisfiable\n some u: User | u.userId < 5\n}\n\nrun{}", "permalink": "posing-judge-undone-raisin", "time": "2023-12-05 21:44:18.865334", "cmd": 1} {"id": 8215, "parent": 8198, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\nabstract sig Person {}\nsig Student, Professor extends Person {}\nsig Class {\ninstructor: one Professor,\nassistant: set Student}\nsig Assignment {\nassociated_with: set Class,\nassigned_to: some Student}\nfact {all a : Assignment | one a.associated_with}\npred PolicyAllowsGrading(p: Person, a: Assignment) {\np in a.associated_with.assistant or p in\na.associated_with.instructor}\nassert NoOneCanGradeTheirOwnAssignment {\nall p : Person, a : Assignment |\nPolicyAllowsGrading[p, a] implies not p in a.assigned_to}\ncheck NoOneCanGradeTheirOwnAssignment for 2\n\nrun {}", "permalink": "system-sworn-dimmed-unhook", "time": "2023-12-05 22:47:40.818104", "cmd": 1} {"id": 8227, "parent": 8226, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// Signatures\nsig User {\n username: String,\n email: String\n}\n\nabstract sig Product {\n productId: Int,\n name: String,\n price: Int,\n seller: User\n}\n\nsig ElectronicProduct extends Product {\n brand: String,\n warrantyPeriod: Int\n}\n\nsig ClothingProduct extends Product {\n size: String,\n brand: String\n}\n\nsig Transaction {\n transactionId: Int,\n buyer: User,\n seller: User,\n product: Product\n}\n\nsig Feedback {\n feedbackId: Int,\n rating: Int,\n comment: String,\n user: User\n}\n\n// Fields\nfact uniqueUsernames {\n all u1, u2: User | u1 != u2 implies u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all t1, t2: Transaction | t1 != t2 implies t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all f1, f2: Feedback | f1 != f2 implies f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is intentionally unsatisfiable for demonstration purposes\n some u: User | no p: Product | validTransaction[some t: Transaction | t.buyer = u]\n}\n\nrun satisfiableExample {\n // This command is designed to be satisfiable\n some t: Transaction | validTransaction[t] and positiveFeedback[some f: Feedback | f.user = t.buyer]\n}\n\nrun {}", "permalink": "album-good-driven-uncle", "time": "2023-12-05 23:03:23.098304", "cmd": 3} {"id": 8231, "parent": 8230, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// Signatures\nsig User {\n username: String,\n email: String\n}\n\nabstract sig Product {\n productId: Int,\n name: String,\n price: Int,\n seller: User\n}\n\nsig ElectronicProduct extends Product {\n brand: String,\n warrantyPeriod: Int\n}\n\nsig ClothingProduct extends Product {\n size: String,\n brand: String\n}\n\nsig Transaction {\n transactionId: Int,\n buyer: User,\n seller: User,\n product: Product\n}\n\nsig Feedback {\n feedbackId: Int,\n rating: Int,\n comment: String,\n user: User\n}\n\n// Fields\nfact uniqueUsernames {\n all u1, u2: User | u1 != u2 implies u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all t1, t2: Transaction | t1 != t2 implies t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all f1, f2: Feedback | f1 != f2 implies f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is intentionally unsatisfiable for demonstration purposes\n some u: User | no p: Product | validTransaction[some t: Transaction | t.buyer = u]\n}\n\nrun satisfiableExample {\n // This command is designed to be satisfiable\n some t: Transaction | validTransaction[t] and positiveFeedback[some f: Feedback | f.user = t.buyer]\n}\n\nrun {}", "permalink": "stench-shabby-unclog-evil", "time": "2023-12-05 23:06:30.474798", "cmd": 2} {"id": 8235, "parent": 6737, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {all a : Assignment | one a.associated_with}\n\n// Predicate PolicyAllowsGrading defines the policy for allowing grading of an Assignment by a Person.\npred PolicyAllowsGrading(p: Person, a: Assignment) {\n p in a.associated_with.assistant or p in a.associated_with.instructor\n}\n\n// Assert NoOneCanGradeTheirOwnAssignment checks that no Person can grade their own Assignment.\nassert NoOneCanGradeTheirOwnAssignment {\n all p : Person, a : Assignment |\n PolicyAllowsGrading[p, a] implies not p in a.assigned_to\n}\n\ncheck NoOneCanGradeTheirOwnAssignment for 2", "permalink": "upside-mammal-naming-proxy", "time": "2023-12-06 14:07:15.679374", "cmd": 1} {"id": 8241, "parent": 8238, "code": "// Define a simple model\nsig Person {\n name: String,\n age: Int\n}\n\nfact LegalDrivingAge {\n all p: Person | p.age >= 16\n}\n\n// Run command to check if all persons are under 16 years old\nrun underagePersonsExample {\n all p: Person | p.age < 16 and p.age > 18\n}", "permalink": "bamboo-unwind-cannon-lend", "time": "2023-12-06 20:28:45.949120", "cmd": 1} {"id": 8245, "parent": 8244, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// Signatures\nsig User {\n username: String,\n email: String\n}\n\nabstract sig Product {\n productId: Int,\n name: String,\n price: Int,\n seller: User\n}\n\nsig ElectronicProduct extends Product {\n brand: String,\n warrantyPeriod: Int\n}\n\nsig ClothingProduct extends Product {\n size: String,\n brand: String\n}\n\nsig Transaction {\n transactionId: Int,\n buyer: User,\n seller: User,\n product: Product\n}\n\nsig Feedback {\n feedbackId: Int,\n rating: Int,\n comment: String,\n user: User\n}\n\n// Fields\nfact uniqueUsernames {\n all u1, u2: User | u1 != u2 implies u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all t1, t2: Transaction | t1 != t2 implies t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all f1, f2: Feedback | f1 != f2 implies f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is intentionally unsatisfiable for demonstration purposes\n some u: User | no p: Product | validTransaction[some t: Transaction | t.buyer = u]\n}\n\nrun satisfiableExample {\n // This command is designed to be satisfiable\n some t: Transaction | validTransaction[t] and positiveFeedback[some f: Feedback | f.user = t.buyer]\n}\n\n// run {}", "permalink": "uneasy-gluten-ducky-phrase", "time": "2023-12-06 20:43:39.136061", "cmd": 1} {"id": 8252, "parent": 8251, "code": "// Signatures\nsig User {\n username: String,\n email: String\n}\n\nabstract sig Product {\n productId: Int,\n name: String,\n price: Int,\n seller: User\n}\n\nsig ElectronicProduct extends Product {\n brand: String,\n warrantyPeriod: Int\n}\n\nsig ClothingProduct extends Product {\n size: String,\n brand: String\n}\n\nsig Transaction {\n transactionId: Int,\n buyer: User,\n seller: User,\n product: Product\n}\n\nsig Feedback {\n feedbackId: Int,\n rating: Int,\n comment: String,\n user: User\n}\n\n// Fields\nfact uniqueUsernames {\n all u1, u2: User | u1 != u2 implies u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all t1, t2: Transaction | t1 != t2 implies t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all f1, f2: Feedback | f1 != f2 implies f1.feedbackId != f2.feedbackId\n}\n\n// Inconsistent Fact\nfact inconsistentProductId {\n all p: Product | p.productId = p.productId and p.productId != p.productId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Command\nrun inconsistentExample {\n // This command checks for consistency\n all p: Product | p.productId = p.productId and p.productId != p.productId\n}", "permalink": "blog-mutt-paver-elude", "time": "2023-12-06 21:16:25.822468", "cmd": 1} {"id": 8291, "parent": 8290, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // There exists a person x such that x killed Agatha\n some x: Person | x in Agatha.killed\n\n // If someone x killed someone y, then x hates y and x is not richer than y\n all x, y: Person |\n (x in y.killed => x in y.hates and no x' | x' in y.richer)\n\n all x: Person | (Agatha.hates[x] implies no Charles.hates[x])\n Agatha.hates[Agatha] and Agatha.hates[Charles]\n all x: Person | (no x.richer[Agatha] implies Butler.hates[x])\n all x: Person | (Agatha.hates[x] implies Butler.hates[x])\n all x: Person | some y: Person | no x.hates[y]\n}\n\nrun puzzle", "permalink": "backup-banter-royal-armed", "time": "2023-12-07 12:26:32.757489", "cmd": 1} {"id": 8292, "parent": 8291, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // There exists a person x such that x killed Agatha\n some x: Person | x in Agatha.killed\n\n // If someone x killed someone y, then x hates y and x is not richer than y\n all x, y: Person |\n (x in y.killed => x in y.hates and no x' | x' in y.richer)\n\n all x: Person | (Agatha.hates[x] implies no Charles.hates[x])\n Agatha.hates[Agatha] and Agatha.hates[Charles]\n all x: Person | (no x.richer[Agatha] implies Butler.hates[x])\n all x: Person | (Agatha.hates[x] implies Butler.hates[x])\n all x: Person | some y: Person | not (x in y.hates) // Corrected the line\n}\n\nrun puzzle", "permalink": "subway-recast-dab-sheet", "time": "2023-12-07 12:27:18.653923", "cmd": 1} {"id": 8293, "parent": 8292, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // There exists a person x such that x killed Agatha\n some x: Person | x in Agatha.killed\n\n // If someone x killed someone y, then x hates y and x is not richer than y\n all x, y: Person |\n (x in y.killed => x in y.hates and no x' | x' in y.richer)\n\n all x: Person | (Agatha.hates[x] implies no Charles.hates[x])\n Agatha.hates[Agatha] and Agatha.hates[Charles]\n all x: Person | (no x.richer[Agatha] implies Butler.hates[x])\n all x: Person | (Agatha.hates[x] implies Butler.hates[x])\n all x: Person | some y: Person | not (x in y.hates) // Corrected the line\n}\n\nrun puzzle", "permalink": "clammy-blurry-squint-portal", "time": "2023-12-07 12:28:03.258860", "cmd": 1} {"id": 8320, "parent": 8319, "code": "// Library Model\n\n// Signatures\nabstract sig Person {\n pid: Int,\n name: String\n}\n\nsig Author extends Person {\n booksAuthored: set Book\n}\n\nsig Patron extends Person {\n borrowedBooks: set Book\n}\n\nsig LibraryStaff extends Person {\n staffID: Int\n}\n\nsig Book {\n bookID: Int,\n title: String,\n author: Author,\n available: Int // Use integer to represent boolean (0 for false, 1 for true)\n}\n\n// Inheritance\nsig Librarian extends LibraryStaff {}\n\n// Facts\nfact uniqueIDs {\n all p: Person | no q: Person | p != q and p.pid = q.pid\n}\n\nfact eachBookHasAuthor {\n all b: Book | one a: Author | b.author = a\n}\n\n// Predicates\npred patronHasBorrowedBook {\n all p: Patron, b: Book | b in p.borrowedBooks\n}\n\npred librarianCanCheckOut {\n all l: Librarian, p: Patron, b: Book | l.staffID = b.bookID and p.pid = l.pid\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is designed to be unsatisfiable\n no p: Patron, b: Book | (b in p.borrowedBooks) and b.available = 1\n}\n\nrun satisfiableExample for 2 but 3 Book, 2 Author, 2 Patron, 1 Librarian {\n // This command is designed to be satisfiable\n some p: Patron, b: Book, a: Author, l: Librarian |\n p.borrowedBooks = b and b.author = a and l.staffID = b.bookID\n}", "permalink": "frail-wife-royal-many", "time": "2023-12-07 13:12:46.413487", "cmd": 2} {"id": 8324, "parent": 8323, "code": "// Library Model\n\n// Signatures\nabstract sig Person {\n pid: Int,\n name: String\n}\n\nsig Author extends Person {\n booksAuthored: set Book\n}\n\nsig Patron extends Person {\n borrowedBooks: set Book\n}\n\nsig LibraryStaff extends Person {\n staffID: Int\n}\n\nsig Book {\n bookID: Int,\n title: String,\n author: Author,\n available: Int // Use integer to represent boolean (0 for false, 1 for true)\n}\n\n// Inheritance\nsig Librarian extends LibraryStaff {}\n\n// Facts\nfact uniqueIDs {\n all p: Person | no q: Person | p != q and p.pid = q.pid\n}\n\nfact eachBookHasAuthor {\n all b: Book | one a: Author | b.author = a\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is designed to be unsatisfiable\n no p: Patron, b: Book | b in p.borrowedBooks and b.available = 1\n}\n\nrun satisfiableExample for 2 but 3 Book, 2 Author, 2 Patron, 1 Librarian {\n // This command is designed to be satisfiable\n some p: Patron, b: Book, a: Author, l: Librarian |\n p.borrowedBooks = b and b.author = a and l.staffID = b.bookID\n}", "permalink": "silly-tamper-stifle-entity", "time": "2023-12-07 13:16:07.825325", "cmd": 2} {"id": 8326, "parent": 8324, "code": "// Library Model\n\n// Signatures\nabstract sig Person {\n pid: Int,\n name: String\n}\n\nsig Author extends Person {\n booksAuthored: set Book\n}\n\nsig Patron extends Person {\n borrowedBooks: set Book\n}\n\nsig LibraryStaff extends Person {\n staffID: Int\n}\n\nsig Book {\n bookID: Int,\n title: String,\n author: Author,\n available: Int // Use integer to represent boolean (0 for false, 1 for true)\n}\n\n// Inheritance\nsig Librarian extends LibraryStaff {}\n\n// Facts\nfact uniqueIDs {\n all p: Person | no q: Person | p != q and p.pid = q.pid\n}\n\nfact eachBookHasAuthor {\n all b: Book | one a: Author | b.author = a\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is designed to be unsatisfiable\n no p: Patron, b: Book | b in p.borrowedBooks and b.available = 1\n}\n\nrun satisfiableExample for 2 but 3 Book, 2 Author, 2 Patron, 1 Librarian {\n // This command is designed to be satisfiable\n some p: Patron, b: Book, a: Author, l: Librarian |\n p.borrowedBooks = b and b.author = a and l.staffID = b.bookID\n}", "permalink": "legend-afar-drool-studio", "time": "2023-12-07 13:16:16.921952", "cmd": 2} {"id": 8328, "parent": 8326, "code": "// Library Model\n\n// Signatures\nabstract sig Person {\n pid: Int,\n name: String\n}\n\nsig Author extends Person {\n booksAuthored: set Book\n}\n\nsig Patron extends Person {\n borrowedBooks: set Book\n}\n\nsig LibraryStaff extends Person {\n staffID: Int\n}\n\nsig Book {\n bookID: Int,\n title: String,\n author: Author,\n available: lone Patron // Book is available if no patron has borrowed it\n}\n\n// Inheritance\nsig Librarian extends LibraryStaff {}\n\n// Facts\nfact uniqueIDs {\n all p: Person | no q: Person | p != q and p.pid = q.pid\n}\n\nfact eachBookHasAuthor {\n all b: Book | one a: Author | b.author = a\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is designed to be unsatisfiable\n no p: Patron, b: Book | b in p.borrowedBooks and b.available != none\n}\n\nrun satisfiableExample for 2 but 3 Book, 2 Author, 2 Patron, 1 Librarian {\n // This command is designed to be satisfiable\n some p: Patron, b: Book, a: Author, l: Librarian |\n p.borrowedBooks = b and b.author = a and l.staffID = b.bookID\n}", "permalink": "dairy-nerd-raven-rental", "time": "2023-12-07 13:17:25.274318", "cmd": 1} {"id": 8353, "parent": 8352, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\n\npred puzzle {\n some x: Person | Agatha in x.killed\n all x, y: Person | (y in x.killed) => ((y in x.hates) && !(y in x.richer) )\n all x: Person | x in Agatha.hates => !(x in Charles.hates)\n Agatha in Agatha.hates && Charles in Agatha.hates\n all x : Person | !(Agatha in x.richer) => x in Butler.hates\n all x : Person | x in Agatha.hates => x in Butler.hates\n all x: Person | some y :Person | !(y in x.hates)\n}\n\nrun puzzle", "permalink": "macaw-surely-unworn-shady", "time": "2023-12-07 15:37:07.113702", "cmd": 1} {"id": 8354, "parent": null, "code": "// Social Networking Alloy Model\n\n// Signatures\nabstract sig User {\n userId: Int,\n username: String\n}\n\nsig RegularUser extends User {\n email: String\n}\n\nsig AdminUser extends User {\n adminLevel: Int\n}\n\nsig Post {\n postId: Int,\n content: String,\n timestamp: Int\n}\n\nsig Like {\n likeId: Int,\n user: User,\n post: Post\n}\n\n// Fields\nfact uniqueUserId {\n all disj u1, u2: User | u1.userId != u2.userId\n}\n\nfact uniquePostId {\n all disj p1, p2: Post | p1.postId != p2.postId\n}\n\n// Inheritance\nfact adminInheritance {\n all u: AdminUser | u in User\n}\n\n// Facts\nfact likeConsistency {\n all l: Like | l.user in User and l.post in Post\n}\n\nfact postsByRegularUsers {\n all p: Post, u: RegularUser | p in u.post\n}\n\n// Predicates\npred userLikesPost[u: User, p: Post] {\n some l: Like | l.user = u and l.post = p\n}\n\npred popularPost[p: Post] {\n some u: User | userLikesPost[u, p] and some v: User | userLikesPost[v, p] and u != v\n}\n\n// Run commands\nrun unsatisfiableExample {\n // This run command should be unsatisfiable\n // Add constraints that make the model unsatisfiable\n no u: User | u in RegularUser and u in AdminUser\n}\n\nrun satisfiableExample for 3 {\n // This run command should be satisfiable\n // Adjust the bound as needed\n some p: Post, u: RegularUser | userLikesPost[u, p] and popularPost[p]\n}\n", "permalink": "imply-acre-macaw-demote", "time": "2023-12-07 16:48:33.870927", "cmd": 1} {"id": 8359, "parent": 8358, "code": "// Social Networking Alloy Model\n\n// Signatures\nabstract sig User { userId: Int, username: String }\n\nsig RegularUser extends User { email: String }\n\nsig AdminUser extends User { adminLevel: Int }\n\nsig Post { postId: Int, content: String, timestamp: Int }\n\nsig Like { likeId: Int, user: User, post: Post }\n\n// Fields\nfact uniqueUserId {\n all disj u1, u2: User | u1.userId != u2.userId\n}\n\nfact uniquePostId { all disj p1, p2: Post | p1.postId != p2.postId }\n\n// Inheritance\nfact adminInheritance { all u: AdminUser | u in User }\n\n// Facts\nfact likeConsistency { all l: Like | l.user in User and l.post in Post }\n\nfact postsByRegularUsers {\n all p: Post, u: RegularUser | some l: Like | l.user = u and l.post = p }\n\n// Predicates\npred userLikesPost[u: User, p: Post] {\n some l: Like | l.user = u and l.post = p\n}\n\npred popularPost[p: Post] {\n some u1, u2: User | userLikesPost[u1, p] and userLikesPost[u2, p] and u1 != u2\n}\n\n// Run commands\nrun unsatisfiableExample {\n // This run command should be unsatisfiable\n // Add constraints that make the model unsatisfiable\n no u: User | u in RegularUser and u in AdminUser\n}\n\nrun satisfiableExample for 3 {\n // This run command should be satisfiable\n // Adjust the bound as needed\n some p: Post, u: RegularUser | userLikesPost[u, p] and popularPost[p]\n}", "permalink": "lung-snuff-riches-paving", "time": "2023-12-07 16:55:21.133728", "cmd": 2} {"id": 8361, "parent": 8250, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// Signatures\nsig User {\n username: String,\n email: String\n}\n\nabstract sig Product {\n productId: Int,\n name: String,\n price: Int,\n seller: User\n}\n\nsig ElectronicProduct extends Product {\n brand: String,\n warrantyPeriod: Int\n}\n\nsig ClothingProduct extends Product {\n size: String,\n brand: String\n}\n\nsig Transaction {\n transactionId: Int,\n buyer: User,\n seller: User,\n product: Product\n}\n\nsig Feedback {\n feedbackId: Int,\n rating: Int,\n comment: String,\n user: User\n}\n\n// Fields\nfact uniqueUsernames {\n all u1, u2: User | u1 != u2 implies u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all t1, t2: Transaction | t1 != t2 implies t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all f1, f2: Feedback | f1 != f2 implies f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is intentionally unsatisfiable for demonstration purposes\n all p1, p2: Product | p1 = p2 implies p1.productId = p2.productId\n}\n\nrun satisfiableExample {\n // This command is designed to be satisfiable\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\n// run {} for 3", "permalink": "ride-finite-rinse-fetal", "time": "2023-12-07 17:05:16.431984", "cmd": 1} {"id": 8363, "parent": 8362, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// Signatures\nsig User {\n username: String,\n email: String\n}\n\nabstract sig Product {\n productId: Int,\n name: String,\n price: Int,\n seller: User\n}\n\nsig ElectronicProduct extends Product {\n brand: String,\n warrantyPeriod: Int\n}\n\nsig ClothingProduct extends Product {\n size: String,\n brand: String\n}\n\nsig Transaction {\n transactionId: Int,\n buyer: User,\n seller: User,\n product: Product\n}\n\nsig Feedback {\n feedbackId: Int,\n rating: Int,\n comment: String,\n user: User\n}\n\n// Fields\nfact uniqueUsernames {\n all u1, u2: User | u1 != u2 implies u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all t1, t2: Transaction | t1 != t2 implies t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all f1, f2: Feedback | f1 != f2 implies f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is intentionally unsatisfiable for demonstration purposes\n all p1, p2: Product | p1 = p2 implies p1.productId = p2.productId\n}\n\nrun satisfiableExample {\n // This command is designed to be satisfiable\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\n// run {} for 3", "permalink": "mooned-boil-catchy-widely", "time": "2023-12-07 17:05:28.343927", "cmd": 3} {"id": 8370, "parent": 8369, "code": "// Music Festival Alloy Model\n\n// Signatures\nabstract sig Person { pid: Int, name: String }\n\nsig Artist extends Person { genre: String }\n\nsig Attendee extends Person { ticketId: Int }\n\nsig Stage { stageId: Int, name: String, capacity: Int }\n\nsig Organizer extends Person { role: String }\n\n// Fields\nfact uniquePersonId {\n all disj p1, p2: Person | p1.pid != p2.pid\n}\n\nfact uniqueStageId {\n all disj st1, st2: Stage | st1.stageId != st2.stageId\n}\n\n// Inheritance\nfact artistInheritance { all a: Artist | a in Person }\n\n// Facts\nfact artistsPerformOnDifferentStages {\n all disj a1, a2: Artist, s1, s2: Stage |\n (a1 != a2 and s1 != s2) implies a1.performanceStage != s2\n}\n\nfact organizersHaveUniqueRoles {\n all disj o1, o2: Organizer | o1 != o2 implies o1.role != o2.role\n}\n\n// Predicates\npred attendeeBuysTicket[a: Attendee] {\n some f: Stage | a in f.attendees\n}\n\npred artistPerformsOnStage[a: Artist, s: Stage] {\n a.performanceStage = s\n}\n\n// Run commands\nrun unsatisfiableExample {\n // This run command should be unsatisfiable\n // Add constraints that make the model unsatisfiable\n no s: Stage, a: Artist | s.capacity < #a.artistPerformance\n}\n\nrun satisfiableExample {\n // This run command should be satisfiable\n // Adjust the bound as needed\n some a: Artist, s: Stage | artistPerformsOnStage[a, s] and attendeeBuysTicket[s.attendees]\n}", "permalink": "portly-armory-grout-fang", "time": "2023-12-07 17:29:59.906724", "cmd": 1} {"id": 8371, "parent": 8370, "code": "// Music Festival Alloy Model\n\n// Signatures\nabstract sig Person { pid: Int, name: String }\n\nsig Artist extends Person { genre: String }\n\nsig Attendee extends Person { ticketId: Int }\n\nsig Stage { stageId: Int, name: String, capacity: Int }\n\nsig Organizer extends Person { role: String }\n\n// Fields\nfact uniquePersonId {\n all disj p1, p2: Person | p1.pid != p2.pid\n}\n\nfact uniqueStageId {\n all disj st1, st2: Stage | st1.stageId != st2.stageId\n}\n\n// Inheritance\nfact artistInheritance { all a: Artist | a in Person }\n\n// Facts\nfact artistsPerformOnDifferentStages {\n all disj a1, a2: Artist, s1, s2: Stage |\n (a1 != a2 and s1 != s2) implies a1.performanceStage != s2\n}\n\nfact organizersHaveUniqueRoles {\n all disj o1, o2: Organizer | o1 != o2 implies o1.role != o2.role\n}\n\n// Predicates\npred attendeeBuysTicket[a: Attendee] {\n some f: Stage | a in f.attendees\n}\n\npred artistPerformsOnStage[a: Artist, s: Stage] {\n a.performanceStage = s\n}\n\n// Run commands\nrun unsatisfiableExample {\n // This run command should be unsatisfiable\n // Add constraints that make the model unsatisfiable\n no s: Stage, a: Artist | s.capacity < #a.artistPerformance\n}\n\nrun satisfiableExample {\n // This run command should be satisfiable\n // Adjust the bound as needed\n some a: Artist, s: Stage | artistPerformsOnStage[a, s] and attendeeBuysTicket[s.attendees]\n}", "permalink": "donor-blame-erupt-police", "time": "2023-12-07 17:30:04.439049", "cmd": 2} {"id": 8372, "parent": 8371, "code": "// Music Festival Alloy Model\n\n// Signatures\nabstract sig Person { pid: Int, name: String }\n\nsig Artist extends Person { genre: String }\n\nsig Attendee extends Person { ticketId: Int }\n\nsig Stage { stageId: Int, name: String, capacity: Int }\n\nsig Organizer extends Person { role: String }\n\n// Fields\nfact uniquePersonId {\n all disj p1, p2: Person | p1.pid != p2.pid\n}\n\nfact uniqueStageId {\n all disj st1, st2: Stage | st1.stageId != st2.stageId\n}\n\n// Inheritance\nfact artistInheritance { all a: Artist | a in Person }\n\n// Facts\nfact artistsPerformOnDifferentStages {\n all disj a1, a2: Artist, s1, s2: Stage |\n (a1 != a2 and s1 != s2) implies a1.performanceStage != s2\n}\n\nfact organizersHaveUniqueRoles {\n all disj o1, o2: Organizer | o1 != o2 implies o1.role != o2.role\n}\n\n// Predicates\npred attendeeBuysTicket[a: Attendee] {\n some f: Stage | a in f.Attendees\n}\n\npred artistPerformsOnStage[a: Artist, s: Stage] {\n a.performanceStage = s\n}\n\n// Run commands\nrun unsatisfiableExample {\n // This run command should be unsatisfiable\n // Add constraints that make the model unsatisfiable\n no s: Stage, a: Artist | s.capacity < #a.artistPerformance\n}\n\nrun satisfiableExample {\n // This run command should be satisfiable\n // Adjust the bound as needed\n some a: Artist, s: Stage | artistPerformsOnStage[a, s] and attendeeBuysTicket[s.attendees]\n}", "permalink": "mower-cheese-these-chatty", "time": "2023-12-07 17:30:19.750594", "cmd": 2} {"id": 8620, "parent": 8618, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n all f: Trash | no f.link\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n //or some f.link in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | not p in Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n no disj f1, f2: File | f1.link & f2.link = none\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f1, f2: File | f1.link & f2.link = none\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | l in Trash implies f in Trash\n}\n\nrun inv10", "permalink": "cloak-worst-gladly-quit", "time": "2023-12-07 23:25:13.387396", "cmd": 10} {"id": 8323, "parent": 8321, "code": "// Library Model\n\n// Signatures\nabstract sig Person {\n pid: Int,\n name: String\n}\n\nsig Author extends Person {\n booksAuthored: set Book\n}\n\nsig Patron extends Person {\n borrowedBooks: set Book\n}\n\nsig LibraryStaff extends Person {\n staffID: Int\n}\n\nsig Book {\n bookID: Int,\n title: String,\n author: Author,\n available: Int // Use integer to represent boolean (0 for false, 1 for true)\n}\n\n// Inheritance\nsig Librarian extends LibraryStaff {}\n\n// Facts\nfact uniqueIDs {\n all p: Person | no q: Person | p != q and p.pid = q.pid\n}\n\nfact eachBookHasAuthor {\n all b: Book | one a: Author | b.author = a\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is designed to be unsatisfiable\n no p: Patron, b: Book | b in p.borrowedBooks and b.available = 1\n}\n\nrun satisfiableExample for 2 but 3 Book, 2 Author, 2 Patron, 1 Librarian {\n // This command is designed to be satisfiable\n some p: Patron, b: Book, a: Author, l: Librarian |\n p.borrowedBooks = b and b.author = a and l.staffID = b.bookID\n}", "permalink": "duller-august-vision-domain", "time": "2023-12-07 13:16:01.929098", "cmd": 1} {"id": 8331, "parent": 8330, "code": "// Library Model\n\n// Signatures\nabstract sig Person {\n pid: Int,\n name: String\n}\n\nsig Author extends Person {\n booksAuthored: set Book\n}\n\nsig Patron extends Person {\n borrowedBooks: set Book\n}\n\nsig LibraryStaff extends Person {\n staffID: Int\n}\n\nsig Book {\n bookID: Int,\n title: String,\n author: Author,\n borrowed: set Patron\n}\n\n// Inheritance\nsig Librarian extends LibraryStaff {}\n\n// Facts\nfact uniqueIDs {\n all p: Person | no q: Person | p != q and p.pid = q.pid\n}\n\nfact eachBookHasAuthor {\n all b: Book | one a: Author | b.author = a\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is designed to be unsatisfiable\n no p: Patron, b: Book | b in p.borrowed and b in b.borrowed\n}\n\nrun satisfiableExample for 2 but 3 Book, 2 Author, 2 Patron, 1 Librarian {\n // This command is designed to be satisfiable\n some p: Patron, b: Book, a: Author, l: Librarian |\n p.borrowed = b and b.author = a and l.staffID = b.bookID\n}", "permalink": "husked-dimmer-treble-marrow", "time": "2023-12-07 13:19:25.666384", "cmd": 1} {"id": 8345, "parent": 7069, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n some x: Person | killed(x,Agatha)\n}\n\nrun puzzle", "permalink": "cover-hazily-paving-sister", "time": "2023-12-07 15:05:16.849637", "cmd": 1} {"id": 8348, "parent": 8347, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\nfact KillingRelation {\n // There exists a person x who killed Agatha\n some x: Person | Agatha in x.killed\n}\n\npred puzzle {\n KillingRelation\n all x : Person, y:Person | KillingRelation\n}\n\nrun puzzle", "permalink": "buddy-waving-scope-edgy", "time": "2023-12-07 15:10:18.742958", "cmd": 1} {"id": 8350, "parent": 8349, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\n\npred puzzle {\n some x: Person | Agatha in x.killed\n all x, y: Person | (x in y.killed) => ((y in x.hates) && !(y in x.richer) )\n all x: Person | x in Agatha.hates => !(x in Charles.hates)\n Agatha in Agatha.hates && Charles in Agatha.hates\n all x : Person | not Agatha in x.hates => x in Butler.hates\n all x : Person | x in Agatha.hates => x in Butler.hates\n all x: Person | some y :Person | not y in x.hates\n}\n\nrun puzzle", "permalink": "clamp-narrow-donut-wildly", "time": "2023-12-07 15:24:39.212053", "cmd": 1} {"id": 8369, "parent": 8368, "code": "// Music Festival Alloy Model\n\n// Signatures\nabstract sig Person { pid: Int, name: String }\n\nsig Artist extends Person { genre: String }\n\nsig Attendee extends Person { ticketId: Int }\n\nsig Stage { stageId: Int, name: String, capacity: Int }\n\nsig Organizer extends Person { role: String }\n\n// Fields\nfact uniquePersonId {\n all disj p1, p2: Person | p1.pid != p2.pid\n}\n\nfact uniqueStageId {\n all disj st1, st2: Stage | st1.stageId != st2.stageId\n}\n\n// Inheritance\nfact artistInheritance { all a: Artist | a in Person }\n\n// Facts\nfact artistsPerformOnDifferentStages {\n all disj a1, a2: Artist, s1, s2: Stage |\n (a1 != a2 and s1 != s2) implies a1.performanceStage != s2\n}\n\nfact organizersHaveUniqueRoles {\n all disj o1, o2: Organizer | o1 != o2 implies o1.role != o2.role\n}\n\n// Predicates\npred attendeeBuysTicket[a: Attendee] {\n some f: Stage | a in f.attendees\n}\n\npred artistPerformsOnStage[a: Artist, s: Stage] {\n a.performanceStage = s\n}\n\n// Run commands\nrun unsatisfiableExample {\n // This run command should be unsatisfiable\n // Add constraints that make the model unsatisfiable\n no s: Stage, a: Artist | s.capacity < #a.artistPerformance\n}\n\nrun satisfiableExample for 2 {\n // This run command should be satisfiable\n // Adjust the bound as needed\n some a: Artist, s: Stage | artistPerformsOnStage[a, s] and attendeeBuysTicket[s.attendees]\n}", "permalink": "baton-tartar-dating-tiptop", "time": "2023-12-07 17:24:48.965665", "cmd": 1} {"id": 8385, "parent": 8384, "code": "// Define a simple model\nsig Person {\n name: String,\n age: Int\n}\n\nfact LegalDrivingAge {\n all p: Person | p.age >= 20\n}\n\n// Run command to check if all persons are under 16 years old\nrun underagePersonsExample {\n all p: Person | p in p and p not in p\n}", "permalink": "deploy-fossil-rehab-rash", "time": "2023-12-07 17:58:57.167367", "cmd": 1} {"id": 8388, "parent": 8387, "code": "// Define a simple model\nsig Person {\n name: String,\n age: Int\n}\n\nfact LegalDrivingAge {\n all p: Person | p.age >= 20\n}\n\n// Run command to check if all persons are under 16 years old\nrun underagePersonsExample {\n all p: Person | p.age = -9\n}", "permalink": "trash-tartar-cobalt-dude", "time": "2023-12-07 17:59:57.020652", "cmd": 1} {"id": 8404, "parent": 8393, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n some x: Person | x in Agatha.killed\n all x, y: Person |\n (x in y.killed => x in y.hates and no x' | x' in y.richer)\n all x: Person | (Agatha.hates[x] implies no Charles.hates[x])\n Agatha.hates[Agatha] and Agatha.hates[Charles]\n all x: Person | (no x.richer[Agatha] implies Butler.hates[x])\n all x: Person | (Agatha.hates[x] implies Butler.hates[x])\n all x: Person | some y: Person | not (x in y.hates)\n}\nrun puzzle", "permalink": "remote-send-mowing-hut", "time": "2023-12-07 18:56:53.839956", "cmd": 1} {"id": 8405, "parent": 8404, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n some x: Person | x in Agatha.killed\n all x, y: Person |\n (x in y.killed => x in y.hates and no x' | x' in y.richer)\n all x: Person | (Agatha.hates[x] implies no Charles.hates[x])\n Agatha.hates[Agatha] and Agatha.hates[Charles]\n all x: Person | (no x.richer[Agatha] implies Butler.hates[x])\n all x: Person | (Agatha.hates[x] implies Butler.hates[x])\n all x: Person | some y: Person | not (x in y.hates)\n}\nrun puzzle", "permalink": "urban-jester-rinse-galore", "time": "2023-12-07 18:57:02.105486", "cmd": 1} {"id": 8406, "parent": 7297, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: set File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n all f: Trash | no f.link\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no p.link\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n all f: File, l: f.link | l not in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f: File, l: f.link | some l.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | (l in Trash) implies (f in Trash)\n}\n\nrun inv10", "permalink": "mud-mascot-asleep-cure", "time": "2023-12-07 19:33:57.459090", "cmd": 1} {"id": 8411, "parent": 8410, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: set File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n all f: Trash | no f.link\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no p.link\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n all f: File, l: f.link | l not in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f: File, l: f.link | some l.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | (l in Trash) implies (f in Trash)\n}\n\nrun inv10", "permalink": "onset-clear-sitcom-jigsaw", "time": "2023-12-07 19:43:41.612178", "cmd": 2} {"id": 8415, "parent": 8414, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // Constraint 1\n some x: Person | x in Agatha.killed\n \n // Constraint 2\n all x, y: Person | x.killed = y implies (x.hates = y and not x.richer = y)\n \n // Constraint 3\n all x: Person - Agatha | not x.hates and Agatha implies not x.hates and Charles\n \n // Constraint 4\n Agatha.hates = Agatha + Charles\n \n // Constraint 5\n all x: Person | not x.richer & Agatha implies x.hates & Butler\n \n // Constraint 6\n all x: Person | x.hates & Agatha implies x.hates & Butler\n \n // Constraint 7\n all x: Person | some y: Person | x.hates = y\n \n // Additional Constraints\n no Agatha.hates // Constraint 8\n Agatha != Butler // Constraint 9\n no x: Person | x.hates = x // Constraint 10\n}\n\nrun puzzle for 3", "permalink": "rise-paying-grove-kick", "time": "2023-12-07 20:05:15.297296", "cmd": 1} {"id": 8417, "parent": 8416, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // Constraint 1\n some x: Person | x in Agatha.killed\n \n // Constraint 2\n all x, y: Person | x.killed = y implies (x.hates = y and not x.richer = y)\n \n // Constraint 3\n all x: Agatha | (not x.hates) and Agatha implies (not x.hates) and Charles\n \n // Constraint 4\n Agatha.hates = Agatha + Charles\n \n // Constraint 5\n all x: Person | not x.richer & Agatha implies x.hates & Butler\n \n // Constraint 6\n all x: Person | x.hates & Agatha implies x.hates & Butler\n \n // Constraint 7\n all x: Person | some y: Person | x.hates = y\n \n // Additional Constraints\n no Agatha.hates // Constraint 8\n Agatha != Butler // Constraint 9\n no x: Person | x.hates = x // Constraint 10\n}\n\nrun puzzle for 3", "permalink": "embody-mouse-bogus-venue", "time": "2023-12-07 20:06:43.830738", "cmd": 1} {"id": 8427, "parent": 8426, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // Constraint 1\n some x: Person | x in Agatha.killed\n \n // Constraint 2\n all x, y: Person | x.killed = y implies (x.hates = y and not x.richer = y)\n \n // Constraint 3\n // all x: Person - Agatha | not x.hates and Agatha implies not x.hates and Charles\n \n // Constraint 4\n Agatha.hates = Agatha + Charles\n \n // Constraint 5\n // all x: Person | not x.richer and Agatha implies x.hates and Butler\n \n // Constraint 6\n all x: Person | x.hates and Agatha implies x.hates and Butler\n \n // Constraint 7\n all x: Person | some y: Person | x.hates = y\n \n // Additional Constraints\n no Agatha.hates // Constraint 8\n Agatha != Butler // Constraint 9\n no x: Person | x.hates = x // Constraint 10\n}\n\nrun puzzle for 3", "permalink": "tidal-impose-rocket-judo", "time": "2023-12-07 20:19:18.510466", "cmd": 1} {"id": 8430, "parent": 8429, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // Constraint 1\n some x: Person | x in Agatha.killed\n \n // Constraint 2\n all x, y: Person | (x.killed = y) implies (x.hates = y and not (x.richer = y))\n \n // Constraint 3\n all x: Person - Agatha | not x.hates and Agatha implies not x.hates and Charles\n \n // Constraint 4\n Agatha.hates = Agatha + Charles\n \n // Constraint 5\n // all x: Person | not x.richer and Agatha implies x.hates and Butler\n \n // Constraint 6\n // all x: Person | x.hates and Agatha implies x.hates and Butler\n \n // Constraint 7\n all x: Person | some y: Person | x.hates = y\n \n // Additional Constraints\n no Agatha.hates // Constraint 8\n Agatha != Butler // Constraint 9\n no x: Person | x.hates = x // Constraint 10\n}\n\nrun puzzle for 3", "permalink": "ethics-fame-shush-aspect", "time": "2023-12-07 20:23:41.034438", "cmd": 1} {"id": 8434, "parent": 8433, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: set File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n No protected and Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n all f: File, l: f.link | l not in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f: File, l: f.link | some l.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f in Trash implies all l: f.link | l in Trash\n}\n\nrun inv10", "permalink": "lumber-hunger-blurt-credit", "time": "2023-12-07 20:44:09.040205", "cmd": 1} {"id": 8440, "parent": 8250, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// Signatures\nsig User {\n username: String,\n email: String\n}\n\nabstract sig Product {\n productId: Int,\n name: String,\n price: Int,\n seller: User\n}\n\nsig ElectronicProduct extends Product {\n brand: String,\n warrantyPeriod: Int\n}\n\nsig ClothingProduct extends Product {\n size: String,\n brand: String\n}\n\nsig Transaction {\n transactionId: Int,\n buyer: User,\n seller: User,\n product: Product\n}\n\nsig Feedback {\n feedbackId: Int,\n rating: Int,\n comment: String,\n user: User\n}\n\n// Fields\nfact uniqueUsernames {\n all u1, u2: User | u1 != u2 implies u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all t1, t2: Transaction | t1 != t2 implies t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all f1, f2: Feedback | f1 != f2 implies f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is intentionally unsatisfiable for demonstration purposes\n all p1, p2: Product | p1 != p2 implies p1.productId = p2.productId\n}\n\nrun satisfiableExample {\n // This command is designed to be satisfiable\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\n// run {} for 3", "permalink": "crimp-coil-risk-thesis", "time": "2023-12-07 20:55:05.311150", "cmd": 1} {"id": 8473, "parent": 8472, "code": "// Signatures\nsig User {\n username: lone Username,\n email: lone Email\n}\n\nsig Username, Email {} // Using separate signatures instead of 'String'\n\nabstract sig Product {\n productId: lone ProductID,\n name: lone Name,\n price: lone Int,\n seller: lone User\n}\n\nsig ElectronicProduct extends Product {\n brand: lone Brand,\n warrantyPeriod: lone Int\n}\n\nsig ClothingProduct extends Product {\n size: lone Size,\n brand: lone Brand\n}\n\nsig Transaction {\n transactionId: lone TransactionID,\n buyer: lone User,\n seller: lone User,\n product: lone Product\n}\n\nsig Feedback {\n feedbackId: lone FeedbackID,\n rating: lone Int,\n comment: lone Comment,\n user: lone User\n}\n\nsig ProductID, Name, Brand, Size, TransactionID, FeedbackID, Comment {}\n\n// Basic Integer Type (Alloy has limited support for integers)\nsig Int {}\n\n// Facts\nfact uniqueUsernames {\n all disj u1, u2: User | u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all disj p1, p2: Product | p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all disj t1, t2: Transaction | t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all disj f1, f2: Feedback | f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample for 5 {\n // Intentionally unsatisfiable\n all p: Product | no p.productId\n}\n\nrun satisfiableExample for 5 {\n // Satisfiable\n some p: Product | some p.productId\n}", "permalink": "pledge-paying-uncork-blade", "time": "2023-12-07 21:34:35.960084", "cmd": 2} {"id": 8484, "parent": 8482, "code": "// Basic types for the model\nsig Username, Email, ProductID, TransactionID, FeedbackID, Brand, Size, Comment {}\n\n// User Signature\nsig User {\n username: one Username,\n email: one Email\n}\n\n// Abstract Product Signature\nabstract sig Product {\n productId: one ProductID,\n name: one String,\n price: one Int,\n seller: one User\n}\n\n// Electronic and Clothing Products Inheriting from Product\nsig ElectronicProduct extends Product {\n brand: one Brand,\n warrantyPeriod: one Int\n}\n\nsig ClothingProduct extends Product {\n size: one Size,\n color: one String\n}\n\n// Transaction Signature\nsig Transaction {\n transactionId: one TransactionID,\n buyer: one User,\n seller: one User,\n product: one Product\n}\n\n// Feedback Signature\nsig Feedback {\n feedbackId: one FeedbackID,\n rating: one Int,\n comment: one Comment,\n user: one User\n}\n\n// Facts for uniqueness\n// ...\n\n// Facts\nfact uniqueUsernames {\n no disj u1, u2: User | u1.username = u2.username\n}\n\nfact uniqueProductIds {\n no disj p1, p2: Product | p1.productId = p2.productId\n}\n\nfact uniqueTransactionIds {\n no disj t1, t2: Transaction | t1.transactionId = t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n no disj f1, f2: Feedback | f1.feedbackId = f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample for 5 {\n // Intentionally unsatisfiable\n some p: Product | p.productId = p.productId\n}\n\nrun satisfiableExample for 5 {\n // Satisfiable\n some p: Product | p.productId != p.productId\n}", "permalink": "life-stoop-recast-steam", "time": "2023-12-07 21:41:58.198425", "cmd": 2} {"id": 8485, "parent": 8484, "code": "// Basic types for the model\nsig Username, Email, ProductID, TransactionID, FeedbackID, Brand, Size, Comment {}\n\n// User Signature\nsig User {\n username: one Username,\n email: one Email\n}\n\n// Abstract Product Signature\nabstract sig Product {\n productId: one ProductID,\n name: one String,\n price: one Int,\n seller: one User\n}\n\n// Electronic and Clothing Products Inheriting from Product\nsig ElectronicProduct extends Product {\n brand: one Brand,\n warrantyPeriod: one Int\n}\n\nsig ClothingProduct extends Product {\n size: one Size,\n color: one String\n}\n\n// Transaction Signature\nsig Transaction {\n transactionId: one TransactionID,\n buyer: one User,\n seller: one User,\n product: one Product\n}\n\n// Feedback Signature\nsig Feedback {\n feedbackId: one FeedbackID,\n rating: one Int,\n comment: one Comment,\n user: one User\n}\n\n// Facts for uniqueness\n// ...\n\n// Facts\nfact uniqueUsernames {\n no disj u1, u2: User | u1.username = u2.username\n}\n\nfact uniqueProductIds {\n no disj p1, p2: Product | p1.productId = p2.productId\n}\n\nfact uniqueTransactionIds {\n no disj t1, t2: Transaction | t1.transactionId = t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n no disj f1, f2: Feedback | f1.feedbackId = f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample for 5 {\n // Intentionally unsatisfiable\n some p: Product | p.productId = p.productId\n}\n\nrun satisfiableExample for 5 {\n // Satisfiable\n some p: Product | p.productId != p.productId\n}", "permalink": "thread-celery-ruined-sleek", "time": "2023-12-07 21:42:02.553197", "cmd": 1} {"id": 8497, "parent": 8496, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// Signatures\nsig User {\n username: String,\n email: String\n}\n\nabstract sig Product {\n productId: Int,\n name: String,\n price: Int,\n seller: User\n}\n\nsig ElectronicProduct extends Product {\n brand: String,\n warrantyPeriod: Int\n}\n\nsig ClothingProduct extends Product {\n size: String,\n brand: String\n}\n\nsig Transaction {\n transactionId: Int,\n buyer: User,\n seller: User,\n product: Product\n}\n\nsig Feedback {\n feedbackId: Int,\n rating: Int,\n comment: String,\n user: User\n}\n\n// Fields\nfact uniqueUsernames {\n all u1, u2: User | u1 != u2 implies u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all t1, t2: Transaction | t1 != t2 implies t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all f1, f2: Feedback | f1 != f2 implies f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is intentionally unsatisfiable for demonstration purposes\n all p1, p2: Product | p1 = p2 implies p1.productId = p2.productId\n}\n\nrun satisfiableExample {\n // This command is designed to be satisfiable\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\n// run {} for 3", "permalink": "hanky-uptake-resent-reborn", "time": "2023-12-07 22:04:56.954498", "cmd": 1} {"id": 8511, "parent": 8510, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n some x: Person | Agatha in x.killed \n \n all x,y: Person | \n (y in x.killed) implies \n (y in x.hates and not y in x.richer) \n\n all x: Person | (x in Agatha.hates) implies (not x in Charles.hates) \n\n Agatha in Agatha.hates and Charles in Agatha.hates \n\n all x: Person | (not Agatha in x.richer) implies (x in Butler.hates) \n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates) \n\n all x: Person | some y: Person | (not y in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "musky-study-stunt-shank", "time": "2023-12-07 22:17:19.991158", "cmd": 1} {"id": 8523, "parent": 8522, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\n\nsig Director extends Person {\n hasDirected: some Movie,\n hasWorkedWith: some Actor\n}\n\nsig Actor extends Person {\n hasWorkedWith: some Director and some Actor \n} {\n this not in hasWorkedWith\n}\n\nsig Movie {\n\n}\n\nsig Cast {\n\n}\n\n\nrun {}", "permalink": "fiber-hurray-left-wish", "time": "2023-12-07 22:23:19.629655", "cmd": 1} {"id": 8524, "parent": 8523, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\n\nsig Director extends Person {\n hasDirected: some Movie,\n hasWorkedWith: some Actor\n}\n\nsig Actor extends Person {\n hasWorkedWith: some Director + set Actor \n} {\n this not in hasWorkedWith\n}\n\nsig Movie {\n\n}\n\nsig Cast {\n\n}\n\n\nrun {}", "permalink": "gamma-slaw-reply-yield", "time": "2023-12-07 22:23:56.890674", "cmd": 1} {"id": 8526, "parent": 8524, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\n\nsig Director extends Person {\n hasDirected: some Movie,\n hasWorkedWith: some Actor\n}\n\nsig Actor extends Person {\n hasWorkedWith: {some Director + set Actor} \n} {\n this not in hasWorkedWith\n}\n\nsig Movie {\n\n}\n\nsig Cast {\n\n}\n\n\nrun {}", "permalink": "elated-pleat-circle-bunny", "time": "2023-12-07 22:24:33.678510", "cmd": 1} {"id": 8537, "parent": 8534, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n\n //Formula 1\n some x: Person | x in Agatha.killed\n\n //Formula 2\n all x, y: Person |\n (x in y.killed implies x in y.hates and not x in y.richer)\n\n //Formula 3\n all x: Person | \n (Agatha in x.hates implies not Charles in x.hates)\n\n //Formula 4\n Agatha in Agatha.hates and Agatha in Charles.hates\n\n //Formula 5\n all x: Person | \n (not x in Agatha.richer implies Butler in x.hates)\n\n //Formula 6\n all x: Person | \n (Agatha in x.hates implies Butler in x.hates)\n\n //Formula 7\n all x: Person | some y: Person | not (x in y.hates)\n}\nrun puzzle", "permalink": "prize-jumble-claim-plaza", "time": "2023-12-07 22:30:34.956681", "cmd": 1} {"id": 8541, "parent": 8540, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: lone File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or (some f.link and f.link in Trash)\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no p.link in Trash \n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash)\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no File.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv10\n\n/* No unprotected file should exist outside of Trash. */\npred inv11 {\n all f: File - Protected | f not in Trash\n}\n\nrun inv11\n\n/* If a link is deleted, the target should be deleted too. */\npred inv12 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv12\n\n/* A linked file should not be in trash. */\npred inv13 {\n no f: File | f.link in Trash and f in Trash\n}\n\nrun inv13", "permalink": "arrive-slicer-clutch-bubble", "time": "2023-12-07 22:33:48.080295", "cmd": 1} {"id": 8543, "parent": 8541, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: lone File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or (some f.link and f.link in Trash)\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\n// pred inv4 {\n// all p: Protected | no p.link in Trash \n// }\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash)\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no File.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv10\n\n/* No unprotected file should exist outside of Trash. */\npred inv11 {\n all f: File - Protected | f not in Trash\n}\n\nrun inv11\n\n/* If a link is deleted, the target should be deleted too. */\npred inv12 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv12\n\n/* A linked file should not be in trash. */\npred inv13 {\n no f: File | f.link in Trash and f in Trash\n}\n\nrun inv13", "permalink": "jumbo-portly-little-canary", "time": "2023-12-07 22:34:51.075433", "cmd": 1} {"id": 8550, "parent": 8395, "code": "// University Model\n\n// Signatures\nabstract sig Person {\n name: String,\n age: Int\n}\n\nsig Student extends Person {\n studentID: Int,\n major: String\n}\n\nsig Professor extends Person {\n staffID: Int,\n department: String\n}\n\nsig Course {\n courseCode: String,\n credits: Int\n}\n\nsig Classroom {\n roomNumber: Int,\n capacity: Int\n}\n\n// Inheritance\nfact StudentsArePeople {\n all s: Student | s in Person\n}\n\n// Facts\nfact CoursesHaveUniqueCodes {\n all disj c1, c2: Course | c1.courseCode != c2.courseCode\n}\n\n// Predicates\npred TeachingCapacity {\n all p: Professor, c: Course | some room: Classroom | room.capacity > 30 and room.capacity > #(p teaches c)\n}\n\npred EnrolledStudents {\n all c: Course | some s: Student | s.major = \"Computer Science\" and c in s.enrolledCourses\n}\n\n// Run Commands\nrun {\n // This run command is unsatisfiable\n some p: Professor | no c: Course | p.teaches c\n} for 5 but exactly 3 Professor, 3 Course\n\nrun {\n // This run command is satisfiable\n some s: Student, c: Course, p: Professor, r: Classroom | s.major = \"Computer Science\" and s.enrolledCourses = c and p.teaches c and TeachingCapacity and EnrolledStudents\n} for 5 but exactly 2 Student, 2 Course, 2 Professor, 2 Classroom", "permalink": "mangle-evil-energy-salt", "time": "2023-12-07 22:38:30.959255", "cmd": 1} {"id": 8557, "parent": 8554, "code": "// University Model\n\n// Signatures\nabstract sig Person {\n name: String,\n age: Int\n}\n\nsig Student extends Person {\n studentID: Int,\n major: String\n}\n\nsig Professor extends Person {\n staffID: Int,\n department: String\n}\n\nsig Course {\n courseCode: String,\n credits: Int\n}\n\nsig Classroom {\n roomNumber: Int,\n capacity: Int\n}\n\n// Inheritance\nfact StudentsArePeople {\n all s: Student | s in Person\n}\n\n// Facts\nfact CoursesHaveUniqueCodes {\n all disj c1, c2: Course | c1.courseCode = not c2.courseCode\n}\n\n// Predicates\npred TeachingCapacity {\n all p: Professor, c: Course | some room: Classroom | room.capacity > 30 and room.capacity > #(p teaches c)\n}\n\npred EnrolledStudents {\n all c: Course | some s: Student | s.major = \"Computer Science\" and c in s.enrolledCourses\n}\n\n// Run Commands\nrun {\n // This run command is unsatisfiable\n some p: Professor | not c: Course | c in p.teaches\n} for 5 but exactly 3 Professor, 3 Course\n\nrun {\n // This run command is satisfiable\n some s: Student, c: Course, p: Professor, r: Classroom | s.major = \"Computer Science\" and s.enrolledCourses = c and c in p.teaches and TeachingCapacity and EnrolledStudents\n} for 5 but exactly 2 Student, 2 Course, 2 Professor, 2 Classroom", "permalink": "paddle-tweed-squall-wharf", "time": "2023-12-07 22:43:15.975009", "cmd": 1} {"id": 8560, "parent": 8559, "code": "// University Model\n\n// Signatures\nabstract sig Person {\n name: String,\n age: Int\n}\n\nsig Student extends Person {\n studentID: Int,\n major: String\n}\n\nsig Professor extends Person {\n staffID: Int,\n department: String\n}\n\nsig Course {\n courseCode: String,\n credits: Int\n}\n\nsig Classroom {\n roomNumber: Int,\n capacity: Int\n}\n\n// Inheritance\nfact StudentsArePeople {\n all s: Student | s in Person\n}\n\n// Facts\nfact CoursesHaveUniqueCodes {\n all disj c1, c2: Course | c1.courseCode != c2.courseCode\n}\n\n// Predicates\npred TeachingCapacity {\n all p: Professor, c: Course | some room: Classroom | room.capacity > 30 and room.capacity > #(p teaches c)\n}\n\npred EnrolledStudents {\n all c: Course | some s: Student | s.major = \"Computer Science\" and c in s.enrolledCourses\n}\n\n// Run Commands\nrun {\n // This run command is unsatisfiable\n some p: Professor | not c: Course | c in p.teaches\n} for 5 but exactly 3 Professor, 3 Course\n\nrun {\n // This run command is satisfiable\n some s: Student, c: Course, p: Professor, r: Classroom | s.major = \"Computer Science\" and s.enrolledCourses = c and c in p.teaches and TeachingCapacity and EnrolledStudents\n} for 5 but exactly 2 Student, 2 Course, 2 Professor, 2 Classroom", "permalink": "dab-wrath-foyer-snugly", "time": "2023-12-07 22:43:51.051706", "cmd": 1} {"id": 8561, "parent": 8560, "code": "// University Model\n\n// Signatures\nabstract sig Person {\n name: String,\n age: Int\n}\n\nsig Student extends Person {\n studentID: Int,\n major: String,\n enrolledCourses: set Course\n}\n\nsig Professor extends Person {\n staffID: Int,\n department: String\n}\n\nsig Course {\n courseCode: String,\n credits: Int\n}\n\nsig Classroom {\n roomNumber: Int,\n capacity: Int\n}\n\n// Inheritance\nfact StudentsArePeople {\n all s: Student | s in Person\n}\n\n// Facts\nfact CoursesHaveUniqueCodes {\n all disj c1, c2: Course | c1.courseCode != c2.courseCode\n}\n\n// Predicates\npred TeachingCapacity {\n all p: Professor, c: Course | some room: Classroom | room.capacity > 30 and room.capacity > #(p teaches c)\n}\n\npred EnrolledStudents {\n all c: Course | some s: Student | s.major = \"Computer Science\" and c in s.enrolledCourses\n}\n\n// Run Commands\nrun {\n // This run command is unsatisfiable\n some p: Professor | no c: Course | p.teaches c\n} for 5 but exactly 3 Professor, 3 Course\n\nrun {\n // This run command is satisfiable\n some s: Student, c: Course, p: Professor, r: Classroom | s.major = \"Computer Science\" and c in s.enrolledCourses and p.teaches c and TeachingCapacity and EnrolledStudents\n} for 5 but exactly 2 Student, 2 Course, 2 Professor, 2 Classroom", "permalink": "life-cactus-gab-famine", "time": "2023-12-07 22:44:22.022612", "cmd": 1} {"id": 8562, "parent": 8561, "code": "// University Model\n\n// Signatures\nabstract sig Person {\n name: String,\n age: Int\n}\n\nsig Student extends Person {\n studentID: Int,\n major: String,\n enrolledCourses: set Course\n}\n\nsig Professor extends Person {\n staffID: Int,\n department: String\n}\n\nsig Course {\n courseCode: String,\n credits: Int\n}\n\nsig Classroom {\n roomNumber: Int,\n capacity: Int\n}\n\n// Inheritance\nfact StudentsArePeople {\n all s: Student | s in Person\n}\n\n// Facts\nfact CoursesHaveUniqueCodes {\n all disj c1, c2: Course | c1.courseCode != c2.courseCode\n}\n\n// Predicates\npred TeachingCapacity {\n all p: Professor, c: Course | some room: Classroom | room.capacity > 30 and room.capacity > #(p teaches c)\n}\n\npred EnrolledStudents {\n all c: Course | some s: Student | s.major = \"Computer Science\" and c in s.enrolledCourses\n}\n\n// Run Commands\nrun {\n // This run command is unsatisfiable\n some p: Professor | no c: Course | p.teaches c\n} for 5 but exactly 3 Professor, 3 Course\n\nrun {\n // This run command is satisfiable\n some s: Student, c: Course, p: Professor, r: Classroom | s.major = \"Computer Science\" and c in s.enrolledCourses and p.teaches c and TeachingCapacity and EnrolledStudents\n} for 5 but exactly 2 Student, 2 Course, 2 Professor, 2 Classroom", "permalink": "rented-pry-pox-starch", "time": "2023-12-07 22:44:35.918067", "cmd": 2} {"id": 8565, "parent": 8563, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: lone File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or (some f.link and f.link in Trash)\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no (p.link & Trash)\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash)\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no File.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv10\n\n/* No unprotected file should exist outside of Trash. */\npred inv11 {\n all f: File - Protected | f not in Trash and not f.link in Trash\n}\nrun inv11\n\n/* If a link is deleted, the target should be deleted too. */\npred inv12 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv12\n\n/* A linked file should not be in trash. */\npred inv13 {\n all f: File | f.link in Trash implies not f in Trash\n}\nrun inv13", "permalink": "pants-life-shirt-bling", "time": "2023-12-07 22:45:12.617043", "cmd": 1} {"id": 8572, "parent": 8571, "code": "// University Model\n\n// Signatures\nabstract sig Person {\n name: String,\n age: Int\n}\n\nsig Student extends Person {\n studentID: Int,\n major: String,\n enrolledCourses: set Course\n}\n\nsig Professor extends Person {\n staffID: Int,\n department: String\n}\n\nsig Course {\n courseCode: String,\n credits: Int\n}\n\nsig Classroom {\n roomNumber: Int,\n capacity: Int\n}\n\n// Inheritance\nfact StudentsArePeople {\n all s: Student | s in Person\n}\n\n// Facts\nfact CoursesHaveUniqueCodes {\n all disj c1, c2: Course | c1.courseCode != c2.courseCode\n}\n\n// Predicates\npred TeachingCapacity[p: Professor, c: Course, r: Classroom] {\n some room: r | room.capacity > 30 \n //and room.capacity > #(p teaches c)\n}\n\npred EnrolledStudents {\n all c: Course | some s: Student | s.major = \"Computer Science\" and c in s.enrolledCourses\n}\n\n// Run Commands\nrun {\n // This run command is unsatisfiable\n some p: Professor | no c: Course | p.teaches c\n} for 5 but exactly 3 Professor, 3 Course\n\nrun {\n // This run command is satisfiable\n some s: Student, c: Course, p: Professor, r: Classroom | s.major = \"Computer Science\" and c in s.enrolledCourses and TeachingCapacity[p, c, r] and EnrolledStudents\n} for 5 but exactly 2 Student, 2 Course, 2 Professor, 2 Classroom", "permalink": "handed-thrash-parrot-halved", "time": "2023-12-07 22:46:55.666970", "cmd": 2} {"id": 8574, "parent": 8573, "code": "// University Model\n\n// Signatures\nabstract sig Person {\n name: String,\n age: Int\n}\n\nsig Student extends Person {\n studentID: Int,\n major: String,\n enrolledCourses: set Course\n}\n\nsig Professor extends Person {\n staffID: Int,\n department: String\n}\n\nsig Course {\n courseCode: String,\n credits: Int\n}\n\nsig Classroom {\n roomNumber: Int,\n capacity: Int\n}\n\n// Inheritance\nfact StudentsArePeople {\n all s: Student | s in Person\n}\n\n// Facts\nfact CoursesHaveUniqueCodes {\n all disj c1, c2: Course | c1.courseCode != c2.courseCode\n}\n\n// Predicates\npred TeachingCapacity[p: Professor, c: Course, r: Classroom] {\n some room: r | room.capacity > 30 \n //and room.capacity > #(p teaches c)\n}\n\npred EnrolledStudents {\n all c: Course | some s: Student | s.major = \"Computer Science\" and c in s.enrolledCourses\n}\n\n// Run Commands\nrun {\n // This run command is unsatisfiable\n some p: Professor | no c: Course | p.teaches c\n} for 5 but exactly 3 Professor, 3 Course\n\nrun {\n // This run command is satisfiable\n some s: Student, c: Course, p: Professor, r: Classroom | s.major = \"Computer Science\" and c in s.enrolledCourses and TeachingCapacity[p, c, r] and EnrolledStudents\n} for 5 but exactly 2 Student, 2 Course, 2 Professor, 2 Classroom", "permalink": "spider-mowing-buckle-thrash", "time": "2023-12-07 22:47:17.554955", "cmd": 2} {"id": 8575, "parent": 8565, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: lone File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or (some f.link and f.link in Trash)\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no (p.link & Trash)\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash)\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n all f: File | f.link in Trash implies not f in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no File.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv10\n\n/* No unprotected file should exist outside of Trash. */\npred inv11 {\n all f: File - Protected | f not in Trash and not f.link in Trash\n}\nrun inv11\n\n/* If a link is deleted, the target should be deleted too. */\npred inv12 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv12\n\n/* A linked file should not be in trash. */\npred inv13 {\n all f: File | f.link in Trash implies not f in Trash\n}\nrun inv13", "permalink": "junkie-hull-nervy-kiln", "time": "2023-12-07 22:47:36.265926", "cmd": 1} {"id": 8581, "parent": 8580, "code": "// University Model\n\n// Signatures\nabstract sig Person {\n name: String,\n age: Int\n}\n\nsig Student extends Person {\n studentID: Int,\n major: String,\n enrolledCourses: set Course\n}\n\nsig Professor extends Person {\n staffID: Int,\n department: String,\n teaches: set Course\n}\n\nsig Course {\n courseCode: String,\n credits: Int\n}\n\nsig Classroom {\n roomNumber: Int,\n capacity: Int\n}\n\n// Inheritance\nfact StudentsArePeople {\n all s: Student | s in Person\n}\n\n// Facts\nfact CoursesHaveUniqueCodes {\n all disj c1, c2: Course | c1.courseCode != c2.courseCode\n}\n\n// Predicates\npred TeachingCapacity[p: Professor, c: Course, r: Classroom] {\n some room: r | room.capacity > 30 \n //and room.capacity > #(p.teaches & c)\n}\n\npred EnrolledStudents {\n all c: Course | some s: Student | s.major = \"Computer Science\" and c in s.enrolledCourses\n}\n\n// Run Commands\nrun {\n // This run command is unsatisfiable\n some p: Professor | no c: Course | c in p.teaches\n} for 5 \n//but exactly 3 Professor, 3 Course\n\nrun {\n // This run command is satisfiable\n some s: Student, c: Course, p: Professor, r: Classroom | s.major = \"Computer Science\" and c in s.enrolledCourses and TeachingCapacity[p, c, r] and EnrolledStudents\n} for 5 but exactly 2 Student, 2 Course, 2 Professor, 2 Classroom", "permalink": "retool-urban-goon-apron", "time": "2023-12-07 22:49:27.808156", "cmd": 1} {"id": 8583, "parent": 8575, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: lone File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no (p.link & Trash)\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash)\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n all f: File | f.link in Trash implies not f in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no File.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv10\n\n/* No unprotected file should exist outside of Trash. */\npred inv11 {\n all f: File - Protected | f not in Trash and not f.link in Trash\n}\nrun inv11\n\n/* If a link is deleted, the target should be deleted too. */\npred inv12 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv12\n\n/* A linked file should not be in trash. */\npred inv13 {\n all f: File | f.link in Trash implies not f in Trash\n}\nrun inv13", "permalink": "liquid-cotton-tyke-mulch", "time": "2023-12-07 22:53:50.406876", "cmd": 1} {"id": 8584, "parent": 8583, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: lone File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no (p.link & Trash)\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n all f: File | f.link in Trash implies not f in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no File.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv10\n\n/* No unprotected file should exist outside of Trash. */\npred inv11 {\n all f: File - Protected | f not in Trash and not f.link in Trash\n}\nrun inv11\n\n/* If a link is deleted, the target should be deleted too. */\npred inv12 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv12\n\n/* A linked file should not be in trash. */\npred inv13 {\n all f: File | f.link in Trash implies not f in Trash\n}\nrun inv13", "permalink": "rust-domain-choice-walk", "time": "2023-12-07 22:56:21.053681", "cmd": 1} {"id": 8590, "parent": 8582, "code": "// University Model\n\n// Signatures\nabstract sig Person { name: String, age: Int }\n\nsig Student extends Person { studentID: Int, major: String, enrolledCourses: set Course }\n\nsig Professor extends Person { staffID: Int, department: String, teaches: set Course }\n\nsig Course { courseCode: String, credits: Int }\n\nsig Classroom { roomNumber: Int, capacity: Int }\n\n// Inheritance\nfact StudentsArePeople { all s: Student | s in Person }\n\n// Facts\nfact CoursesHaveUniqueCodes { all disj c1, c2: Course | c1.courseCode != c2.courseCode }\n\n// Predicates\npred TeachingCapacity[p: Professor, c: Course, r: Classroom] {\n some room: r | room.capacity > 30 \n}\n\npred EnrolledStudents {\n all c: Course | some s: Student | s.major = \"Computer Science\" and c in s.enrolledCourses\n}\n\n // This run command is unsatisfiable\nrun {\n\n some p: Professor | no c: Course | c in p.teaches\n} for 5 \n\n// This run command is satisfiable\nrun {\n some s: Student, c: Course, p: Professor, r: Classroom | s.major = \"Computer Science\" and c in s.enrolledCourses and TeachingCapacity[p, c, r] and EnrolledStudents\n} for 5 but exactly 2 Student, 2 Course, 2 Professor, 2 Classroom", "permalink": "deny-perch-sake-senior", "time": "2023-12-07 23:00:00.622053", "cmd": 1} {"id": 8602, "parent": 8601, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: lone File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\n \npred inv2 {\n all f: File | f in Trash or (some f.link and f.link in Trash) or no f.link and not f in File\n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no (p.link & Trash)\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\n\npred inv7 {\n all f: File | f.link in Trash implies not f in Trash and not f.link in Trash\n}\n\nrun inv7\n\n/* There are no links. */ \npred inv8 {\n no File.link \n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash and not f.link in Trash\n}\nrun inv10\n\n/* No unprotected file should exist outside of Trash. */\npred inv11 {\n all f: File - Protected | f not in Trash and not f.link in Trash\n}\nrun inv11\n\n/* If a link is deleted, the target should be deleted too. */\npred inv12 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv12\n\n/* A linked file should not be in trash. */\npred inv13 {\n all f: File | f.link in Trash implies not f in Trash\n}\nrun inv13", "permalink": "purge-tartly-jinx-bogged", "time": "2023-12-07 23:14:05.822648", "cmd": 1} {"id": 8604, "parent": 8602, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: lone File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or (some f.link and f.link in Trash) or (no f.link and f not in File)\n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no (p.link & Trash)\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\n\npred inv7 {\n all f: File | f.link in Trash implies not f in Trash and not f.link in Trash\n}\n\nrun inv7\n\n/* There are no links. */ \npred inv8 {\n no File.link \n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash and not f.link in Trash\n}\nrun inv10\n\n/* No unprotected file should exist outside of Trash. */\npred inv11 {\n all f: File - Protected | f not in Trash and not f.link in Trash\n}\nrun inv11\n\n/* If a link is deleted, the target should be deleted too. */\npred inv12 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv12\n\n/* A linked file should not be in trash. */\npred inv13 {\n all f: File | f.link in Trash implies not f in Trash\n}\nrun inv13", "permalink": "mute-glory-gently-boat", "time": "2023-12-07 23:18:42.939169", "cmd": 1} {"id": 8610, "parent": 8609, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n all f: Trash | no f.link\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n //or some f.link in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | not p in Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n no disj f1, f2: File | f1.link & f2.link = none\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f1, f2: File | f1.link & f2.link = none\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | l in Trash implies f in Trash\n}\n\nrun inv10", "permalink": "remote-onto-graves-album", "time": "2023-12-07 23:24:54.078682", "cmd": 3} {"id": 8611, "parent": 8610, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n all f: Trash | no f.link\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n //or some f.link in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | not p in Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n no disj f1, f2: File | f1.link & f2.link = none\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f1, f2: File | f1.link & f2.link = none\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | l in Trash implies f in Trash\n}\n\nrun inv10", "permalink": "stank-sliced-raging-speech", "time": "2023-12-07 23:24:56.617387", "cmd": 4} {"id": 8612, "parent": 8611, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n all f: Trash | no f.link\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n //or some f.link in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | not p in Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n no disj f1, f2: File | f1.link & f2.link = none\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f1, f2: File | f1.link & f2.link = none\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | l in Trash implies f in Trash\n}\n\nrun inv10", "permalink": "stool-glove-quench-bulge", "time": "2023-12-07 23:24:58.980698", "cmd": 5} {"id": 8619, "parent": 8617, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: lone File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or (some f.link and f.link in Trash) or (no f.link and f not in File)\n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no (p.link & Trash)\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\n\npred inv7 {\n all f: File | f.link in Trash implies not f in Trash and not f.link in Trash\n}\n\nrun inv7\n\n/* There are no links. */ \npred inv8 {\n no File.link \n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash and not f.link in Trash\n}\nrun inv10\n\n/* No unprotected file should exist outside of Trash. */\npred inv11 {\n all f: File - Protected | f not in Trash and not f.link in Trash\n}\nrun inv11\n\n/* If a link is deleted, the target should be deleted too. */\npred inv12 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv12\n\n/* A linked file should not be in trash. */\npred inv13 {\n all f: File | f.link in Trash implies not f in Trash\n}\nrun inv13", "permalink": "legume-extent-gonad-grimy", "time": "2023-12-07 23:25:12.473280", "cmd": 4} {"id": 8358, "parent": 8357, "code": "// Social Networking Alloy Model\n\n// Signatures\nabstract sig User {\n userId: Int,\n username: String\n}\n\nsig RegularUser extends User {\n email: String\n}\n\nsig AdminUser extends User {\n adminLevel: Int\n}\n\nsig Post {\n postId: Int,\n content: String,\n timestamp: Int\n}\n\nsig Like {\n likeId: Int,\n user: User,\n post: Post\n}\n\n// Fields\nfact uniqueUserId {\n all disj u1, u2: User | u1.userId != u2.userId\n}\n\nfact uniquePostId {\n all disj p1, p2: Post | p1.postId != p2.postId\n}\n\n// Inheritance\nfact adminInheritance {\n all u: AdminUser | u in User\n}\n\n// Facts\nfact likeConsistency {\n all l: Like | l.user in User and l.post in Post\n}\n\nfact postsByRegularUsers {\n all p: Post, u: RegularUser | some l: Like | l.user = u and l.post = p\n}\n\n// Predicates\npred userLikesPost[u: User, p: Post] {\n some l: Like | l.user = u and l.post = p\n}\n\npred popularPost[p: Post] {\n some u1, u2: User | userLikesPost[u1, p] and userLikesPost[u2, p] and u1 != u2\n}\n\n// Run commands\nrun unsatisfiableExample {\n // This run command should be unsatisfiable\n // Add constraints that make the model unsatisfiable\n no u: User | u in RegularUser and u in AdminUser\n}\n\nrun satisfiableExample for 3 {\n // This run command should be satisfiable\n // Adjust the bound as needed\n some p: Post, u: RegularUser | userLikesPost[u, p] and popularPost[p]\n}", "permalink": "stifle-sway-had-tiling", "time": "2023-12-07 16:52:04.672197", "cmd": 2} {"id": 8360, "parent": 8359, "code": "// Social Networking Alloy Model\n\n// Signatures\nabstract sig User { userId: Int, username: String }\n\nsig RegularUser extends User { email: String }\n\nsig AdminUser extends User { adminLevel: Int }\n\nsig Post { postId: Int, content: String, timestamp: Int }\n\nsig Like { likeId: Int, user: User, post: Post }\n\n// Fields\nfact uniqueUserId {\n all disj u1, u2: User | u1.userId != u2.userId\n}\n\nfact uniquePostId { all disj p1, p2: Post | p1.postId != p2.postId }\n\n// Inheritance\nfact adminInheritance { all u: AdminUser | u in User }\n\n// Facts\nfact likeConsistency { all l: Like | l.user in User and l.post in Post }\n\nfact postsByRegularUsers {\n all p: Post, u: RegularUser | some l: Like | l.user = u and l.post = p }\n\n// Predicates\npred userLikesPost[u: User, p: Post] {\n some l: Like | l.user = u and l.post = p\n}\n\npred popularPost[p: Post] {\n some u1, u2: User | userLikesPost[u1, p] and userLikesPost[u2, p] and u1 != u2\n}\n\n// Run commands\nrun unsatisfiableExample {\n // This run command should be unsatisfiable\n // Add constraints that make the model unsatisfiable\n no u: User | u in RegularUser and u in AdminUser\n}\n\nrun satisfiableExample for 1 {\n // This run command should be satisfiable\n // Adjust the bound as needed\n some p: Post, u: RegularUser | userLikesPost[u, p] and popularPost[p]\n}", "permalink": "cola-encode-kite-caress", "time": "2023-12-07 16:55:40.075444", "cmd": 2} {"id": 8362, "parent": 8361, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// Signatures\nsig User {\n username: String,\n email: String\n}\n\nabstract sig Product {\n productId: Int,\n name: String,\n price: Int,\n seller: User\n}\n\nsig ElectronicProduct extends Product {\n brand: String,\n warrantyPeriod: Int\n}\n\nsig ClothingProduct extends Product {\n size: String,\n brand: String\n}\n\nsig Transaction {\n transactionId: Int,\n buyer: User,\n seller: User,\n product: Product\n}\n\nsig Feedback {\n feedbackId: Int,\n rating: Int,\n comment: String,\n user: User\n}\n\n// Fields\nfact uniqueUsernames {\n all u1, u2: User | u1 != u2 implies u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all t1, t2: Transaction | t1 != t2 implies t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all f1, f2: Feedback | f1 != f2 implies f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is intentionally unsatisfiable for demonstration purposes\n all p1, p2: Product | p1 = p2 implies p1.productId = p2.productId\n}\n\nrun satisfiableExample {\n // This command is designed to be satisfiable\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\n// run {} for 3", "permalink": "hurled-lived-bogus-thinly", "time": "2023-12-07 17:05:24.277715", "cmd": 2} {"id": 8390, "parent": 8388, "code": "// Define a simple model\nsig Person {\n name: String,\n age: Int\n}\n\nfact atLeastOne {\n #Person > 0\n}\n\nfact LegalDrivingAge {\n all p: Person | p.age >= 20\n}\n\n// Run command to check if all persons are under 16 years old\nrun underagePersonsExample {\n all p: Person | p.age = 9\n}", "permalink": "expert-reach-knelt-tamper", "time": "2023-12-07 18:12:05.595889", "cmd": 1} {"id": 8391, "parent": 8390, "code": "// Define a simple model\nsig Person {\n name: String,\n age: Int\n}\n\nfact atLeastOne {\n #Person > 0\n}\n\nfact LegalDrivingAge {\n all p: Person | p.age >= 20\n}\n\n// Run command to check if all persons are under 16 years old\nrun underagePersonsExample {\n all p: Person | p.age = 21\n}", "permalink": "level-boney-onyx-frosty", "time": "2023-12-07 18:12:20.914065", "cmd": 1} {"id": 8414, "parent": 8413, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // Constraint 1\n some x: Person | x in Agatha.killed\n \n // Constraint 2\n all x, y: Person | x.killed = y implies (x.hates = y and not x.richer = y)\n \n // Constraint 3\n all x: Person - Agatha | not x.hates and Agatha implies not x.hates & Charles\n \n // Constraint 4\n Agatha.hates = Agatha + Charles\n \n // Constraint 5\n all x: Person | not x.richer & Agatha implies x.hates & Butler\n \n // Constraint 6\n all x: Person | x.hates & Agatha implies x.hates & Butler\n \n // Constraint 7\n all x: Person | some y: Person | x.hates = y\n \n // Additional Constraints\n no Agatha.hates // Constraint 8\n Agatha != Butler // Constraint 9\n no x: Person | x.hates = x // Constraint 10\n}\n\nrun puzzle for 3", "permalink": "levers-flask-elite-trowel", "time": "2023-12-07 20:04:59.073250", "cmd": 1} {"id": 8419, "parent": 8418, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // Constraint 1\n some x: Person | x in Agatha.killed\n \n // Constraint 2\n all x, y: Person | x.killed = y implies (x.hates = y and not x.richer = y)\n \n // Constraint 3\n all x: Person - Agatha | (not x.hates) and Agatha implies (not x.hates) and Charles\n \n // Constraint 4\n Agatha.hates = Agatha + Charles\n \n // Constraint 5\n all x: Person | not x.richer & Agatha implies x.hates & Butler\n \n // Constraint 6\nall x: Person | x.hates & Agatha implies x.hates & Butler\n\n // Constraint 7\n all x: Person | some y: Person | x.hates = y\n \n // Additional Constraints\n no Agatha.hates // Constraint 8\n Agatha != Butler // Constraint 9\n no x: Person | x.hates = x // Constraint 10\n}\n\nrun puzzle for 3", "permalink": "choice-record-refute-liquid", "time": "2023-12-07 20:08:41.424591", "cmd": 1} {"id": 8423, "parent": 8422, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // Constraint 1\n some x: Person | x in Agatha.killed\n \n // Constraint 2\n all x, y: Person | x.killed = y implies (x.hates = y and not x.richer = y)\n \n // Constraint 3\n )all x: Person - Agatha | not x.hates & Agatha implies not x.hates & Charles\n \n // Constraint 4\n Agatha.hates = Agatha + Charles\n \n // Constraint 5\n all x: Person | not x.richer & Agatha implies x.hates & Butler\n \n // Constraint 6\n all x: Person | x.hates & Agatha implies x.hates & Butler\n \n // Constraint 7\n all x: Person | some y: Person | x.hates = y\n \n // Additional Constraints\n no Agatha.hates // Constraint 8\n Agatha != Butler // Constraint 9\n no x: Person | x.hates = x // Constraint 10\n}\n\nrun puzzle for 3", "permalink": "candle-vision-posh-raisin", "time": "2023-12-07 20:10:36.093816", "cmd": 1} {"id": 8428, "parent": 8427, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // Constraint 1\n some x: Person | x in Agatha.killed\n \n // Constraint 2\n all x, y: Person | x.killed = y implies (x.hates = y and not x.richer = y)\n \n // Constraint 3\n // all x: Person - Agatha | not x.hates and Agatha implies not x.hates and Charles\n \n // Constraint 4\n Agatha.hates = Agatha + Charles\n \n // Constraint 5\n // all x: Person | not x.richer and Agatha implies x.hates and Butler\n \n // Constraint 6\n // all x: Person | x.hates and Agatha implies x.hates and Butler\n \n // Constraint 7\n all x: Person | some y: Person | x.hates = y\n \n // Additional Constraints\n no Agatha.hates // Constraint 8\n Agatha != Butler // Constraint 9\n no x: Person | x.hates = x // Constraint 10\n}\n\nrun puzzle for 3", "permalink": "omega-java-venus-sitcom", "time": "2023-12-07 20:19:26.040850", "cmd": 1} {"id": 8431, "parent": 8407, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: set File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no p.link\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n all f: File, l: f.link | l not in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f: File, l: f.link | some l.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | (l in Trash) implies (f in Trash)\n}\n\nrun inv10", "permalink": "shrank-jersey-facing-email", "time": "2023-12-07 20:41:10.911543", "cmd": 1} {"id": 8432, "parent": 8431, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: set File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n No protected & trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n all f: File, l: f.link | l not in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f: File, l: f.link | some l.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f in Trash implies all l: f.link | l in Trash\n}\n\nrun inv10", "permalink": "kitten-state-stood-dwarf", "time": "2023-12-07 20:43:39.972542", "cmd": 1} {"id": 8438, "parent": 8437, "code": "abstract sig Person {\n name: one String,\n age: one Int\n}\n\nsig Doctor extends Person {\n specialty: one String,\n patients: set Patient\n}\n\nsig Nurse extends Person {\n department: one String,\n assignedDoctors: set Doctor\n}\n\nsig Patient extends Person {\n disease: one String,\n attendingDoctor: one Doctor\n}\n\nsig Appointment {\n patient: one Patient,\n doctor: one Doctor,\n timeSlot: one TimeSlot\n}\n\nsig TimeSlot {\n startTime: one Int,\n endTime: one Int\n}\n\nfact NoSelfTreatment {\n all d: Doctor | no p: d.patients | p.attendingDoctor = d\n}\n\nfact ConsistentDoctorAssignment {\n all p: Patient, d: Doctor | p.attendingDoctor = d iff p in d.patients\n}\n\npred isAvailable[d: Doctor, t: TimeSlot] {\n no a: Appointment | a.doctor = d and a.timeSlot = t\n}\n\npred needsSpecialist[p: Patient, s: String] {\n p.disease = s\n}\n\nrun { some p: Patient, d: Doctor | p.attendingDoctor = d and p in d.patients } for 3 but 2 Doctor, 2 Patient, 3 TimeSlot, 2 Nurse\nrun { all d: Doctor | no p: Patient | p in d.patients and p.attendingDoctor = d } for 3 but 2 Doctor, 2 Patient, 3 TimeSlot, 2 Nurse", "permalink": "depth-flyer-crying-poison", "time": "2023-12-07 20:53:04.999376", "cmd": 2} {"id": 8441, "parent": 8439, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {\n name: one String,\n age: one Int\n}\n\nsig Doctor extends Person {\n specialty: one String,\n patients: set Patient\n}\n\nsig Nurse extends Person {\n department: one String,\n assignedDoctors: set Doctor\n}\n\nsig Patient extends Person {\n disease: one String,\n attendingDoctor: one Doctor\n}\n\nsig Appointment {\n patient: one Patient,\n doctor: one Doctor,\n timeSlot: one TimeSlot\n}\n\nsig TimeSlot {\n startTime: one Int,\n endTime: one Int\n}\n\nfact NoSelfTreatment {\n all d: Doctor | no p: d.patients | p.attendingDoctor = d\n}\n\nfact ConsistentDoctorAssignment {\n all p: Patient, d: Doctor | p.attendingDoctor = d iff p in d.patients\n}\n\npred isAvailable[d: Doctor, t: TimeSlot] {\n no a: Appointment | a.doctor = d and a.timeSlot = t\n}\n\npred needsSpecialist[p: Patient, s: String] {\n p.disease = s\n}\n\nrun { some p: Patient, d: Doctor | p.attendingDoctor = d and p in d.patients } for 3 but 2 Doctor, 2 Patient, 3 TimeSlot, 2 Nurse\nrun { all d: Doctor | no p: Patient | p in d.patients and p.attendingDoctor = d } for 3 but 2 Doctor, 2 Patient, 3 TimeSlot, 2 Nurse", "permalink": "truth-dimple-cloud-lego", "time": "2023-12-07 20:55:27.512938", "cmd": 2} {"id": 8446, "parent": 8250, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// Signatures\nsig User {\n username: String,\n email: String\n}\n\nabstract sig Product {\n productId: Int,\n name: String,\n price: Int,\n seller: User\n}\n\nsig ElectronicProduct extends Product {\n brand: String,\n warrantyPeriod: Int\n}\n\nsig ClothingProduct extends Product {\n size: String,\n brand: String\n}\n\nsig Transaction {\n transactionId: Int,\n buyer: User,\n seller: User,\n product: Product\n}\n\nsig Feedback {\n feedbackId: Int,\n rating: Int,\n comment: String,\n user: User\n}\n\n// Fields\nfact uniqueUsernames {\n all u1, u2: User | u1 != u2 implies u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all t1, t2: Transaction | t1 != t2 implies t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all f1, f2: Feedback | f1 != f2 implies f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is intentionally unsatisfiable for demonstration purposes\n all p1, p2: Product | p1 = p2 implies p1.productId = p2.productId\n}\n\nrun satisfiableExample {\n // This command is designed to be satisfiable\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\n// run {} for 3", "permalink": "suing-pester-cancel-ashen", "time": "2023-12-07 21:09:07.263716", "cmd": 1} {"id": 8449, "parent": null, "code": "// Music Festival Alloy Model\n\n// Signatures\nabstract sig Person { pid: Int, name: String }\n\nsig Artist extends Person { genre: String }\n\nsig Attendee extends Person { ticketId: Int }\n\nsig Stage { stageId: Int, name: String, capacity: Int }\n\nsig Organizer extends Person { role: String }\n\n// Fields\nfact uniquePersonId {\n all disj p1, p2: Person | p1.pid != p2.pid\n}\n\nfact uniqueStageId {\n all disj st1, st2: Stage | st1.stageId != st2.stageId\n}\n\n// Inheritance\nfact artistInheritance { all a: Artist | a in Person }\n\n// Facts\nfact artistsPerformOnDifferentStages {\n all disj a1, a2: Artist, s1, s2: Stage |\n (a1 != a2 and s1 != s2) implies a1.performanceStage != s2\n}\n\nfact organizersHaveUniqueRoles {\n all disj o1, o2: Organizer | o1 != o2 implies o1.role != o2.role\n}\n\n// Predicates\npred attendeeBuysTicket[a: Attendee] {\n some f: Stage | a in f.attendee\n}\n\npred artistPerformsOnStage[a: Artist, s: Stage] {\n a.performanceStage = s\n}\n\n// Run commands\nrun unsatisfiableExample {\n // This run command should be unsatisfiable\n // Add constraints that make the model unsatisfiable\n no s: Stage, a: Artist | s.capacity < #a.artistPerformance\n}\n\nrun satisfiableExample {\n // This run command should be satisfiable\n // Adjust the bound as needed\n some a: Artist, s: Stage | artistPerformsOnStage[a, s] and attendeeBuysTicket[s.attendees]\n}", "permalink": "agency-landed-unworn-crier", "time": "2023-12-07 21:14:38.645495", "cmd": 1} {"id": 8450, "parent": 8449, "code": "// Music Festival Alloy Model\n\n// Signatures\nabstract sig Person { pid: Int, name: String }\n\nsig Artist extends Person { genre: String }\n\nsig Attendee extends Person { ticketId: Int }\n\nsig Stage { stageId: Int, name: String, capacity: Int }\n\nsig Organizer extends Person { role: String }\n\n// Fields\nfact uniquePersonId {\n all disj p1, p2: Person | p1.pid != p2.pid\n}\n\nfact uniqueStageId {\n all disj st1, st2: Stage | st1.stageId != st2.stageId\n}\n\n// Inheritance\nfact artistInheritance { all a: Artist | a in Person }\n\n// Facts\nfact artistsPerformOnDifferentStages {\n all disj a1, a2: Artist, s1, s2: Stage |\n (a1 != a2 and s1 != s2) implies a1.performanceStage != s2\n}\n\nfact organizersHaveUniqueRoles {\n all disj o1, o2: Organizer | o1 != o2 implies o1.role != o2.role\n}\n\n// Predicates\npred attendeeBuysTicket[a: Attendee] {\n some f: Stage | a in f.attendee\n}\n\npred artistPerformsOnStage[a: Artist, s: Stage] {\n a.performanceStage = s\n}\n\n// Run commands\nrun unsatisfiableExample {\n // This run command should be unsatisfiable\n // Add constraints that make the model unsatisfiable\n no s: Stage, a: Artist | s.capacity < #a.artistPerformance\n}\n\nrun satisfiableExample {\n // This run command should be satisfiable\n // Adjust the bound as needed\n some a: Artist, s: Stage | artistPerformsOnStage[a, s] and attendeeBuysTicket[s.attendees]\n}", "permalink": "avatar-crowd-lizard-idly", "time": "2023-12-07 21:14:57.772412", "cmd": 2} {"id": 8451, "parent": 8450, "code": "// Music Festival Alloy Model\n\n// Signatures\nabstract sig Person { pid: Int, name: String }\n\nsig Artist extends Person { genre: String }\n\nsig Attendee extends Person { ticketId: Int }\n\nsig Stage { stageId: Int, name: String, capacity: Int }\n\nsig Organizer extends Person { role: String }\n\n// Fields\nfact uniquePersonId {\n all disj p1, p2: Person | p1.pid != p2.pid\n}\n\nfact uniqueStageId {\n all disj st1, st2: Stage | st1.stageId != st2.stageId\n}\n\n// Inheritance\nfact artistInheritance { all a: Artist | a in Person }\n\n// Facts\nfact artistsPerformOnDifferentStages {\n all disj a1, a2: Artist, s1, s2: Stage |\n (a1 != a2 and s1 != s2) implies a1.performanceStage != s2\n}\n\nfact organizersHaveUniqueRoles {\n all disj o1, o2: Organizer | o1 != o2 implies o1.role != o2.role\n}\n\n// Predicates\npred attendeeBuysTicket[a: Attendee] {\n some f: Stage | a in f.Attendee\n}\n\npred artistPerformsOnStage[a: Artist, s: Stage] {\n a.performanceStage = s\n}\n\n// Run commands\nrun unsatisfiableExample {\n // This run command should be unsatisfiable\n // Add constraints that make the model unsatisfiable\n no s: Stage, a: Artist | s.capacity < #a.artistPerformance\n}\n\nrun satisfiableExample {\n // This run command should be satisfiable\n // Adjust the bound as needed\n some a: Artist, s: Stage | artistPerformsOnStage[a, s] and attendeeBuysTicket[s.attendees]\n}", "permalink": "harbor-smudge-dork-baked", "time": "2023-12-07 21:15:34.335725", "cmd": 2} {"id": 8453, "parent": 8452, "code": "// Social Networking Alloy Model\n\n// Signatures\nabstract sig User {\n userId: Int,\n username: String\n}\n\nsig RegularUser extends User {\n email: String\n}\n\nsig AdminUser extends User {\n adminLevel: Int\n}\n\nsig Post {\n postId: Int,\n content: String,\n timestamp: Int\n}\n\nsig Like {\n likeId: Int,\n user: User,\n post: Post\n}\n\n// Fields\nfact uniqueUserId {\n all disj u1, u2: User | u1.userId != u2.userId\n}\n\nfact uniquePostId {\n all disj p1, p2: Post | p1.postId != p2.postId\n}\n\n// Inheritance\nfact adminInheritance {\n all u: AdminUser | u in User\n}\n\n// Facts\nfact likeConsistency {\n all l: Like | l.user in User and l.post in Post\n}\n\nfact postsByRegularUsers {\n all p: Post, u: RegularUser | p in u.post\n}\n\n// Predicates\npred userLikesPost[u: User, p: Post] {\n some l: Like | l.user = u and l.post = p\n}\n\npred popularPost[p: Post] {\n some u: User | userLikesPost[u, p] and some v: User | userLikesPost[v, p] and u != v\n}\n\n// Run commands\nrun unsatisfiableExample {\n // This run command should be unsatisfiable\n // Add constraints that make the model unsatisfiable\n no u: User | u in RegularUser and u in AdminUser\n}\n\nrun satisfiableExample for 3 {\n // This run command should be satisfiable\n // Adjust the bound as needed\n some p: Post, u: RegularUser | userLikesPost[u, p] and popularPost[p]\n}\n", "permalink": "five-engine-dipped-sneeze", "time": "2023-12-07 21:16:35.441506", "cmd": 1} {"id": 8454, "parent": 8250, "code": "// Signatures\nabstract sig User {\n username: one Username,\n email: one Email\n}\n\nabstract sig Product {\n productId: one Int,\n name: one Name,\n price: one Int,\n seller: one User\n}\n\nsig ElectronicProduct extends Product {\n brand: one Brand,\n warrantyPeriod: one Int\n}\n\nsig ClothingProduct extends Product {\n size: one Size,\n brand: one Brand\n}\n\nsig Transaction {\n transactionId: one Int,\n buyer: one User,\n seller: one User,\n product: one Product\n}\n\nsig Feedback {\n feedbackId: one Int,\n rating: one Int,\n comment: one Comment,\n user: one User\n}\n\n// Basic Types\nabstract sig Username, Email, Name, Brand, Size, Comment {}\n\n// Facts\nfact uniqueUsernames {\n all disj u1, u2: User | u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all disj p1, p2: Product | p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all disj t1, t2: Transaction | t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all disj f1, f2: Feedback | f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample for 4 {\n // Intentionally unsatisfiable\n some p: Product | no p.productId\n}\n\nrun satisfiableExample for 4 {\n // Satisfiable\n some p: Product | some p.productId\n}", "permalink": "scribe-gangly-gooey-gothic", "time": "2023-12-07 21:17:57.719936", "cmd": 1} {"id": 8461, "parent": 8459, "code": "// Agatha, Charles, and Butler model in Alloy\n\n// Signatures\nsig Person {}\n\n// Facts\nfact individualsExist {\n some Agatha, Charles, Butler: Person | true\n}\n\n// Predicates\npred hates[p1, p2: Person] {\n (p1 = Agatha && p2 = Charles) ||\n (p1 = Butler && p2 = Agatha) ||\n (p1 = Agatha && p2 = Agatha) ||\n (p1 = Butler && p2 = Charles)\n}\n\npred killed[p1, p2: Person] {\n p1 = Agatha && p2 = Agatha\n}\n\npred richer[p1, p2: Person] {\n p1 = Butler && p2 = Agatha\n}\n\n// Run command (to check satisfaction)\nrun satisfyPredicates for 3\n\n// Check the predicates for each combination of individuals\nfact checkHates {\n all p1, p2: Person | hates[p1, p2] <=> (\n (p1 = Agatha && p2 = Charles) ||\n (p1 = Butler && p2 = Agatha) ||\n (p1 = Agatha && p2 = Agatha) ||\n (p1 = Butler && p2 = Charles)\n )\n}\n\nfact checkKilled {\n all p1, p2: Person | killed[p1, p2] <=> (p1 = Agatha && p2 = Agatha)\n}\n\nfact checkRicher {\n all p1, p2: Person | richer[p1, p2] <=> (p1 = Butler && p2 = Agatha)\n}\n\n// Ensure no contradiction\nfact noContradiction {\n no p1, p2: Person | hates[p1, p2] && killed[p1, p2]\n}\n\n// Ensure at least 2 instances\nfact atLeastTwoInstances {\n some p1, p2: Person | p1 != p2\n}\n\n// Ensure uniqueness of individuals\nfact uniqueIndividuals {\n lone Agatha\n lone Charles\n lone Butler\n}\n", "permalink": "amount-sultry-monday-sphinx", "time": "2023-12-07 21:21:15.695098", "cmd": 1} {"id": 8467, "parent": 8466, "code": "abstract sig Person {\n killed: lone Person,\n hates: lone Person,\n richer: lone Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // encoding of formula (1) someone killed Agatha\n some x: Person | Agatha.killed[x]\n\n // encoding of formula (2)\n all x, y: Person | (x in y.killed) => (x in y.hates) && (no x in y.richer)\n\n // encoding of formula (3)\n all x: Person | (Agatha.hates[x] implies no (Charles.hates & x))\n\n // encoding of formula (4)\n Agatha.hates[Agatha] && Agatha.hates[Charles]\n\n // encoding of formula (5)\n all x: Person | no x in Agatha.richer => x in Butler.hates\n\n // encoding of formula (6)\n all x: Person | (Agatha.hates[x] implies x in Butler.hates)\n\n // encoding of formula (7)\n all x: Person | some y: Person | no x in y.hates\n}\n\nrun puzzle for 3 Person", "permalink": "rural-bony-unmade-among", "time": "2023-12-07 21:27:04.047889", "cmd": 1} {"id": 8468, "parent": 8464, "code": "// Basic Types\nabstract sig String {}\n\n// User Signature\nsig User {\n username: one String,\n email: one String\n}\n\n// Abstract Product Signature\nabstract sig Product {\n productId: one String,\n name: one String,\n price: one Int,\n seller: one User\n}\n\n// Electronics and Clothing Products Inheriting from Product\nsig ElectronicProduct extends Product {\n brand: one String,\n warrantyPeriod: one Int\n}\n\nsig ClothingProduct extends Product {\n size: one String,\n color: one String\n}\n\n// Transaction Signature\nsig Transaction {\n transactionId: one String,\n buyer: one User,\n seller: one User,\n product: one Product\n}\n\n// Feedback Signature\nsig Feedback {\n feedbackId: one String,\n rating: one Int,\n comment: one String,\n user: one User\n}\n\n// Facts\nfact uniqueUsernames {\n all disj u1, u2: User | u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all disj p1, p2: Product | p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all disj t1, t2: Transaction | t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all disj f1, f2: Feedback | f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer and t.product in Product\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample for 4 {\n // Intentionally unsatisfiable\n all p: Product | no p.productId\n}\n\nrun satisfiableExample for 4 {\n // Satisfiable\n some p: Product | some p.productId\n}", "permalink": "robe-user-stoic-parole", "time": "2023-12-07 21:29:06.002984", "cmd": 2} {"id": 8477, "parent": 8476, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {\n name: one String,\n age: one Int\n}\n\nsig Doctor extends Person {\n specialty: one String,\n patients: set Patient\n}\n\nsig Nurse extends Person {\n department: one String,\n assignedDoctors: set Doctor\n}\n\nsig Patient extends Person {\n disease: one String,\n attendingDoctor: one Doctor\n}\n\nsig Appointment {\n patient: one Patient,\n doctor: one Doctor,\n timeSlot: one TimeSlot\n}\n\nsig TimeSlot {\n startTime: one Int,\n endTime: one Int\n}\n\nfact NoSelfTreatment {\n all d: Doctor | no p: d.patients | p.attendingDoctor = d\n}\n\nfact ConsistentDoctorAssignment {\n all p: Patient, d: Doctor | p.attendingDoctor = d iff p in d.patients\n}\n\npred isAvailable[d: Doctor, t: TimeSlot] {\n no a: Appointment | a.doctor = d and a.timeSlot = t\n}\n\npred needsSpecialist[p: Patient, s: String] {\n p.disease = s\n}\n\nrun { some p: Patient, d: Doctor | p.attendingDoctor = d and p in d.patients } for 3 but 2 Doctor, 2 Patient, 3 TimeSlot, 2 Nurse\nrun { all d: Doctor | no p: Patient | p in d.patients and p.attendingDoctor = d } for 3 but 2 Doctor, 2 Patient, 3 TimeSlot, 2 Nurse", "permalink": "bluff-chain-gown-grime", "time": "2023-12-07 21:36:31.766514", "cmd": 2} {"id": 8487, "parent": 8486, "code": "// Basic Types\nsig Name, Email, ProductID, UserID {}\n\n// User Signature\nsig User {\n userID: one UserID,\n username: one Name,\n email: one Email\n}\n\n// Product Signature\nsig Product {\n productID: one ProductID,\n name: one Name,\n price: one Int,\n seller: one User\n}\n\n// Transaction Signature\nsig Transaction {\n product: one Product,\n buyer: one User,\n transactionPrice: one Int\n}\n\n// Feedback Signature\nsig Feedback {\n transaction: one Transaction,\n rating: one Int,\n comment: lone String\n}\n\n// Facts\nfact uniqueUserIDs {\n all disj u1, u2: User | u1.userID != u2.userID\n}\n\nfact uniqueProductIDs {\n all disj p1, p2: Product | p1.productID != p2.productID\n}\n\nfact transactionHasCorrectPrice {\n all t: Transaction | t.transactionPrice = t.product.price\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.buyer != t.product.seller\n}\n\npred highRatingFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // Intentionally unsatisfiable: A transaction with incorrect price\n some t: Transaction | t.transactionPrice != t.product.price\n} for 5\n\nrun satisfiableExample {\n // Satisfiable: A transaction with a valid buyer and seller\n some t: Transaction | validTransaction[t]\n} for 5", "permalink": "basics-shelf-ream-cacti", "time": "2023-12-07 21:43:40.014644", "cmd": 2} {"id": 8496, "parent": 8495, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// Signatures\nsig User {\n username: String,\n email: String\n}\n\nabstract sig Product {\n productId: Int,\n name: String,\n price: Int,\n seller: User\n}\n\nsig ElectronicProduct extends Product {\n brand: String,\n warrantyPeriod: Int\n}\n\nsig ClothingProduct extends Product {\n size: String,\n brand: String\n}\n\nsig Transaction {\n transactionId: Int,\n buyer: User,\n seller: User,\n product: Product\n}\n\nsig Feedback {\n feedbackId: Int,\n rating: Int,\n comment: String,\n user: User\n}\n\n// Fields\nfact uniqueUsernames {\n all u1, u2: User | u1 != u2 implies u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all t1, t2: Transaction | t1 != t2 implies t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all f1, f2: Feedback | f1 != f2 implies f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is intentionally unsatisfiable for demonstration purposes\n all p1, p2: Product | p1 = p2 implies p1.productId = p2.productId\n}\n\nrun satisfiableExample {\n // This command is designed to be satisfiable\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\n// run {} for 3", "permalink": "vest-lagged-hamper-citric", "time": "2023-12-07 22:04:26.794059", "cmd": 1} {"id": 8508, "parent": 8507, "code": "abstract sig Person {\n killed: Person -> lone Person\n}\n\none sig Agatha extends Person {}\n\npred existenceOfKiller {\n some x: Person | x.killed[Agatha]\n}\n\nrun existenceOfKiller for 3 Person ", "permalink": "lapdog-amaze-foster-cable", "time": "2023-12-07 22:11:52.758746", "cmd": 1} {"id": 8518, "parent": 8517, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n some x: Person | Agatha in x.killed \n \n all x, y: Person |\n (x in y.killed implies x in y.hates and not x in y.richer)\n\n all x: Person | x in Agatha.hates => not x in Charles.hates \n\n Agatha in Agatha.hates and Charles in Agatha.hates \n\n all x: Person | (not Agatha in x.richer) implies (x in Butler.hates) \n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates) \n\n all x: Person | some y: Person | (not y in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "those-slate-copper-rebuff", "time": "2023-12-07 22:21:18.264162", "cmd": 1} {"id": 8519, "parent": 8499, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\n\nsig Director extends Person {\n hasDirected: some Movie\n hasWorkedWith: some Actor\n}\n\nsig Actor extends Person {\n hasWorkedWith: some Director + set Actor \n} {\n this not in hasWorkedWith\n}\n\nsig Movie {\n\n}\n\nsig Cast {\n\n}\n\n\nrun {}", "permalink": "why-gem-rental-tiny", "time": "2023-12-07 22:22:13.671352", "cmd": 1} {"id": 8520, "parent": 8515, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // Constraint 1\n some x: Person | Agatha in x.killed\n \n // Constraint 2\n all x, y: Person | y in x.killed implies (y in x.hates and not (y in x.richer))\n \n // Constraint 3\n all x: Person | x in Agatha.hates implies not (x in Charles.hates)\n \n // Constraint 4\n Agatha in Agatha.hates and Charles in Agatha.hates\n \n // Constraint 5\n all x: Person | not x.richer and Agatha implies x.hates and Butler\n \n // Constraint 6\n all x: Person | x.hates and Agatha implies x.hates and Butler\n \n // Constraint 7\n all x: Person | some y: Person | x.hates = y\n \n // Additional Constraints\n no Agatha.hates // Constraint 8\n Agatha != Butler // Constraint 9\n no x: Person | x.hates = x // Constraint 10\n}\n\nrun puzzle for 3", "permalink": "shimmy-subtly-corral-prayer", "time": "2023-12-07 22:22:34.478810", "cmd": 1} {"id": 8522, "parent": 8521, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\n\nsig Director extends Person {\n hasDirected: some Movie,\n hasWorkedWith: some Actor\n}\n\nsig Actor extends Person {\n hasWorkedWith: some Director and set Actor \n} {\n this not in hasWorkedWith\n}\n\nsig Movie {\n\n}\n\nsig Cast {\n\n}\n\n\nrun {}", "permalink": "take-dizzy-latch-apple", "time": "2023-12-07 22:23:02.958998", "cmd": 1} {"id": 8530, "parent": 8528, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // Constraint 1\n some x: Person | Agatha in x.killed\n \n // Constraint 2\n all x, y: Person | y in x.killed implies (y in x.hates and not (y in x.richer))\n \n // Constraint 3\n all x: Person | x in Agatha.hates implies not (x in Charles.hates)\n \n // Constraint 4\n Agatha in Agatha.hates and Charles in Agatha.hates\n \n // Constraint 5\n all x: Person | not(Agatha in x.richer) implies x in Butler.hates\n \n // Constraint 6\n all x: Person | x in Agatha.hates implies x in Butler.hates\n \n // Constraint 7\n all x: Person | some y: Person | not(y in x.hates)\n \n}\n\nrun puzzle for 3", "permalink": "job-hamper-wolf-edging", "time": "2023-12-07 22:26:19.154650", "cmd": 1} {"id": 8536, "parent": 8535, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\n\nsig Director extends Person {\n hasDirected: some Movie,\n hasWorkedWith: some Actor\n}\n\nsig Actor extends Person {\n hasWorkedWith: some Person - this,\n moviesActed: some Movie\n}\n\nsig Movie {\n director: one Director,\n cast: some Actor\n}\n\nsig Cast {\n movie: one Movie,\n actors: some Actor\n}\n\n\nrun {}", "permalink": "rabid-octane-outage-sprout", "time": "2023-12-07 22:30:29.904797", "cmd": 1} {"id": 8544, "parent": 8543, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: set File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or (some f.link and f.link in Trash)\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no p.link in Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash)\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no File.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv10", "permalink": "amiss-gush-gas-player", "time": "2023-12-07 22:35:47.404197", "cmd": 1} {"id": 8545, "parent": 8544, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: set File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or (some f.link and f.link in Trash)\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no p.link in Trash\n}\n \nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash)\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no File.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv10", "permalink": "oyster-uncle-cement-roman", "time": "2023-12-07 22:35:58.749971", "cmd": 1} {"id": 8546, "parent": 8545, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: set File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or (some f.link and f.link in Trash)\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no p.link in Trash \n}\n \nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash)\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no File.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv10", "permalink": "upper-verse-muster-bronco", "time": "2023-12-07 22:36:31.375731", "cmd": 1} {"id": 8551, "parent": 8550, "code": "// University Model\n\n// Signatures\nabstract sig Person {\n name: String,\n age: Int\n}\n\nsig Student extends Person {\n studentID: Int,\n major: String\n}\n\nsig Professor extends Person {\n staffID: Int,\n department: String\n}\n\nsig Course {\n courseCode: String,\n credits: Int\n}\n\nsig Classroom {\n roomNumber: Int,\n capacity: Int\n}\n\n// Inheritance\nfact StudentsArePeople {\n all s: Student | s in Person\n}\n\n// Facts\nfact CoursesHaveUniqueCodes {\n all disj c1, c2: Course | c1.courseCode != c2.courseCode\n}\n\n// Predicates\npred TeachingCapacity {\n all p: Professor, c: Course | some room: Classroom | room.capacity > 30 and room.capacity > #(p teaches c)\n}\n\npred EnrolledStudents {\n all c: Course | some s: Student | s.major = \"Computer Science\" and c in s.enrolledCourses\n}\n\n// Run Commands\nrun {\n // This run command is unsatisfiable\n some p: Professor | no c: Course | p.teaches c\n} for 5 but exactly 3 Professor, 3 Course\n\nrun {\n // This run command is satisfiable\n some s: Student, c: Course, p: Professor, r: Classroom | s.major = \"Computer Science\" and s.enrolledCourses = c and p.teaches c and TeachingCapacity and EnrolledStudents\n} for 5 but exactly 2 Student, 2 Course, 2 Professor, 2 Classroom", "permalink": "roping-grief-otter-stride", "time": "2023-12-07 22:38:38.752967", "cmd": 2} {"id": 8556, "parent": 8555, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: lone File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or (some f.link and f.link in Trash)\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no (p.link & Trash)\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash)\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no File.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv10\n\n/* No unprotected file should exist outside of Trash. */\npred inv11 {\n all f: File - Protected | f not in Trash\n}\n\nrun inv11\n\n/* If a link is deleted, the target should be deleted too. */\npred inv12 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv12\n\n/* A linked file should not be in trash. */\npred inv13 {\n all f: File | f.link in Trash implies not f in Trash\n}\nrun inv13", "permalink": "skater-proud-drove-abroad", "time": "2023-12-07 22:42:54.532043", "cmd": 1} {"id": 8571, "parent": 8570, "code": "// University Model\n\n// Signatures\nabstract sig Person {\n name: String,\n age: Int\n}\n\nsig Student extends Person {\n studentID: Int,\n major: String,\n enrolledCourses: set Course\n}\n\nsig Professor extends Person {\n staffID: Int,\n department: String\n}\n\nsig Course {\n courseCode: String,\n credits: Int\n}\n\nsig Classroom {\n roomNumber: Int,\n capacity: Int\n}\n\n// Inheritance\nfact StudentsArePeople {\n all s: Student | s in Person\n}\n\n// Facts\nfact CoursesHaveUniqueCodes {\n all disj c1, c2: Course | c1.courseCode != c2.courseCode\n}\n\n// Predicates\npred TeachingCapacity[p: Professor, c: Course, r: Classroom] {\n some room: r | room.capacity > 30 \n //and room.capacity > #(p teaches c)\n}\n\npred EnrolledStudents {\n all c: Course | some s: Student | s.major = \"Computer Science\" and c in s.enrolledCourses\n}\n\n// Run Commands\nrun {\n // This run command is unsatisfiable\n some p: Professor | no c: Course | p.teaches c\n} for 5 but exactly 3 Professor, 3 Course\n\nrun {\n // This run command is satisfiable\n some s: Student, c: Course, p: Professor, r: Classroom | s.major = \"Computer Science\" and c in s.enrolledCourses and TeachingCapacity[p, c, r] and EnrolledStudents\n} for 5 but exactly 2 Student, 2 Course, 2 Professor, 2 Classroom", "permalink": "posted-thud-drift-jockey", "time": "2023-12-07 22:46:45.846370", "cmd": 1} {"id": 8573, "parent": 8572, "code": "// University Model\n\n// Signatures\nabstract sig Person {\n name: String,\n age: Int\n}\n\nsig Student extends Person {\n studentID: Int,\n major: String,\n enrolledCourses: set Course\n}\n\nsig Professor extends Person {\n staffID: Int,\n department: String\n}\n\nsig Course {\n courseCode: String,\n credits: Int\n}\n\nsig Classroom {\n roomNumber: Int,\n capacity: Int\n}\n\n// Inheritance\nfact StudentsArePeople {\n all s: Student | s in Person\n}\n\n// Facts\nfact CoursesHaveUniqueCodes {\n all disj c1, c2: Course | c1.courseCode != c2.courseCode\n}\n\n// Predicates\npred TeachingCapacity[p: Professor, c: Course, r: Classroom] {\n some room: r | room.capacity > 30 \n //and room.capacity > #(p teaches c)\n}\n\npred EnrolledStudents {\n all c: Course | some s: Student | s.major = \"Computer Science\" and c in s.enrolledCourses\n}\n\n// Run Commands\nrun {\n // This run command is unsatisfiable\n some p: Professor | no c: Course | p.teaches c\n} for 5 but exactly 3 Professor, 3 Course\n\nrun {\n // This run command is satisfiable\n some s: Student, c: Course, p: Professor, r: Classroom | s.major = \"Computer Science\" and c in s.enrolledCourses and TeachingCapacity[p, c, r] and EnrolledStudents\n} for 5 but exactly 2 Student, 2 Course, 2 Professor, 2 Classroom", "permalink": "celtic-net-blade-mumbo", "time": "2023-12-07 22:47:00.819820", "cmd": 1} {"id": 8579, "parent": 8578, "code": "// University Model\n\n// Signatures\nabstract sig Person {\n name: String,\n age: Int\n}\n\nsig Student extends Person {\n studentID: Int,\n major: String,\n enrolledCourses: set Course\n}\n\nsig Professor extends Person {\n staffID: Int,\n department: String,\n teaches: set Course\n}\n\nsig Course {\n courseCode: String,\n credits: Int\n}\n\nsig Classroom {\n roomNumber: Int,\n capacity: Int\n}\n\n// Inheritance\nfact StudentsArePeople {\n all s: Student | s in Person\n}\n\n// Facts\nfact CoursesHaveUniqueCodes {\n all disj c1, c2: Course | c1.courseCode != c2.courseCode\n}\n\n// Predicates\npred TeachingCapacity[p: Professor, c: Course, r: Classroom] {\n some room: r | room.capacity > 30 \n //and room.capacity > #(p.teaches & c)\n}\n\npred EnrolledStudents {\n all c: Course | some s: Student | s.major = \"Computer Science\" and c in s.enrolledCourses\n}\n\n// Run Commands\nrun {\n // This run command is unsatisfiable\n some p: Professor | no c: Course | c in p.teaches\n} for 5 \n//but exactly 3 Professor, 3 Course\n\nrun {\n // This run command is satisfiable\n some s: Student, c: Course, p: Professor, r: Classroom | s.major = \"Computer Science\" and c in s.enrolledCourses and TeachingCapacity[p, c, r] and EnrolledStudents\n} for 5 but exactly 2 Student, 2 Course, 2 Professor, 2 Classroom", "permalink": "mouth-shower-casket-region", "time": "2023-12-07 22:48:57.849429", "cmd": 1} {"id": 8593, "parent": 8592, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: lone File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no (p.link & Trash)\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\n\npred inv7 {\n all f: File | f.link in Trash implies not f in Trash and not f.link in Trash\n}\n\nrun inv7\n\n/* There are no links. */ \npred inv8 {\n no File.link \n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash and not f.link in Trash\n}\nrun inv10\n\n/* No unprotected file should exist outside of Trash. */\npred inv11 {\n all f: File - Protected | f not in Trash and not f.link in Trash\n}\nrun inv11\n\n/* If a link is deleted, the target should be deleted too. */\npred inv12 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv12\n\n/* A linked file should not be in trash. */\npred inv13 {\n all f: File | f.link in Trash implies not f in Trash\n}\nrun inv13", "permalink": "harbor-romp-cheek-mummy", "time": "2023-12-07 23:01:03.661903", "cmd": 1} {"id": 8599, "parent": 8598, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: lone File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no (p.link & Trash)\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\n\npred inv7 {\n all f: File | f.link in Trash implies not f in Trash and not f.link in Trash\n}\n\nrun inv7\n\n/* There are no links. */ \npred inv8 {\n no File.link \n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash and not f.link in Trash\n}\nrun inv10\n\n/* No unprotected file should exist outside of Trash. */\npred inv11 {\n all f: File - Protected | f not in Trash and not f.link in Trash\n}\nrun inv11\n\n/* If a link is deleted, the target should be deleted too. */\npred inv12 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv12\n\n/* A linked file should not be in trash. */\npred inv13 {\n all f: File | f.link in Trash implies not f in Trash\n}\nrun inv13", "permalink": "active-skiing-vacate-gooey", "time": "2023-12-07 23:12:03.961990", "cmd": 1} {"id": 8613, "parent": 8612, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n all f: Trash | no f.link\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n //or some f.link in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | not p in Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n no disj f1, f2: File | f1.link & f2.link = none\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f1, f2: File | f1.link & f2.link = none\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | l in Trash implies f in Trash\n}\n\nrun inv10", "permalink": "yonder-jiffy-pasted-taste", "time": "2023-12-07 23:25:01.790253", "cmd": 6} {"id": 8615, "parent": 8604, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: lone File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or (some f.link and f.link in Trash) or (no f.link and f not in File)\n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no (p.link & Trash)\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\n\npred inv7 {\n all f: File | f.link in Trash implies not f in Trash and not f.link in Trash\n}\n\nrun inv7\n\n/* There are no links. */ \npred inv8 {\n no File.link \n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash and not f.link in Trash\n}\nrun inv10\n\n/* No unprotected file should exist outside of Trash. */\npred inv11 {\n all f: File - Protected | f not in Trash and not f.link in Trash\n}\nrun inv11\n\n/* If a link is deleted, the target should be deleted too. */\npred inv12 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv12\n\n/* A linked file should not be in trash. */\npred inv13 {\n all f: File | f.link in Trash implies not f in Trash\n}\nrun inv13", "permalink": "repeal-lesser-canola-pry", "time": "2023-12-07 23:25:05.975742", "cmd": 2} {"id": 8617, "parent": 8615, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: lone File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or (some f.link and f.link in Trash) or (no f.link and f not in File)\n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no (p.link & Trash)\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\n\npred inv7 {\n all f: File | f.link in Trash implies not f in Trash and not f.link in Trash\n}\n\nrun inv7\n\n/* There are no links. */ \npred inv8 {\n no File.link \n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash and not f.link in Trash\n}\nrun inv10\n\n/* No unprotected file should exist outside of Trash. */\npred inv11 {\n all f: File - Protected | f not in Trash and not f.link in Trash\n}\nrun inv11\n\n/* If a link is deleted, the target should be deleted too. */\npred inv12 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv12\n\n/* A linked file should not be in trash. */\npred inv13 {\n all f: File | f.link in Trash implies not f in Trash\n}\nrun inv13", "permalink": "umpire-petal-angles-aorta", "time": "2023-12-07 23:25:08.891352", "cmd": 3} {"id": 8627, "parent": 8626, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: lone File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or (some f.link and f.link in Trash) or (no f.link and f not in File)\n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no (p.link & Trash)\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\n\npred inv7 {\n all f: File | f.link in Trash implies not f in Trash and not f.link in Trash\n}\n\nrun inv7\n\n/* There are no links. */ \npred inv8 {\n no File.link \n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash and not f.link in Trash\n}\nrun inv10\n\n/* No unprotected file should exist outside of Trash. */\npred inv11 {\n all f: File - Protected | f not in Trash and not f.link in Trash\n}\nrun inv11\n\n/* If a link is deleted, the target should be deleted too. */\npred inv12 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv12\n\n/* A linked file should not be in trash. */\npred inv13 {\n all f: File | f.link in Trash implies not f in Trash\n}\nrun inv13", "permalink": "keep-outer-bunion-paper", "time": "2023-12-07 23:25:37.234760", "cmd": 11} {"id": 8628, "parent": 8620, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n all f: Trash | no f.link\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n //or some f.link in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | not p in Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n no disj f1, f2: File | \n //f1.link & f2.link = none\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f1, f2: File | f1.link & f2.link = none\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | l in Trash implies f in Trash\n}\n\nrun inv10", "permalink": "trial-amigo-manual-ahead", "time": "2023-12-07 23:28:41.604417", "cmd": 6} {"id": 8633, "parent": 8627, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: lone File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n //or (some f.link and f.link in Trash) or (no f.link and f not in File)\n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no (p.link & Trash)\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\n\npred inv7 {\n all f: File | f.link in Trash implies not f in Trash and not f.link in Trash\n}\n\nrun inv7\n\n/* There are no links. */ \npred inv8 {\n no File.link \n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash and not f.link in Trash\n}\nrun inv10\n\n/* No unprotected file should exist outside of Trash. */\npred inv11 {\n all f: File - Protected | f not in Trash and not f.link in Trash\n}\nrun inv11\n\n/* If a link is deleted, the target should be deleted too. */\npred inv12 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv12\n\n/* A linked file should not be in trash. */\npred inv13 {\n all f: File | f.link in Trash implies not f in Trash\n}\nrun inv13", "permalink": "stoke-undead-stock-scrap", "time": "2023-12-07 23:30:48.963027", "cmd": 6} {"id": 8658, "parent": 8657, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\n\nsig Director extends Person {\n movies_directed: set Movie,\n}\n\n//sig Actor extends Person {\n// movies_acted: set Movie\n//}\n\nsig Movie {\n director: Director,\n// actors: some Actor\n}\n\nrun {}", "permalink": "snazzy-curing-uneven-shabby", "time": "2023-12-08 00:21:54.338041", "cmd": 1} {"id": 8659, "parent": 8656, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n //or some f.link in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n //no disj f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n all f: File | f.link in File\n //no f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n //all f: File | f.link in Trash implies f in Trash\n all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\n}\n\nrun inv10", "permalink": "palace-tamale-bagel-oaf", "time": "2023-12-08 00:25:27.062634", "cmd": 10} {"id": 8660, "parent": 8658, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\n\nsig Movie {\n director: Director,\n// actors: some Actor\n}\n\nsig Director extends Person {\n movies_directed: set Movie,\n}\n\n//sig Actor extends Person {\n// movies_acted: set Movie\n//}\n\n\n\nrun {}", "permalink": "revoke-slider-rally-pebbly", "time": "2023-12-08 00:25:55.823311", "cmd": 1} {"id": 8662, "parent": 8660, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\n\nsig Director extends Person {\n movies_directed: some Movie,\n worked_with: some Actor\n}\n\nsig Actor extends Person {\n movies_acted: some Movie,\n worked_with: (+ (some Director) (set Actor))\n}\n\nsig Movie {\n director: Director, \n actors: some Actor\n}\n\n\n\nrun {}", "permalink": "swoosh-debug-figure-boat", "time": "2023-12-08 00:30:11.573260", "cmd": 1} {"id": 8668, "parent": 8667, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n //or some f.link in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n //no disj f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n //all f: File | f.link in File\n //no f1, f2: File | f1.link & f2.link != none\n //all f: File | lone f.link and no f.link\n all f: File | lone f.link or no f.link or f.link in File\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n //all f: File | f.link in Trash implies f in Trash\n all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\n}\n\nrun inv10", "permalink": "maimed-narrow-relic-liable", "time": "2023-12-08 00:39:48.699592", "cmd": 9} {"id": 8384, "parent": 8242, "code": "// Define a simple model\nsig Person {\n name: String,\n age: Int\n}\n\nfact LegalDrivingAge {\n all p: Person | p.age >= 20\n}\n\n// Run command to check if all persons are under 16 years old\nrun underagePersonsExample {\n all p: Person | p in p and p not in p\n}", "permalink": "purist-jot-entire-babied", "time": "2023-12-07 17:58:22.869324", "cmd": 1} {"id": 8386, "parent": 8385, "code": "// Define a simple model\nsig Person {\n name: String,\n age: Int\n}\n\nfact LegalDrivingAge {\n all p: Person | p.age >= 20\n}\n\n// Run command to check if all persons are under 16 years old\nrun underagePersonsExample {\n all p: Person | p =0 \n}", "permalink": "aqua-herbal-wisdom-aching", "time": "2023-12-07 17:59:22.002640", "cmd": 1} {"id": 8389, "parent": 8252, "code": "sig A {}\n\n// Inconsistent fact\nfact InconsistentExample {\n all a: A | a in a and a not in a\n}\n\nrun InconsistentRun {\n // This run command checks for consistency\n all a: A | a in a and a not in a\n}", "permalink": "engulf-parka-kennel-shrunk", "time": "2023-12-07 18:00:45.631690", "cmd": 1} {"id": 8392, "parent": 8251, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// Signatures\nsig User {\n username: String,\n email: String\n}\n\nabstract sig Product {\n productId: Int,\n name: String,\n price: Int,\n seller: User\n}\n\nsig ElectronicProduct extends Product {\n brand: String,\n warrantyPeriod: Int\n}\n\nsig ClothingProduct extends Product {\n size: String,\n brand: String\n}\n\nsig Transaction {\n transactionId: Int,\n buyer: User,\n seller: User,\n product: Product\n}\n\nsig Feedback {\n feedbackId: Int,\n rating: Int,\n comment: String,\n user: User\n}\n\n// Fields\nfact uniqueUsernames {\n all u1, u2: User | u1 != u2 implies u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all t1, t2: Transaction | t1 != t2 implies t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all f1, f2: Feedback | f1 != f2 implies f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is intentionally unsatisfiable for demonstration purposes\n all p1, p2: Product | p1 = p2 implies p1.productId = p2.productId and #p1.productId > 0\n}\n\n// run satisfiableExample {\n// // This command is designed to be satisfiable\n// all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n// }\n\n// run {} for 3", "permalink": "filing-muster-hazy-mug", "time": "2023-12-07 18:13:19.400655", "cmd": 1} {"id": 8393, "parent": null, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // There exists a person x such that x killed Agatha\n some x: Person | x in Agatha.killed\n\n // If someone x killed someone y, then x hates y and x is not richer than y\n all x, y: Person |\n (x in y.killed => x in y.hates and no x' | x' in y.richer)\n\n all x: Person | (Agatha.hates[x] implies no Charles.hates[x])\n Agatha.hates[Agatha] and Agatha.hates[Charles]\n all x: Person | (no x.richer[Agatha] implies Butler.hates[x])\n all x: Person | (Agatha.hates[x] implies Butler.hates[x])\n all x: Person | some y: Person | not (x in y.hates)\n}\n\nrun puzzle", "permalink": "reseal-afar-musket-stew", "time": "2023-12-07 18:16:50.177823", "cmd": 1} {"id": 8394, "parent": 8373, "code": "// Music Festival Alloy Model\n\n// Signatures\nabstract sig Person { pid: Int, name: String }\n\nsig Artist extends Person { genre: String }\n\nsig Attendee extends Person { ticketId: Int }\n\nsig Stage { stageId: Int, name: String, capacity: Int }\n\nsig Organizer extends Person { role: String }\n\n// Fields\nfact uniquePersonId {\n all disj p1, p2: Person | p1.pid != p2.pid\n}\n\nfact uniqueStageId {\n all disj st1, st2: Stage | st1.stageId != st2.stageId\n}\n\n// Inheritance\nfact artistInheritance { all a: Artist | a in Person }\n\n// Facts\nfact artistsPerformOnDifferentStages {\n all disj a1, a2: Artist, s1, s2: Stage |\n (a1 != a2 and s1 != s2) implies a1.performanceStage != s2\n}\n\nfact organizersHaveUniqueRoles {\n all disj o1, o2: Organizer | o1 != o2 implies o1.role != o2.role\n}\n\n// Predicates\npred attendeeBuysTicket[a: Attendee] {\n some f: Stage | a in f.attendee\n}\n\npred artistPerformsOnStage[a: Artist, s: Stage] {\n a.performanceStage = s\n}\n\n// Run commands\nrun unsatisfiableExample {\n // This run command should be unsatisfiable\n // Add constraints that make the model unsatisfiable\n no s: Stage, a: Artist | s.capacity < #a.artistPerformance\n}\n\nrun satisfiableExample {\n // This run command should be satisfiable\n // Adjust the bound as needed\n some a: Artist, s: Stage | artistPerformsOnStage[a, s] and attendeeBuysTicket[s.attendees]\n}", "permalink": "maggot-groin-fall-curtsy", "time": "2023-12-07 18:22:42.448059", "cmd": 2} {"id": 8395, "parent": 8394, "code": "// Music Festival Alloy Model\n\n// Signatures\nabstract sig Person { pid: Int, name: String }\n\nsig Artist extends Person { genre: String }\n\nsig Attendee extends Person { ticketId: Int }\n\nsig Stage { stageId: Int, name: String, capacity: Int }\n\nsig Organizer extends Person { role: String }\n\n// Fields\nfact uniquePersonId {\n all disj p1, p2: Person | p1.pid != p2.pid\n}\n\nfact uniqueStageId {\n all disj st1, st2: Stage | st1.stageId != st2.stageId\n}\n\n// Inheritance\nfact artistInheritance { all a: Artist | a in Person }\n\n// Facts\nfact artistsPerformOnDifferentStages {\n all disj a1, a2: Artist, s1, s2: Stage |\n (a1 != a2 and s1 != s2) implies a1.performanceStage != s2\n}\n\nfact organizersHaveUniqueRoles {\n all disj o1, o2: Organizer | o1 != o2 implies o1.role != o2.role\n}\n\n// Predicates\npred attendeeBuysTicket[a: Attendee] {\n some f: Stage | a in f.attendee\n}\n\npred artistPerformsOnStage[a: Artist, s: Stage] {\n a.performanceStage = s\n}\n\n// Run commands\nrun unsatisfiableExample {\n // This run command should be unsatisfiable\n // Add constraints that make the model unsatisfiable\n no s: Stage, a: Artist | s.capacity < #a.artistPerformance\n}\n\n/*run satisfiableExample {\n // This run command should be satisfiable\n // Adjust the bound as needed\n some a: Artist, s: Stage | artistPerformsOnStage[a, s] and attendeeBuysTicket[s.attendees]\n}*/", "permalink": "brute-fiber-cake-bluish", "time": "2023-12-07 18:23:49.991854", "cmd": 1} {"id": 8407, "parent": 8406, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: set File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n all f: Trash | no f.link\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no p.link\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n all f: File, l: f.link | l not in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f: File, l: f.link | some l.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | (l in Trash) implies (f in Trash)\n}\n\nrun inv10", "permalink": "unsold-camera-museum-hedge", "time": "2023-12-07 19:34:03.542592", "cmd": 2} {"id": 8408, "parent": 8407, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: set File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no p in Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n all f: File, l: f.link | l not in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f: File, l: f.link | some l.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | (l in Trash) implies (f in Trash)\n}\n\nrun inv10", "permalink": "armed-resize-chop-eatery", "time": "2023-12-07 19:41:48.395619", "cmd": 2} {"id": 8409, "parent": 8408, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: set File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no p in Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n all f: File, l: f.link | l not in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f: File, l: f.link | some l.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | (l in Trash) implies (f in Trash)\n}\n\nrun inv10", "permalink": "sheep-poncho-panda-tibia", "time": "2023-12-07 19:42:02.082200", "cmd": 2} {"id": 8410, "parent": 8409, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: set File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1 for 3\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash\n}\n\nrun inv2 for 3\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3 for 3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no p in Trash\n}\n\nrun inv4 for 3\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash\n}\n\nrun inv5 for 3\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6 for 3\n\n/* No linked file is deleted. */\npred inv7 {\n all f: File, l: f.link | l not in Trash\n}\n\nrun inv7 for 3\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8 for 3\n\n/* A link does not link to another link. */\npred inv9 {\n no f: File, l: f.link | some l.link\n}\n\nrun inv9 for 3\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | (l in Trash) implies (f in Trash)\n}\n\nrun inv10 for 3", "permalink": "basin-legend-print-cactus", "time": "2023-12-07 19:43:04.664501", "cmd": 2} {"id": 8416, "parent": 8415, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // Constraint 1\n some x: Person | x in Agatha.killed\n \n // Constraint 2\n all x, y: Person | x.killed = y implies (x.hates = y and not x.richer = y)\n \n // Constraint 3\n all x: Person - Agatha | (not x.hates) and Agatha implies (not x.hates) and Charles\n \n // Constraint 4\n Agatha.hates = Agatha + Charles\n \n // Constraint 5\n all x: Person | not x.richer & Agatha implies x.hates & Butler\n \n // Constraint 6\n all x: Person | x.hates & Agatha implies x.hates & Butler\n \n // Constraint 7\n all x: Person | some y: Person | x.hates = y\n \n // Additional Constraints\n no Agatha.hates // Constraint 8\n Agatha != Butler // Constraint 9\n no x: Person | x.hates = x // Constraint 10\n}\n\nrun puzzle for 3", "permalink": "swoosh-savage-crib-stooge", "time": "2023-12-07 20:06:22.161326", "cmd": 1} {"id": 8420, "parent": 8419, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // Constraint 1\n some x: Person | x in Agatha.killed\n \n // Constraint 2\nall x, y: Person | x.killed = y implies (x.hates & y and not x.richer & y)\n\n // Constraint 3\n all x: Person - Agatha | (not x.hates) and Agatha implies (not x.hates) and Charles\n \n // Constraint 4\n Agatha.hates = Agatha + Charles\n \n // Constraint 5\n all x: Person | not x.richer & Agatha implies x.hates & Butler\n \n // Constraint 6\nall x: Person | x.hates & Agatha implies x.hates & Butler\n\n // Constraint 7\n all x: Person | some y: Person | x.hates = y\n \n // Additional Constraints\n no Agatha.hates // Constraint 8\n Agatha != Butler // Constraint 9\n no x: Person | x.hates = x // Constraint 10\n}\n\nrun puzzle for 3", "permalink": "sizzle-value-storm-finch", "time": "2023-12-07 20:09:45.658720", "cmd": 1} {"id": 8421, "parent": 8420, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // Constraint 1\n some x: Person | x in Agatha.killed\n \n // Constraint 2\n all x, y: Person | x.killed = y implies (x.hates = y and not x.richer = y)\n \n // Constraint 3\n all x: Person - Agatha | not x.hates & Agatha implies not x.hates & Charles\n \n // Constraint 4\n Agatha.hates = Agatha + Charles\n \n // Constraint 5\n all x: Person | not x.richer & Agatha implies x.hates & Butler\n \n // Constraint 6\n all x: Person | x.hates & Agatha implies x.hates & Butler\n \n // Constraint 7\n all x: Person | some y: Person | x.hates = y\n \n // Additional Constraints\n no Agatha.hates // Constraint 8\n Agatha != Butler // Constraint 9\n no x: Person | x.hates = x // Constraint 10\n}\n\nrun puzzle for 3", "permalink": "bounce-chance-tasty-lid", "time": "2023-12-07 20:10:04.909588", "cmd": 1} {"id": 8422, "parent": 8421, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // Constraint 1\n some x: Person | x in Agatha.killed\n \n // Constraint 2\n all x, y: Person | x.killed = y implies (x.hates = y and not x.richer = y)\n \n // Constraint 3\n all x: Person - Agatha | not x.hates & Agatha implies not x.hates & Charles\n \n // Constraint 4\n Agatha.hates = Agatha + Charles\n \n // Constraint 5\n all x: Person | not x.richer & Agatha implies x.hates & Butler\n \n // Constraint 6\n all x: Person | x.hates & Agatha implies x.hates & Butler\n \n // Constraint 7\n all x: Person | some y: Person | x.hates = y\n \n // Additional Constraints\n no Agatha.hates // Constraint 8\n Agatha != Butler // Constraint 9\n no x: Person | x.hates = x // Constraint 10\n}\n\nrun puzzle for 3", "permalink": "autism-chubby-strewn-clean", "time": "2023-12-07 20:10:18.553078", "cmd": 1} {"id": 8425, "parent": 8424, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // Constraint 1\n some x: Person | x in Agatha.killed\n \n // Constraint 2\n all x, y: Person | x.killed = y implies (x.hates = y and not x.richer = y)\n \n // Constraint 3\n all x: Person - Agatha | not x.hates and Agatha implies not x.hates and Charles\n \n // Constraint 4\n Agatha.hates = Agatha + Charles\n \n // Constraint 5\n all x: Person | not x.richer and Agatha implies x.hates and Butler\n \n // Constraint 6\n all x: Person | x.hates and Agatha implies x.hates and Butler\n \n // Constraint 7\n all x: Person | some y: Person | x.hates = y\n \n // Additional Constraints\n no Agatha.hates // Constraint 8\n Agatha != Butler // Constraint 9\n no x: Person | x.hates = x // Constraint 10\n}\n\nrun puzzle for 3", "permalink": "dowry-elves-cussed-alarm", "time": "2023-12-07 20:18:54.825350", "cmd": 1} {"id": 8429, "parent": 8428, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // Constraint 1\n some x: Person | x in Agatha.killed\n \n // Constraint 2\n all x, y: Person | (x.killed = y) implies (x.hates = y and not (x.richer = y))\n \n // Constraint 3\n all x: Person | not x.hates and Agatha implies not x.hates and Charles\n \n // Constraint 4\n Agatha.hates = Agatha + Charles\n \n // Constraint 5\n // all x: Person | not x.richer and Agatha implies x.hates and Butler\n \n // Constraint 6\n // all x: Person | x.hates and Agatha implies x.hates and Butler\n \n // Constraint 7\n all x: Person | some y: Person | x.hates = y\n \n // Additional Constraints\n no Agatha.hates // Constraint 8\n Agatha != Butler // Constraint 9\n no x: Person | x.hates = x // Constraint 10\n}\n\nrun puzzle for 3", "permalink": "clamor-step-statue-parlor", "time": "2023-12-07 20:23:25.969219", "cmd": 1} {"id": 8433, "parent": 8432, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: set File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n No protected & Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n all f: File, l: f.link | l not in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f: File, l: f.link | some l.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f in Trash implies all l: f.link | l in Trash\n}\n\nrun inv10", "permalink": "jingle-dilute-utmost-radish", "time": "2023-12-07 20:43:55.635959", "cmd": 1} {"id": 8435, "parent": 8434, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: set File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n No Protected & Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n all f: File, l: f.link | l not in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f: File, l: f.link | some l.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f in Trash implies all l: f.link | l in Trash\n}\n\nrun inv10", "permalink": "prefix-dealt-state-drift", "time": "2023-12-07 20:44:54.097321", "cmd": 1} {"id": 8436, "parent": 8435, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: set File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n all f: File, l: f.link | l not in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f: File, l: f.link | some l.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f in Trash implies all l: f.link | l in Trash\n}\n\nrun inv10", "permalink": "robust-creme-oblong-mangle", "time": "2023-12-07 20:45:09.852703", "cmd": 1} {"id": 8439, "parent": 8438, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\nabstract sig Person {\n name: one String,\n age: one Int\n}\n\nsig Doctor extends Person {\n specialty: one String,\n patients: set Patient\n}\n\nsig Nurse extends Person {\n department: one String,\n assignedDoctors: set Doctor\n}\n\nsig Patient extends Person {\n disease: one String,\n attendingDoctor: one Doctor\n}\n\nsig Appointment {\n patient: one Patient,\n doctor: one Doctor,\n timeSlot: one TimeSlot\n}\n\nsig TimeSlot {\n startTime: one Int,\n endTime: one Int\n}\n\nfact NoSelfTreatment {\n all d: Doctor | no p: d.patients | p.attendingDoctor = d\n}\n\nfact ConsistentDoctorAssignment {\n all p: Patient, d: Doctor | p.attendingDoctor = d iff p in d.patients\n}\n\npred isAvailable[d: Doctor, t: TimeSlot] {\n no a: Appointment | a.doctor = d and a.timeSlot = t\n}\n\npred needsSpecialist[p: Patient, s: String] {\n p.disease = s\n}\n\nrun { some p: Patient, d: Doctor | p.attendingDoctor = d and p in d.patients } for 3 but 2 Doctor, 2 Patient, 3 TimeSlot, 2 Nurse\nrun { all d: Doctor | no p: Patient | p in d.patients and p.attendingDoctor = d } for 3 but 2 Doctor, 2 Patient, 3 TimeSlot, 2 Nurse", "permalink": "plot-padded-squad-outage", "time": "2023-12-07 20:54:30.743814", "cmd": 2} {"id": 8442, "parent": 8441, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {\n name: one String,\n age: one Int\n}\n\nsig Doctor extends Person {\n specialty: one String,\n patients: set Patient\n}\n\nsig Nurse extends Person {\n department: one String,\n assignedDoctors: set Doctor\n}\n\nsig Patient extends Person {\n disease: one String,\n attendingDoctor: one Doctor\n}\n\nsig Appointment {\n patient: one Patient,\n doctor: one Doctor,\n timeSlot: one TimeSlot\n}\n\nsig TimeSlot {\n startTime: one Int,\n endTime: one Int\n}\n\nfact NoSelfTreatment {\n all d: Doctor | no p: d.patients | p.attendingDoctor = d\n}\n\nfact ConsistentDoctorAssignment {\n all p: Patient, d: Doctor | p.attendingDoctor = d iff p in d.patients\n}\n\npred isAvailable[d: Doctor, t: TimeSlot] {\n no a: Appointment | a.doctor = d and a.timeSlot = t\n}\n\npred needsSpecialist[p: Patient, s: String] {\n p.disease = s\n}\n\nrun { some p: Patient, d: Doctor | p.attendingDoctor = d and p in d.patients } for 3 but 2 Doctor, 2 Patient, 3 TimeSlot, 2 Nurse\nrun { all d: Doctor | no p: Patient | p in d.patients and p.attendingDoctor = d } for 3 but 2 Doctor, 2 Patient, 3 TimeSlot, 2 Nurse", "permalink": "raging-target-zap-avoid", "time": "2023-12-07 20:56:32.225575", "cmd": 1} {"id": 8445, "parent": 8440, "code": "// Basic Types\nsig String {}\nsig Int {}\n\n// User Signature\nsig User {\n username: lone String,\n email: lone String\n}\n\n// Abstract Product Signature\nabstract sig Product {\n productId: lone Int,\n name: lone String,\n price: lone Int,\n seller: lone User\n}\n\n// Electronic Product Inheriting from Product\nsig ElectronicProduct extends Product {\n brand: lone String,\n warrantyPeriod: lone Int\n}\n\n// Clothing Product Inheriting from Product\nsig ClothingProduct extends Product {\n size: lone String,\n brand: lone String\n}\n\n// Transaction Signature\nsig Transaction {\n transactionId: lone Int,\n buyer: lone User,\n seller: lone User,\n product: lone Product\n}\n\n// Feedback Signature\nsig Feedback {\n feedbackId: lone Int,\n rating: lone Int,\n comment: lone String,\n user: lone User\n}\n\n// Fact: Unique Usernames\nfact uniqueUsernames {\n all u1, u2: User | u1 != u2 implies u1.username != u2.username\n}\n\n// Fact: Unique Product IDs\nfact uniqueProductIds {\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\n// Fact: Unique Transaction IDs\nfact uniqueTransactionIds {\n all t1, t2: Transaction | t1 != t2 implies t1.transactionId != t2.transactionId\n}\n\n// Fact: Unique Feedback IDs\nfact uniqueFeedbackIds {\n all f1, f2: Feedback | f1 != f2 implies f1.feedbackId != f2.feedbackId\n}\n\n// Predicate: Valid Transaction\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\n// Predicate: Positive Feedback\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Command: Unsatisfiable Example\nrun unsatisfiableExample for 4 {\n // This command is intentionally unsatisfiable for demonstration purposes\n all p1, p2: Product | p1 != p2 implies p1.productId = p2.productId\n}\n\n// Run Command: Satisfiable Example\nrun satisfiableExample for 4 {\n // This command is designed to be satisfiable\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}", "permalink": "smell-turban-mutt-unbend", "time": "2023-12-07 21:08:42.172751", "cmd": 1} {"id": 8455, "parent": 7058, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\n// Signatures\nabstract sig User {\n username: one Username,\n email: one Email\n}\n\nabstract sig Product {\n productId: one Int,\n name: one Name,\n price: one Int,\n seller: one User\n}\n\nsig ElectronicProduct extends Product {\n brand: one Brand,\n warrantyPeriod: one Int\n}\n\nsig ClothingProduct extends Product {\n size: one Size,\n brand: one Brand\n}\n\nsig Transaction {\n transactionId: one Int,\n buyer: one User,\n seller: one User,\n product: one Product\n}\n\nsig Feedback {\n feedbackId: one Int,\n rating: one Int,\n comment: one Comment,\n user: one User\n}\n\n// Basic Types\nabstract sig Username, Email, Name, Brand, Size, Comment {}\n\n// Facts\nfact uniqueUsernames {\n all disj u1, u2: User | u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all disj p1, p2: Product | p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all disj t1, t2: Transaction | t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all disj f1, f2: Feedback | f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample for 4 {\n // Intentionally unsatisfiable\n some p: Product | no p.productId\n}\n\nrun satisfiableExample for 4 {\n // Satisfiable\n some p: Product | some p.productId\n}", "permalink": "swell-life-rehire-onward", "time": "2023-12-07 21:18:57.159521", "cmd": 1} {"id": 8460, "parent": 8458, "code": "// Basic Types\nabstract sig String {}\nabstract sig Int {}\n\n// User Signature\nsig User {\n username: one String,\n email: one String\n}\n\n// Abstract Product Signature\nabstract sig Product {\n productId: one Int,\n name: one String,\n price: one Int,\n seller: one User\n}\n\n// Electronic Product Inheriting from Product\nsig ElectronicProduct extends Product {\n brand: one String,\n warrantyPeriod: one Int\n}\n\n// Clothing Product Inheriting from Product\nsig ClothingProduct extends Product {\n size: one String,\n brand: one String\n}\n\n// Transaction Signature\nsig Transaction {\n transactionId: one Int,\n buyer: one User,\n seller: one User,\n product: one Product\n}\n\n// Feedback Signature\nsig Feedback {\n feedbackId: one Int,\n rating: one Int,\n comment: one String,\n user: one User\n}\n\n// Fact: Unique Usernames\nfact uniqueUsernames {\n all disj u1, u2: User | u1.username != u2.username\n}\n\n// Fact: Unique Product IDs\nfact uniqueProductIds {\n all disj p1, p2: Product | p1.productId != p2.productId\n}\n\n// Fact: Unique Transaction IDs\nfact uniqueTransactionIds {\n all disj t1, t2: Transaction | t1.transactionId != t2.transactionId\n}\n\n// Fact: Unique Feedback IDs\nfact uniqueFeedbackIds {\n all disj f1, f2: Feedback | f1.feedbackId != f2.feedbackId\n}\n\n// Predicate: Valid Transaction\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\n// Predicate: Positive Feedback\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Command: Unsatisfiable Example\nrun unsatisfiableExample for 4 but 3 String, 3 Int {\n // Intentionally unsatisfiable\n some p: Product | no p.productId\n}\n\n// Run Command: Satisfiable Example\nrun satisfiableExample for 4 but 3 String, 3 Int {\n // Satisfiable\n some p: Product | some p.productId\n}", "permalink": "collie-pounce-foam-wife", "time": "2023-12-07 21:21:04.927605", "cmd": 2} {"id": 8462, "parent": 8461, "code": "// Agatha, Charles, and Butler model in Alloy\n\n// Signatures\nsig Person {}\n\n// Individuals\none sig Agatha, Charles, Butler: Person {}\n\n// Facts\nfact individualsExist {\n some Agatha, Charles, Butler: Person | true\n}\n\n// Predicates\npred hates[p1, p2: Person] {\n (p1 = Agatha && p2 = Charles) ||\n (p1 = Butler && p2 = Agatha) ||\n (p1 = Agatha && p2 = Agatha) ||\n (p1 = Butler && p2 = Charles)\n}\n\npred killed[p1, p2: Person] {\n p1 = Agatha && p2 = Agatha\n}\n\npred richer[p1, p2: Person] {\n p1 = Butler && p2 = Agatha\n}\n\n// Run command (to check satisfaction)\nrun satisfyPredicates for 3\n\n// Check the predicates for each combination of individuals\nfact checkHates {\n all p1, p2: Person | hates[p1, p2] <=> (\n (p1 = Agatha && p2 = Charles) ||\n (p1 = Butler && p2 = Agatha) ||\n (p1 = Agatha && p2 = Agatha) ||\n (p1 = Butler && p2 = Charles)\n )\n}\n\nfact checkKilled {\n all p1, p2: Person | killed[p1, p2] <=> (p1 = Agatha && p2 = Agatha)\n}\n\nfact checkRicher {\n all p1, p2: Person | richer[p1, p2] <=> (p1 = Butler && p2 = Agatha)\n}\n\n// Ensure no contradiction\nfact noContradiction {\n no p1, p2: Person | hates[p1, p2] && killed[p1, p2]\n}\n\n// Ensure at least 2 instances\nfact atLeastTwoInstances {\n some p1, p2: Person | p1 != p2\n}\n\n// Ensure uniqueness of individuals\nfact uniqueIndividuals {\n lone Agatha\n lone Charles\n lone Butler\n}", "permalink": "gawk-jacket-dried-refund", "time": "2023-12-07 21:21:57.320187", "cmd": 1} {"id": 8463, "parent": 8453, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // encoding of formula (1) someone killed Agatha\n some x: Person | x in Agatha.killed\n \n // encoding of formula (2)\n all x, y: Person | (x in y.killed) => (x in y.hates) && (no x in y.richer)\n\n // encoding of formula (3)\n all x: Person | (Agatha.hates & x) => no (Charles.hates & x)\n\n // encoding of formula (4)\n Agatha.hates & Agatha = Agatha.hates\n Agatha.hates & Charles = Agatha.hates\n\n // encoding of formula (5)\n all x: Person | no x in Agatha.richer => x in Butler.hates\n\n // encoding of formula (6)\n all x: Person | (Agatha.hates & x) => x in Butler.hates\n\n // encoding of formula (7)\n all x: Person | some y: Person | no x in y.hates\n}\n\nrun puzzle for 3 Person, 3 Int", "permalink": "raisin-stitch-treble-fence", "time": "2023-12-07 21:23:31.308735", "cmd": 1} {"id": 8465, "parent": 8463, "code": "abstract sig Person {\n killed: Person -> lone Person,\n hates: Person -> lone Person,\n richer: Person -> lone Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // encoding of formula (1) someone killed Agatha\n some x: Person | Agatha.killed[x]\n\n // encoding of formula (2)\n all x, y: Person | (x in y.killed) => (x in y.hates) && (no x in y.richer)\n\n // encoding of formula (3)\n all x: Person | (Agatha.hates[x] implies no (Charles.hates & x))\n\n // encoding of formula (4)\n Agatha.hates[Agatha] && Agatha.hates[Charles]\n\n // encoding of formula (5)\n all x: Person | no x in Agatha.richer => x in Butler.hates\n\n // encoding of formula (6)\n all x: Person | (Agatha.hates[x] implies x in Butler.hates)\n\n // encoding of formula (7)\n all x: Person | some y: Person | no x in y.hates\n}\n\nrun puzzle for 3 Person", "permalink": "those-liking-zero-roster", "time": "2023-12-07 21:24:58.464487", "cmd": 1} {"id": 8466, "parent": 8465, "code": "abstract sig Person {\n killed: Person implies lone Person,\n hates: Person implies lone Person,\n richer: Person implies lone Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // encoding of formula (1) someone killed Agatha\n some x: Person | Agatha.killed[x]\n\n // encoding of formula (2)\n all x, y: Person | (x in y.killed) => (x in y.hates) && (no x in y.richer)\n\n // encoding of formula (3)\n all x: Person | (Agatha.hates[x] implies no (Charles.hates & x))\n\n // encoding of formula (4)\n Agatha.hates[Agatha] && Agatha.hates[Charles]\n\n // encoding of formula (5)\n all x: Person | no x in Agatha.richer => x in Butler.hates\n\n // encoding of formula (6)\n all x: Person | (Agatha.hates[x] implies x in Butler.hates)\n\n // encoding of formula (7)\n all x: Person | some y: Person | no x in y.hates\n}\n\nrun puzzle for 3 Person", "permalink": "dugout-undead-cleat-regain", "time": "2023-12-07 21:25:47.382103", "cmd": 1} {"id": 8469, "parent": 8468, "code": "// Define basic types for the model\nsig String {}\n\n// Define an integer type as Alloy has limited support for integers\nsig Int {}\n\n// User Signature\nsig User {\n username: one String,\n email: one String\n}\n\n// Abstract Product Signature\nabstract sig Product {\n productId: one String,\n name: one String,\n price: one Int,\n seller: one User\n}\n\n// Electronics and Clothing Products Inheriting from Product\nsig ElectronicProduct extends Product {\n brand: one String,\n warrantyPeriod: one Int\n}\n\nsig ClothingProduct extends Product {\n size: one String,\n color: one String\n}\n\n// Transaction Signature\nsig Transaction {\n transactionId: one String,\n buyer: one User,\n seller: one User,\n product: one Product\n}\n\n// Feedback Signature\nsig Feedback {\n feedbackId: one String,\n rating: one Int,\n comment: one String,\n user: one User\n}\n\n// Facts for uniqueness\nfact uniqueUsernames {\n all disj u1, u2: User | u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all disj p1, p2: Product | p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all disj t1, t2: Transaction | t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all disj f1, f2: Feedback | f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // Intentionally unsatisfiable: No products have IDs\n no p: Product | some p.productId\n} for 4\n\nrun satisfiableExample {\n // Satisfiable: At least one product has an ID\n some p: Product | some p.productId\n} for 4", "permalink": "capped-stitch-bagful-karma", "time": "2023-12-07 21:31:09.053893", "cmd": 2} {"id": 8475, "parent": 8474, "code": "// Signatures\nsig User {\n username: one String,\n email: one String\n}\n\nsig String {}\n\nabstract sig Product {\n productId: one String,\n name: one String,\n price: one Int,\n seller: one User\n}\n\nsig ElectronicProduct extends Product {\n brand: one String,\n warrantyPeriod: one Int\n}\n\nsig ClothingProduct extends Product {\n size: one String,\n brand: one String\n}\n\nsig Transaction {\n transactionId: one String,\n buyer: one User,\n seller: one User,\n product: one Product\n}\n\nsig Feedback {\n feedbackId: one String,\n rating: one Int,\n comment: one String,\n user: one User\n}\n\nsig Int {}\n\n// Facts\nfact uniqueUsernames {\n all disj u1, u2: User | u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all disj p1, p2: Product | p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all disj t1, t2: Transaction | t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all disj f1, f2: Feedback | f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample for 5 {\n // Intentionally unsatisfiable\n all p: Product | no p.productId\n}\n\nrun satisfiableExample for 5 {\n // Satisfiable\n some p: Product | some p.productId\n}", "permalink": "poach-gravel-follow-crowd", "time": "2023-12-07 21:36:13.736046", "cmd": 1} {"id": 8478, "parent": 8250, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// Signatures\nsig User {\n username: String,\n email: String\n}\n\nabstract sig Product {\n productId: Int,\n name: String,\n price: Int,\n seller: User\n}\n\nsig ElectronicProduct extends Product {\n brand: String,\n warrantyPeriod: Int\n}\n\nsig ClothingProduct extends Product {\n size: String,\n brand: String\n}\n\nsig Transaction {\n transactionId: Int,\n buyer: User,\n seller: User,\n product: Product\n}\n\nsig Feedback {\n feedbackId: Int,\n rating: Int,\n comment: String,\n user: User\n}\n\n// Fields\nfact uniqueUsernames {\n all u1, u2: User | u1 != u2 implies u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all t1, t2: Transaction | t1 != t2 implies t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all f1, f2: Feedback | f1 != f2 implies f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is intentionally unsatisfiable for demonstration purposes\n all p1, p2: Product | p1 = p2 implies p1.productId = p2.productId\n}\n\nrun satisfiableExample {\n // This command is designed to be satisfiable\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\n// run {} for 3", "permalink": "launch-lagged-buckle-primal", "time": "2023-12-07 21:38:05.325409", "cmd": 1} {"id": 8479, "parent": 8478, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// Signatures\nsig User {\n username: String,\n email: String\n}\n\nabstract sig Product {\n productId: Int,\n name: String,\n price: Int,\n seller: User\n}\n\nsig ElectronicProduct extends Product {\n brand: String,\n warrantyPeriod: Int\n}\n\nsig ClothingProduct extends Product {\n size: String,\n brand: String\n}\n\nsig Transaction {\n transactionId: Int,\n buyer: User,\n seller: User,\n product: Product\n}\n\nsig Feedback {\n feedbackId: Int,\n rating: Int,\n comment: String,\n user: User\n}\n\n// Fields\nfact uniqueUsernames {\n all u1, u2: User | u1 != u2 implies u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all t1, t2: Transaction | t1 != t2 implies t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all f1, f2: Feedback | f1 != f2 implies f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is intentionally unsatisfiable for demonstration purposes\n all p1, p2: Product | p1 = !p2 implies p1.productId = p2.productId\n}\n\nrun satisfiableExample {\n // This command is designed to be satisfiable\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\n// run {} for 3", "permalink": "cymbal-alumni-tinsel-stays", "time": "2023-12-07 21:39:06.876772", "cmd": 1} {"id": 8480, "parent": 8479, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// Signatures\nsig User {\n username: String,\n email: String\n}\n\nabstract sig Product {\n productId: Int,\n name: String,\n price: Int,\n seller: User\n}\n\nsig ElectronicProduct extends Product {\n brand: String,\n warrantyPeriod: Int\n}\n\nsig ClothingProduct extends Product {\n size: String,\n brand: String\n}\n\nsig Transaction {\n transactionId: Int,\n buyer: User,\n seller: User,\n product: Product\n}\n\nsig Feedback {\n feedbackId: Int,\n rating: Int,\n comment: String,\n user: User\n}\n\n// Fields\nfact uniqueUsernames {\n all u1, u2: User | u1 != u2 implies u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all t1, t2: Transaction | t1 != t2 implies t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all f1, f2: Feedback | f1 != f2 implies f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is intentionally unsatisfiable for demonstration purposes\n all p1, p2: Product | p1 = p2 implies p1.productId = p2.productId\n}\n\nrun satisfiableExample {\n // This command is designed to be satisfiable\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\n// run {} for 3", "permalink": "arrest-stable-catsup-juicy", "time": "2023-12-07 21:39:13.242560", "cmd": 1} {"id": 8481, "parent": 8475, "code": "// Basic types for the model\nsig Username, Email, ProductID, TransactionID, FeedbackID, Brand, Size, Comment {}\n\n// User Signature\nsig User {\n username: one Username,\n email: one Email\n}\n\n// Abstract Product Signature\nabstract sig Product {\n productId: one ProductID,\n name: one String,\n price: one Int,\n seller: one User\n}\n\n// Electronic and Clothing Products Inheriting from Product\nsig ElectronicProduct extends Product {\n brand: one Brand,\n warrantyPeriod: one Int\n}\n\nsig ClothingProduct extends Product {\n size: one Size,\n color: one String\n}\n\n// Transaction Signature\nsig Transaction {\n transactionId: one TransactionID,\n buyer: one User,\n seller: one User,\n product: one Product\n}\n\n// Feedback Signature\nsig Feedback {\n feedbackId: one FeedbackID,\n rating: one Int,\n comment: one Comment,\n user: one User\n}\n\n// Facts for uniqueness\nfact uniqueUsernames {\n no disj u1, u2: User | u1.username = u2.username\n}\n\nfact uniqueProductIds {\n no disj p1, p2: Product | p1.productId = p2.productId\n}\n\nfact uniqueTransactionIds {\n no disj t1, t2: Transaction | t1.transactionId = t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n no disj f1, f2: Feedback | f1.feedbackId = f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample for 5 {\n // Intentionally unsatisfiable\n some p: Product | no p.productId\n}\n\nrun satisfiableExample for 5 {\n // Satisfiable\n some p: Product | some p.productId\n}", "permalink": "dental-polka-agency-uproot", "time": "2023-12-07 21:39:31.572264", "cmd": 1} {"id": 8482, "parent": 8481, "code": "// Basic types for the model\nsig Username, Email, ProductID, TransactionID, FeedbackID, Brand, Size, Comment {}\n\n// User Signature\nsig User {\n username: one Username,\n email: one Email\n}\n\n// Abstract Product Signature\nabstract sig Product {\n productId: one ProductID,\n name: one String,\n price: one Int,\n seller: one User\n}\n\n// Electronic and Clothing Products Inheriting from Product\nsig ElectronicProduct extends Product {\n brand: one Brand,\n warrantyPeriod: one Int\n}\n\nsig ClothingProduct extends Product {\n size: one Size,\n color: one String\n}\n\n// Transaction Signature\nsig Transaction {\n transactionId: one TransactionID,\n buyer: one User,\n seller: one User,\n product: one Product\n}\n\n// Feedback Signature\nsig Feedback {\n feedbackId: one FeedbackID,\n rating: one Int,\n comment: one Comment,\n user: one User\n}\n\n// Facts for uniqueness\nfact uniqueUsernames {\n no disj u1, u2: User | u1.username = u2.username\n}\n\nfact uniqueProductIds {\n no disj p1, p2: Product | p1.productId = p2.productId\n}\n\nfact uniqueTransactionIds {\n no disj t1, t2: Transaction | t1.transactionId = t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n no disj f1, f2: Feedback | f1.feedbackId = f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample for 5 {\n // Intentionally unsatisfiable\n some p: Product | no p.productId\n}\n\nrun satisfiableExample for 5 {\n // Satisfiable\n some p: Product | some p.productId\n}", "permalink": "valid-runway-icing-grader", "time": "2023-12-07 21:39:35.551059", "cmd": 2} {"id": 8483, "parent": 8480, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// Signatures\nsig User {\n username: String,\n email: String\n}\n\nabstract sig Product {\n productId: Int,\n name: String,\n price: Int,\n seller: User\n}\n\nsig ElectronicProduct extends Product {\n brand: String,\n warrantyPeriod: Int\n}\n\nsig ClothingProduct extends Product {\n size: String,\n brand: String\n}\n\nsig Transaction {\n transactionId: Int,\n buyer: User,\n seller: User,\n product: Product\n}\n\nsig Feedback {\n feedbackId: Int,\n rating: Int,\n comment: String,\n user: User\n}\n\n// Fields\nfact uniqueUsernames {\n all u1, u2: User | u1 != u2 implies u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all t1, t2: Transaction | t1 != t2 implies t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all f1, f2: Feedback | f1 != f2 implies f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is intentionally unsatisfiable for demonstration purposes\n all p1, p2: Product | p1 = p2 implies p1.productId = p2.productId\n}\n\nrun satisfiableExample {\n // This command is designed to be satisfiable\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\n// run {} for 3", "permalink": "circus-ebay-cage-conch", "time": "2023-12-07 21:39:36.760083", "cmd": 2} {"id": 8486, "parent": 8485, "code": "// Basic Types\nsig Name, Email, ProductID, UserID {}\n\n// User Signature\nsig User {\n userID: one UserID,\n username: one Name,\n email: one Email\n}\n\n// Product Signature\nsig Product {\n productID: one ProductID,\n name: one Name,\n price: one Int,\n seller: one User\n}\n\n// Transaction Signature\nsig Transaction {\n product: one Product,\n buyer: one User,\n transactionPrice: one Int\n}\n\n// Feedback Signature\nsig Feedback {\n transaction: one Transaction,\n rating: one Int,\n comment: lone String\n}\n\n// Facts\nfact uniqueUserIDs {\n all disj u1, u2: User | u1.userID != u2.userID\n}\n\nfact uniqueProductIDs {\n all disj p1, p2: Product | p1.productID != p2.productID\n}\n\nfact transactionHasCorrectPrice {\n all t: Transaction | t.transactionPrice = t.product.price\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.buyer != t.product.seller\n}\n\npred highRatingFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // Intentionally unsatisfiable: A transaction with incorrect price\n some t: Transaction | t.transactionPrice != t.product.price\n} for 5\n\nrun satisfiableExample {\n // Satisfiable: A transaction with a valid buyer and seller\n some t: Transaction | validTransaction[t]\n} for 5", "permalink": "crown-bling-grunt-reggae", "time": "2023-12-07 21:43:36.876099", "cmd": 1} {"id": 8492, "parent": 7623, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // TODO Implement the constraints here\n // Constraint 1\n some x : Person | Agatha in x.killed\n\n // Constraint 2\n all x,y: Person | (y in x.killed implies (y in x.hates and not y in x.richer))\n\n // Constraint 3\n all x: Person | (x in Agatha.hates implies not x in Charles.hates)\n\n // Constraint 4\n (Agatha in Agatha.hates) and (Charles in Agatha.hates)\n\n // Constraint 5\n all x : Person | (not Agatha in x.richer implies x in Butler.hates)\n\n // Constraint 6\n all x:Person | (x in Agatha.hates implies x in Butler.hates)\n\n // Constraint 7\n all x :Person | some y: Person | not y in x.hates\n}\n\nrun puzzle", "permalink": "replay-sultry-cheer-dial", "time": "2023-12-07 22:02:25.681966", "cmd": 1} {"id": 8493, "parent": 7058, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\n\nrun {}", "permalink": "sludge-taps-hence-herbal", "time": "2023-12-07 22:02:33.070230", "cmd": 1} {"id": 8494, "parent": 8493, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\n\nsig Director extends Person {}\nsig Actor extends Person {}\n\nrun {}", "permalink": "stoic-herbs-name-trance", "time": "2023-12-07 22:03:12.193671", "cmd": 1} {"id": 8495, "parent": 8250, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// Signatures\nsig User {\n username: String,\n email: String\n}\n\nabstract sig Product {\n productId: Int,\n name: String,\n price: Int,\n seller: User\n}\n\nsig ElectronicProduct extends Product {\n brand: String,\n warrantyPeriod: Int\n}\n\nsig ClothingProduct extends Product {\n size: String,\n brand: String\n}\n\nsig Transaction {\n transactionId: Int,\n buyer: User,\n seller: User,\n product: Product\n}\n\nsig Feedback {\n feedbackId: Int,\n rating: Int,\n comment: String,\n user: User\n}\n\n// Fields\nfact uniqueUsernames {\n all u1, u2: User | u1 != u2 implies u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all t1, t2: Transaction | t1 != t2 implies t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all f1, f2: Feedback | f1 != f2 implies f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is intentionally unsatisfiable for demonstration purposes\n all p1, p2: Product | p1 = !p2 implies p1.productId = p2.productId\n}\n\nrun satisfiableExample {\n // This command is designed to be satisfiable\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\n// run {} for 3", "permalink": "dreamy-carve-award-absurd", "time": "2023-12-07 22:04:21.072597", "cmd": 1} {"id": 8500, "parent": 7001, "code": "sig Guest {}\nsig Drunk in Guest {}\n\npred drinkers {\n some x : Guest |\n (x in Drunk implies \n all y : Guest | y in Drunk)\n}\n\nrun drinkers for 5", "permalink": "such-open-gigolo-empty", "time": "2023-12-07 22:06:34.809780", "cmd": 1} {"id": 8501, "parent": 8497, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// Signatures\nsig User {\n username: String,\n email: String\n}\n\nabstract sig Product {\n productId: Int,\n name: String,\n price: Int,\n seller: User\n}\n\nsig ElectronicProduct extends Product {\n brand: String,\n warrantyPeriod: Int\n}\n\nsig ClothingProduct extends Product {\n size: String,\n brand: String\n}\n\nsig Transaction {\n transactionId: Int,\n buyer: User,\n seller: User,\n product: Product\n}\n\nsig Feedback {\n feedbackId: Int,\n rating: Int,\n comment: String,\n user: User\n}\n\n// Fields\nfact uniqueUsernames {\n all u1, u2: User | u1 != u2 implies u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all t1, t2: Transaction | t1 != t2 implies t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all f1, f2: Feedback | f1 != f2 implies f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is intentionally unsatisfiable for demonstration purposes\n all p1, p2: Product | p1 != p2 implies p1.productId = p2.productId\n}\n\nrun satisfiableExample {\n // This command is designed to be satisfiable\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\n// run {} for 3", "permalink": "renter-safari-settle-retry", "time": "2023-12-07 22:07:24.243764", "cmd": 1} {"id": 8503, "parent": 8502, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\nsig Person {\n likes: set Book,\n dislikes: set Book,\n}\n\n\nsome sig Librarian extends Person {\n recommends: set Book,\n sorting_in: lone Book, \n}\n\nsig Book {\n lent_to: lone Person, // if not sorting_in and not \n continuation_of: lone Book\n}\n\nsome sig Shelf {\n holds: set Book, // books which are not reserved and not in process\n assigned_to: one Librarian\n}\n\nfact ExclusiveLikesDislikes {\n all p: Person |\n p.likes & p.dislikes = none // No book should be both liked and disliked by the same person\n}\n\nfact LibrarianRules {\n all l: Librarian |\n l.dislikes & l.recommends = none\n}\n\nfact NoLendingWhileSortingIn {\n all l: Librarian, b: Book, p : Person |\n l.sorting_in = b implies not b.lent_to = p\n}\n\nfact NoSelfContinuation {\n all b: Book | b.continuation_of != b // A book is not allowed to be its own continuation\n}\n\nfact UniqueContinuation {\n all disj b1, b2: Book | b1.continuation_of != b2.continuation_of // One book can't have more than one continuation\n}\n\nfact NoBookInMoreThanOneShelf {\n all disj sh1, sh2: Shelf | all b : Book | sh1.holds = b && sh2.holds != b \n}\n\npred ThereIsNoLibrarian{\n no Librarian\n}\n\npred DontRentOnDislike {\n all p : Person | all b : Book | p.dislikes = b implies not b.lent_to = p\n}\n\n// PRED - Acyclic continuation\n\nrun ThereIsNoLibrarian\nrun DontRentOnDislike", "permalink": "delete-radar-salami-crane", "time": "2023-12-07 22:07:29.263120", "cmd": 2} {"id": 8504, "parent": 7069, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // Constraint 1\n some x: Person | x in Agatha.killed\n \n // Constraint 2\n all x, y: Person | x.killed = y implies (x.hates = y and not x.richer = y)\n \n // Constraint 3\n all x: Person - Agatha | not x.hates and Agatha implies not x.hates and Charles\n \n // Constraint 4\n Agatha.hates = Agatha + Charles\n \n // Constraint 5\n all x: Person | not x.richer and Agatha implies x.hates and Butler\n \n // Constraint 6\n all x: Person | x.hates and Agatha implies x.hates and Butler\n \n // Constraint 7\n all x: Person | some y: Person | x.hates = y\n \n // Additional Constraints\n no Agatha.hates // Constraint 8\n Agatha != Butler // Constraint 9\n no x: Person | x.hates = x // Constraint 10\n}\n\nrun puzzle for 3", "permalink": "neatly-untidy-clock-husked", "time": "2023-12-07 22:10:12.216598", "cmd": 1} {"id": 8505, "parent": 8504, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // Constraint 1\n some x: Person | x in Agatha.killed\n \n // Constraint 2\n all x, y: Person | x.killed = y implies (x.hates = y and not x.richer = y)\n \n // Constraint 3\n all x: Person - Agatha | not x.hates and Agatha implies not x.hates and Charles\n \n // Constraint 4\n Agatha.hates = Agatha + Charles\n \n // Constraint 5\n all x: Person | not x.richer and Agatha implies x.hates and Butler\n \n // Constraint 6\n all x: Person | x.hates and Agatha implies x.hates and Butler\n \n // Constraint 7\n all x: Person | some y: Person | x.hates = y\n \n // Additional Constraints\n no Agatha.hates // Constraint 8\n Agatha != Butler // Constraint 9\n no x: Person | x.hates = x // Constraint 10\n}\n\nrun puzzle for 3", "permalink": "purity-pebbly-revert-effort", "time": "2023-12-07 22:10:27.404232", "cmd": 1} {"id": 8507, "parent": 8506, "code": "abstract sig Person {\n killed: Person -> lone Person\n}\n\none sig Agatha extends Person {}\n\npred existenceOfKiller {\n some x: Person | x in killed[Agatha]\n}\n\nrun existenceOfKiller for 3 Person ", "permalink": "willow-grasp-proved-envoy", "time": "2023-12-07 22:11:29.895940", "cmd": 1} {"id": 8509, "parent": 8505, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // Constraint 1\n some x: Person | x in Agatha.killed\n \n // Constraint 2\n all x, y: Person | x.killed = y implies (x.hates = y and not x.richer = y)\n \n // Constraint 3\n all x: Person | not x.hates and Agatha implies not x.hates and Charles\n \n // Constraint 4\n Agatha.hates = Agatha + Charles\n \n // Constraint 5\n all x: Person | not x.richer and Agatha implies x.hates and Butler\n \n // Constraint 6\n all x: Person | x.hates and Agatha implies x.hates and Butler\n \n // Constraint 7\n all x: Person | some y: Person | x.hates = y\n \n // Additional Constraints\n no Agatha.hates // Constraint 8\n Agatha != Butler // Constraint 9\n no x: Person | x.hates = x // Constraint 10\n}\n\nrun puzzle for 3", "permalink": "runt-slug-curly-wow", "time": "2023-12-07 22:14:14.891440", "cmd": 1} {"id": 8510, "parent": 7549, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n some x: Person | Agatha in x.killed \n \n all x,y: Person | \n y in x.killed implies \n (y in x.hates and not y in x.richer) \n\n all x: Person | (x in Agatha.hates) implies (not x in Charles.hates) \n\n Agatha in Agatha.hates and Charles in Agatha.hates \n\n all x: Person | (not Agatha in x.richer) implies (x in Butler.hates) \n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates) \n\n all x: Person | some y: Person | (not y in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "path-boat-timing-widen", "time": "2023-12-07 22:17:12.860486", "cmd": 1} {"id": 8512, "parent": 8511, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n some x: Person | Agatha in x.killed \n \n all x, y: Person |\n (x in y.killed implies x in y.hates and not x in y.richer)\n\n all x: Person | (x in Agatha.hates) implies (not x in Charles.hates) \n\n Agatha in Agatha.hates and Charles in Agatha.hates \n\n all x: Person | (not Agatha in x.richer) implies (x in Butler.hates) \n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates) \n\n all x: Person | some y: Person | (not y in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "trend-trough-ebay-oasis", "time": "2023-12-07 22:19:29.868099", "cmd": 1} {"id": 8525, "parent": 8520, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // Constraint 1\n some x: Person | Agatha in x.killed\n \n // Constraint 2\n all x, y: Person | y in x.killed implies (y in x.hates and not (y in x.richer))\n \n // Constraint 3\n all x: Person | x in Agatha.hates implies not (x in Charles.hates)\n \n // Constraint 4\n Agatha in Agatha.hates and Charles in Agatha.hates\n \n // Constraint 5\n all x: Person | not(Agatha in x.richer) implies x in Butler.hates\n \n // Constraint 6\n all x: Person | x.hates and Agatha implies x.hates and Butler\n \n // Constraint 7\n all x: Person | some y: Person | x.hates = y\n \n // Additional Constraints\n no Agatha.hates // Constraint 8\n Agatha != Butler // Constraint 9\n no x: Person | x.hates = x // Constraint 10\n}\n\nrun puzzle for 3", "permalink": "shank-feline-unworn-cable", "time": "2023-12-07 22:24:04.195574", "cmd": 1} {"id": 8529, "parent": 8526, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\n\nsig Director extends Person {\n hasDirected: some Movie,\n hasWorkedWith: some Actor\n}\n\nsig Actor extends Person {\n hasWorkedWith: set(some Director + set Actor) \n} {\n this not in hasWorkedWith\n}\n\nsig Movie {\n\n}\n\nsig Cast {\n\n}\n\n\nrun {}", "permalink": "graves-arose-mushy-uptown", "time": "2023-12-07 22:26:01.209653", "cmd": 1} {"id": 8531, "parent": null, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: set File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or one f.link\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n Protected & Trash = none\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or one f.link\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no File.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv10", "permalink": "skype-sedate-slush-yen", "time": "2023-12-07 22:27:25.071689", "cmd": 1} {"id": 8532, "parent": 8529, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\n\nsig Director extends Person {\n hasDirected: some Movie,\n hasWorkedWith: some Actor\n}\n\nsig Actor extends Person {\n hasWorkedWith: some Person - this,\n moviesActed: some Movie,\n}\n\nsig Movie {\n\n}\n\nsig Cast {\n\n}\n\n\nrun {}", "permalink": "avatar-musky-mousy-jimmy", "time": "2023-12-07 22:28:31.658505", "cmd": 1} {"id": 8534, "parent": 8533, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n\n //Formula 1\n some x: Person | x in Agatha.killed\n\n //Formula 2\n all x, y: Person |\n (x in y.killed implies x in y.hates and not x in y.richer)\n\n //Formula 3\n all x: Person | \n (Agatha in x.hates implies not Charles in x.hates)\n\n //Formula 4\n Agatha in Agatha.hates and Agatha in Charles.hates\n\n //Formula 5\n all x: Person | (not x in Agatha.richer implies Butler in x.hates)\n\n //Formula 6\n all x: Person | (Agatha in x.hates implies Butler in x.hates)\n\n //Formula 7\n all x: Person | some y: Person | not (x in y.hates)\n}\nrun puzzle", "permalink": "remedy-sludge-paver-decree", "time": "2023-12-07 22:29:12.824361", "cmd": 1} {"id": 8535, "parent": 8532, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\n\nsig Director extends Person {\n hasDirected: some Movie,\n hasWorkedWith: some Actor\n}\n\nsig Actor extends Person {\n hasWorkedWith: some Person - this,\n moviesActed: some Movie\n}\n\nsig Movie {\n director: one Director,\n cast: some Actor\n}\n\nsig Cast {\n movie: one,\n actors: some Actor\n}\n\n\nrun {}", "permalink": "tidbit-cactus-fridge-clasp", "time": "2023-12-07 22:30:10.887803", "cmd": 1} {"id": 8538, "parent": 8496, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// Signatures\n// Define a simple model\nsig Person {\n name: String,\n age: Int\n}\n\nfact LegalDrivingAge {\n all p: Person | p.age >= 20\n}\n\n// Run command to check if all persons are under 16 years old\nrun underagePersonsExample {\n all p: Person | p.age < 16 \n}", "permalink": "eaten-down-hankie-sprain", "time": "2023-12-07 22:31:47.187461", "cmd": 1} {"id": 8426, "parent": 8425, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // Constraint 1\n some x: Person | x in Agatha.killed\n \n // Constraint 2\n all x, y: Person | x.killed = y implies (x.hates = y and not x.richer = y)\n \n // Constraint 3\n // all x: Person - Agatha | not x.hates and Agatha implies not x.hates and Charles\n \n // Constraint 4\n Agatha.hates = Agatha + Charles\n \n // Constraint 5\n all x: Person | not x.richer and Agatha implies x.hates and Butler\n \n // Constraint 6\n all x: Person | x.hates and Agatha implies x.hates and Butler\n \n // Constraint 7\n all x: Person | some y: Person | x.hates = y\n \n // Additional Constraints\n no Agatha.hates // Constraint 8\n Agatha != Butler // Constraint 9\n no x: Person | x.hates = x // Constraint 10\n}\n\nrun puzzle for 3", "permalink": "caddie-starch-viable-lure", "time": "2023-12-07 20:19:10.074668", "cmd": 1} {"id": 8437, "parent": 8133, "code": "abstract sig Person {\n name: one String,\n age: one Int\n}\n\nsig Doctor extends Person {\n specialty: one String,\n patients: set Patient\n}\n\nsig Nurse extends Person {\n department: one String,\n assignedDoctors: set Doctor\n}\n\nsig Patient extends Person {\n disease: one String,\n attendingDoctor: one Doctor\n}\n\nsig Appointment {\n patient: one Patient,\n doctor: one Doctor,\n timeSlot: one TimeSlot\n}\n\nsig TimeSlot {\n startTime: one Int,\n endTime: one Int\n}\n\nfact NoSelfTreatment {\n all d: Doctor | no p: d.patients | p.attendingDoctor = d\n}\n\nfact ConsistentDoctorAssignment {\n all p: Patient, d: Doctor | p.attendingDoctor = d iff p in d.patients\n}\n\npred isAvailable[d: Doctor, t: TimeSlot] {\n no a: Appointment | a.doctor = d and a.timeSlot = t\n}\n\npred needsSpecialist[p: Patient, s: String] {\n p.disease = s\n}\n\nrun { some p: Patient, d: Doctor | p.attendingDoctor = d and p in d.patients } for 3 but 2 Doctor, 2 Patient, 3 TimeSlot, 2 Nurse\nrun { all d: Doctor | no p: Patient | p in d.patients and p.attendingDoctor = d } for 3 but 2 Doctor, 2 Patient, 3 TimeSlot, 2 Nurse", "permalink": "shrunk-donor-edge-shone", "time": "2023-12-07 20:52:47.794600", "cmd": 1} {"id": 8443, "parent": 8442, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {\n name: one String,\n age: one Int\n}\n\nsig Doctor extends Person {\n specialty: one String,\n patients: set Patient\n}\n\nsig Nurse extends Person {\n department: one String,\n assignedDoctors: set Doctor\n}\n\nsig Patient extends Person {\n disease: one String,\n attendingDoctor: one Doctor\n}\n\nsig Appointment {\n patient: one Patient,\n doctor: one Doctor,\n timeSlot: one TimeSlot\n}\n\nsig TimeSlot {\n startTime: one Int,\n endTime: one Int\n}\n\nfact NoSelfTreatment {\n all d: Doctor | no p: d.patients | p.attendingDoctor = d\n}\n\nfact ConsistentDoctorAssignment {\n all p: Patient, d: Doctor | p.attendingDoctor = d iff p in d.patients\n}\n\npred isAvailable[d: Doctor, t: TimeSlot] {\n no a: Appointment | a.doctor = d and a.timeSlot = t\n}\n\npred needsSpecialist[p: Patient, s: String] {\n p.disease = s\n}\n\nrun { some p: Patient, d: Doctor | p.attendingDoctor = d and p in d.patients } for 3 but 2 Doctor, 2 Patient, 3 TimeSlot, 2 Nurse\nrun { all d: Doctor | no p: Patient | p in d.patients and p.attendingDoctor = d } for 3 but 2 Doctor, 2 Patient, 3 TimeSlot, 2 Nurse\n\nrun {}", "permalink": "uneven-onyx-thrash-bride", "time": "2023-12-07 20:57:38.992019", "cmd": 1} {"id": 8444, "parent": 8443, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {\n name: one String,\n age: one Int\n}\n\nsig Doctor extends Person {\n specialty: one String,\n patients: set Patient\n}\n\nsig Nurse extends Person {\n department: one String,\n assignedDoctors: set Doctor\n}\n\nsig Patient extends Person {\n disease: one String,\n attendingDoctor: one Doctor\n}\n\nsig Appointment {\n patient: one Patient,\n doctor: one Doctor,\n timeSlot: one TimeSlot\n}\n\nsig TimeSlot {\n startTime: one Int,\n endTime: one Int\n}\n\nfact NoSelfTreatment {\n all d: Doctor | no p: d.patients | p.attendingDoctor = d\n}\n\nfact ConsistentDoctorAssignment {\n all p: Patient, d: Doctor | p.attendingDoctor = d iff p in d.patients\n}\n\npred isAvailable[d: Doctor, t: TimeSlot] {\n no a: Appointment | a.doctor = d and a.timeSlot = t\n}\n\npred needsSpecialist[p: Patient, s: String] {\n p.disease = s\n}\n\nrun { some p: Patient, d: Doctor | p.attendingDoctor = d and p in d.patients } for 3 but 2 Doctor, 2 Patient, 3 TimeSlot, 2 Nurse\nrun { all d: Doctor | no p: Patient | p in d.patients and p.attendingDoctor = d } for 3 but 2 Doctor, 2 Patient, 3 TimeSlot, 2 Nurse\n\nrun {}", "permalink": "angled-hula-prong-worst", "time": "2023-12-07 20:57:42.210972", "cmd": 3} {"id": 8447, "parent": 8446, "code": "// Basic Types\nsig String {}\nsig Int {}\n\n// User Signature\nsig User {\n username: lone String,\n email: lone String\n}\n\n// Abstract Product Signature\nabstract sig Product {\n productId: lone Int,\n name: lone String,\n price: lone Int,\n seller: lone User\n}\n\n// Electronic Product Inheriting from Product\nsig ElectronicProduct extends Product {\n brand: lone String,\n warrantyPeriod: lone Int\n}\n\n// Clothing Product Inheriting from Product\nsig ClothingProduct extends Product {\n size: lone String,\n brand: lone String\n}\n\n// Transaction Signature\nsig Transaction {\n transactionId: lone Int,\n buyer: lone User,\n seller: lone User,\n product: lone Product\n}\n\n// Feedback Signature\nsig Feedback {\n feedbackId: lone Int,\n rating: lone Int,\n comment: lone String,\n user: lone User\n}\n\n// Fact: Unique Usernames\nfact uniqueUsernames {\n all u1, u2: User | u1 != u2 implies u1.username != u2.username\n}\n\n// Fact: Unique Product IDs\nfact uniqueProductIds {\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\n// Fact: Unique Transaction IDs\nfact uniqueTransactionIds {\n all t1, t2: Transaction | t1 != t2 implies t1.transactionId != t2.transactionId\n}\n\n// Fact: Unique Feedback IDs\nfact uniqueFeedbackIds {\n all f1, f2: Feedback | f1 != f2 implies f1.feedbackId != f2.feedbackId\n}\n\n// Predicate: Valid Transaction\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\n// Predicate: Positive Feedback\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Command: Unsatisfiable Example\nrun unsatisfiableExample for 4 {\n // This command is intentionally unsatisfiable for demonstration purposes\n all p1, p2: Product | p1 != p2 implies p1.productId = p2.productId\n}\n\n// Run Command: Satisfiable Example\nrun satisfiableExample for 4 {\n // This command is designed to be satisfiable\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}", "permalink": "probe-thud-wiring-sector", "time": "2023-12-07 21:09:19.614982", "cmd": 1} {"id": 8448, "parent": 8447, "code": "// Basic Types\n// sig String {}\n// sig Int {}\n\n// User Signature\nsig User {\n username: lone String,\n email: lone String\n}\n\n// Abstract Product Signature\nabstract sig Product {\n productId: lone Int,\n name: lone String,\n price: lone Int,\n seller: lone User\n}\n\n// Electronic Product Inheriting from Product\nsig ElectronicProduct extends Product {\n brand: lone String,\n warrantyPeriod: lone Int\n}\n\n// Clothing Product Inheriting from Product\nsig ClothingProduct extends Product {\n size: lone String,\n brand: lone String\n}\n\n// Transaction Signature\nsig Transaction {\n transactionId: lone Int,\n buyer: lone User,\n seller: lone User,\n product: lone Product\n}\n\n// Feedback Signature\nsig Feedback {\n feedbackId: lone Int,\n rating: lone Int,\n comment: lone String,\n user: lone User\n}\n\n// Fact: Unique Usernames\nfact uniqueUsernames {\n all u1, u2: User | u1 != u2 implies u1.username != u2.username\n}\n\n// Fact: Unique Product IDs\nfact uniqueProductIds {\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\n// Fact: Unique Transaction IDs\nfact uniqueTransactionIds {\n all t1, t2: Transaction | t1 != t2 implies t1.transactionId != t2.transactionId\n}\n\n// Fact: Unique Feedback IDs\nfact uniqueFeedbackIds {\n all f1, f2: Feedback | f1 != f2 implies f1.feedbackId != f2.feedbackId\n}\n\n// Predicate: Valid Transaction\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\n// Predicate: Positive Feedback\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Command: Unsatisfiable Example\nrun unsatisfiableExample for 4 {\n // This command is intentionally unsatisfiable for demonstration purposes\n all p1, p2: Product | p1 != p2 implies p1.productId = p2.productId\n}\n\n// Run Command: Satisfiable Example\nrun satisfiableExample for 4 {\n // This command is designed to be satisfiable\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}", "permalink": "cavity-driven-wilt-trifle", "time": "2023-12-07 21:10:51.067956", "cmd": 1} {"id": 8452, "parent": 8451, "code": "// Social Networking Alloy Model\n\n// Signatures\nabstract sig User {\n userId: Int,\n username: String\n}\n\nsig RegularUser extends User {\n email: String\n}\n\nsig AdminUser extends User {\n adminLevel: Int\n}\n\nsig Post {\n postId: Int,\n content: String,\n timestamp: Int\n}\n\nsig Like {\n likeId: Int,\n user: User,\n post: Post\n}\n\n// Fields\nfact uniqueUserId {\n all disj u1, u2: User | u1.userId != u2.userId\n}\n\nfact uniquePostId {\n all disj p1, p2: Post | p1.postId != p2.postId\n}\n\n// Inheritance\nfact adminInheritance {\n all u: AdminUser | u in User\n}\n\n// Facts\nfact likeConsistency {\n all l: Like | l.user in User and l.post in Post\n}\n\nfact postsByRegularUsers {\n all p: Post, u: RegularUser | p in u.post\n}\n\n// Predicates\npred userLikesPost[u: User, p: Post] {\n some l: Like | l.user = u and l.post = p\n}\n\npred popularPost[p: Post] {\n some u: User | userLikesPost[u, p] and some v: User | userLikesPost[v, p] and u != v\n}\n\n// Run commands\nrun unsatisfiableExample {\n // This run command should be unsatisfiable\n // Add constraints that make the model unsatisfiable\n no u: User | u in RegularUser and u in AdminUser\n}\n\nrun satisfiableExample for 3 {\n // This run command should be satisfiable\n // Adjust the bound as needed\n some p: Post, u: RegularUser | userLikesPost[u, p] and popularPost[p]\n}\n", "permalink": "gala-unplug-fridge-stump", "time": "2023-12-07 21:16:26.760568", "cmd": 2} {"id": 8458, "parent": 8455, "code": "// Basic Types\nabstract sig String {}\nabstract sig Int {}\n\n// User Signature\nsig User {\n username: one String,\n email: one String\n}\n\n// Abstract Product Signature\nabstract sig Product {\n productId: one Int,\n name: one String,\n price: one Int,\n seller: one User\n}\n\n// Electronic Product Inheriting from Product\nsig ElectronicProduct extends Product {\n brand: one String,\n warrantyPeriod: one Int\n}\n\n// Clothing Product Inheriting from Product\nsig ClothingProduct extends Product {\n size: one String,\n brand: one String\n}\n\n// Transaction Signature\nsig Transaction {\n transactionId: one Int,\n buyer: one User,\n seller: one User,\n product: one Product\n}\n\n// Feedback Signature\nsig Feedback {\n feedbackId: one Int,\n rating: one Int,\n comment: one String,\n user: one User\n}\n\n// Fact: Unique Usernames\nfact uniqueUsernames {\n all disj u1, u2: User | u1.username != u2.username\n}\n\n// Fact: Unique Product IDs\nfact uniqueProductIds {\n all disj p1, p2: Product | p1.productId != p2.productId\n}\n\n// Fact: Unique Transaction IDs\nfact uniqueTransactionIds {\n all disj t1, t2: Transaction | t1.transactionId != t2.transactionId\n}\n\n// Fact: Unique Feedback IDs\nfact uniqueFeedbackIds {\n all disj f1, f2: Feedback | f1.feedbackId != f2.feedbackId\n}\n\n// Predicate: Valid Transaction\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\n// Predicate: Positive Feedback\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Command: Unsatisfiable Example\nrun unsatisfiableExample for 4 but 3 String, 3 Int {\n // Intentionally unsatisfiable\n some p: Product | no p.productId\n}\n\n// Run Command: Satisfiable Example\nrun satisfiableExample for 4 but 3 String, 3 Int {\n // Satisfiable\n some p: Product | some p.productId\n}", "permalink": "jacket-panda-zesty-shaded", "time": "2023-12-07 21:20:55.352469", "cmd": 1} {"id": 8459, "parent": 7069, "code": "// Agatha, Charles, and Butler model in Alloy\n\n// Signatures\nsig Person {}\n\n// Facts\nfact individualsExist {\n some Agatha, Charles, Butler: Person | true\n}\n\n// Predicates\npred hates[p1, p2: Person] {\n (p1 = Agatha && p2 = Charles) ||\n (p1 = Butler && p2 = Agatha) ||\n (p1 = Agatha && p2 = Agatha) ||\n (p1 = Butler && p2 = Charles)\n}\n\npred killed[p1, p2: Person] {\n p1 = Agatha && p2 = Agatha\n}\n\npred richer[p1, p2: Person] {\n p1 = Butler && p2 = Agatha\n}\n\n// Run command (to check satisfaction)\nrun satisfyPredicates for 3\n\n// Check the predicates for each combination of individuals\nfact checkHates {\n all p1, p2: Person | hates[p1, p2] <=> (\n (p1 = Agatha && p2 = Charles) ||\n (p1 = Butler && p2 = Agatha) ||\n (p1 = Agatha && p2 = Agatha) ||\n (p1 = Butler && p2 = Charles)\n )\n}\n\nfact checkKilled {\n all p1, p2: Person | killed[p1, p2] <=> (p1 = Agatha && p2 = Agatha)\n}\n\nfact checkRicher {\n all p1, p2: Person | richer[p1, p2] <=> (p1 = Butler && p2 = Agatha)\n}\n\n// Ensure no contradiction\nfact noContradiction {\n no p1, p2: Person | hates[p1, p2] && killed[p1, p2]\n}\n\n// Ensure at least 2 instances\nfact atLeastTwoInstances {\n some p1, p2: Person | p1 != p2\n}\n\n// Ensure uniqueness of individuals\nfact uniqueIndividuals {\n lone Agatha\n lone Charles\n lone Butler\n}\n", "permalink": "keenly-tattoo-vastly-groom", "time": "2023-12-07 21:21:00.443095", "cmd": 1} {"id": 8464, "parent": 8460, "code": "// Basic Types - Alloy does not have built-in String and Int types, so they are defined as abstract signatures\nabstract sig String {}\nabstract sig Int {}\n\n// User Signature\nsig User {\n username: one String,\n email: one String\n}\n\n// Abstract Product Signature\nabstract sig Product {\n productId: one Int,\n name: one String,\n price: one Int,\n seller: one User\n}\n\n// Electronic Product Inheriting from Product\nsig ElectronicProduct extends Product {\n brand: one String,\n warrantyPeriod: one Int\n}\n\n// Clothing Product Inheriting from Product\nsig ClothingProduct extends Product {\n size: one String,\n brand: one String\n}\n\n// Transaction Signature\nsig Transaction {\n transactionId: one Int,\n buyer: one User,\n seller: one User,\n product: one Product\n}\n\n// Feedback Signature\nsig Feedback {\n feedbackId: one Int,\n rating: one Int,\n comment: one String,\n user: one User\n}\n\n// Fact: Unique Usernames\nfact uniqueUsernames {\n all disj u1, u2: User | u1.username != u2.username\n}\n\n// Fact: Unique Product IDs\nfact uniqueProductIds {\n all disj p1, p2: Product | p1.productId != p2.productId\n}\n\n// Fact: Unique Transaction IDs\nfact uniqueTransactionIds {\n all disj t1, t2: Transaction | t1.transactionId != t2.transactionId\n}\n\n// Fact: Unique Feedback IDs\nfact uniqueFeedbackIds {\n all disj f1, f2: Feedback | f1.feedbackId != f2.feedbackId\n}\n\n// Predicate: Valid Transaction\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\n// Predicate: Positive Feedback\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Command: Unsatisfiable Example\nrun unsatisfiableExample for 4 but 3 String, 3 Int {\n // Intentionally unsatisfiable\n some p: Product | no p.productId\n}\n\n// Run Command: Satisfiable Example\nrun satisfiableExample for 4 but 3 String, 3 Int {\n // Satisfiable\n some p: Product | some p.productId\n}", "permalink": "shush-angled-gizmo-petty", "time": "2023-12-07 21:23:41.632987", "cmd": 2} {"id": 8470, "parent": 8469, "code": "module MarketplaceSystem\n\n// Signatures\nsig User {\n username: one String,\n email: one String\n}\n\nsig String {}\n\nabstract sig Product {\n productId: one String,\n name: one String,\n price: one Int,\n seller: one User\n}\n\nsig ElectronicProduct extends Product {\n brand: one String,\n warrantyPeriod: one Int\n}\n\nsig ClothingProduct extends Product {\n size: one String,\n brand: one String\n}\n\nsig Transaction {\n transactionId: one String,\n buyer: one User,\n seller: one User,\n product: one Product\n}\n\nsig Feedback {\n feedbackId: one String,\n rating: one Int,\n comment: one String,\n user: one User\n}\n\nsig Int {}\n\n// Facts\nfact uniqueUsernames {\n all u1, u2: User | u1 != u2 implies u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all t1, t2: Transaction | t1 != t2 implies t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all f1, f2: Feedback | f1 != f2 implies f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample for 5 {\n // Intentionally unsatisfiable\n all p: Product | p.productId = p.productId\n}\n\nrun satisfiableExample for 5 {\n // Satisfiable\n some p: Product | some p.productId\n}", "permalink": "cosmos-scarce-paddle-fossil", "time": "2023-12-07 21:32:28.020674", "cmd": 2} {"id": 8471, "parent": 8470, "code": "module MarketplaceSystem\n\n// Signatures\nsig User {\n username: one String,\n email: one String\n}\n\nsig String {}\n\nabstract sig Product {\n productId: one String,\n name: one String,\n price: one Int,\n seller: one User\n}\n\nsig ElectronicProduct extends Product {\n brand: one String,\n warrantyPeriod: one Int\n}\n\nsig ClothingProduct extends Product {\n size: one String,\n brand: one String\n}\n\nsig Transaction {\n transactionId: one String,\n buyer: one User,\n seller: one User,\n product: one Product\n}\n\nsig Feedback {\n feedbackId: one String,\n rating: one Int,\n comment: one String,\n user: one User\n}\n\nsig Int {}\n\n// Facts\nfact uniqueUsernames {\n all u1, u2: User | u1 != u2 implies u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all t1, t2: Transaction | t1 != t2 implies t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all f1, f2: Feedback | f1 != f2 implies f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample for 5 {\n // Intentionally unsatisfiable\n all p: Product | p.productId = p.productId\n}\n\nrun satisfiableExample for 5 {\n // Satisfiable\n some p: Product | some p.productId\n}", "permalink": "creole-valium-decade-emboss", "time": "2023-12-07 21:32:32.412193", "cmd": 1} {"id": 8472, "parent": 8471, "code": "module MarketplaceSystem\n\n// Signatures\nsig User {\n username: one String,\n email: one String\n}\n\nsig String {}\n\nabstract sig Product {\n productId: one String,\n name: one String,\n price: one Int,\n seller: one User\n}\n\nsig ElectronicProduct extends Product {\n brand: one String,\n warrantyPeriod: one Int\n}\n\nsig ClothingProduct extends Product {\n size: one String,\n brand: one String\n}\n\nsig Transaction {\n transactionId: one String,\n buyer: one User,\n seller: one User,\n product: one Product\n}\n\nsig Feedback {\n feedbackId: one String,\n rating: one Int,\n comment: one String,\n user: one User\n}\n\nsig Int {}\n\n// Facts\nfact uniqueUsernames {\n all u1, u2: User | u1 != u2 implies u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all t1, t2: Transaction | t1 != t2 implies t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all f1, f2: Feedback | f1 != f2 implies f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample for 5 {\n // Intentionally unsatisfiable\n all p: Product | p.productId = p.productId\n}\n\nrun satisfiableExample for 5 {\n // Satisfiable\n some p: Product | some p.productId\n}", "permalink": "fade-trout-hurt-crayon", "time": "2023-12-07 21:32:36.811493", "cmd": 2} {"id": 8474, "parent": 8473, "code": "// Signatures\nsig User {\n username: lone Username,\n email: lone Email\n}\n\nsig Username, Email {} // Using separate signatures instead of 'String'\n\nabstract sig Product {\n productId: lone ProductID,\n name: lone Name,\n price: lone Int,\n seller: lone User\n}\n\nsig ElectronicProduct extends Product {\n brand: lone Brand,\n warrantyPeriod: lone Int\n}\n\nsig ClothingProduct extends Product {\n size: lone Size,\n brand: lone Brand\n}\n\nsig Transaction {\n transactionId: lone TransactionID,\n buyer: lone User,\n seller: lone User,\n product: lone Product\n}\n\nsig Feedback {\n feedbackId: lone FeedbackID,\n rating: lone Int,\n comment: lone Comment,\n user: lone User\n}\n\nsig ProductID, Name, Brand, Size, TransactionID, FeedbackID, Comment {}\n\n// Basic Integer Type (Alloy has limited support for integers)\nsig Int {}\n\n// Facts\nfact uniqueUsernames {\n all disj u1, u2: User | u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all disj p1, p2: Product | p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all disj t1, t2: Transaction | t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all disj f1, f2: Feedback | f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample for 5 {\n // Intentionally unsatisfiable\n all p: Product | no p.productId\n}\n\nrun satisfiableExample for 5 {\n // Satisfiable\n some p: Product | some p.productId\n}", "permalink": "email-blazer-mummy-tinsel", "time": "2023-12-07 21:34:45.891371", "cmd": 1} {"id": 8476, "parent": 8444, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {\n name: one String,\n age: one Int\n}\n\nsig Doctor extends Person {\n specialty: one String,\n patients: set Patient\n}\n\nsig Nurse extends Person {\n department: one String,\n assignedDoctors: set Doctor\n}\n\nsig Patient extends Person {\n disease: one String,\n attendingDoctor: one Doctor\n}\n\nsig Appointment {\n patient: one Patient,\n doctor: one Doctor,\n timeSlot: one TimeSlot\n}\n\nsig TimeSlot {\n startTime: one Int,\n endTime: one Int\n}\n\nfact NoSelfTreatment {\n all d: Doctor | no p: d.patients | p.attendingDoctor = d\n}\n\nfact ConsistentDoctorAssignment {\n all p: Patient, d: Doctor | p.attendingDoctor = d iff p in d.patients\n}\n\npred isAvailable[d: Doctor, t: TimeSlot] {\n no a: Appointment | a.doctor = d and a.timeSlot = t\n}\n\npred needsSpecialist[p: Patient, s: String] {\n p.disease = s\n}\n\nrun { some p: Patient, d: Doctor | p.attendingDoctor = d and p in d.patients } for 3 but 2 Doctor, 2 Patient, 3 TimeSlot, 2 Nurse\nrun { all d: Doctor | no p: Patient | p in d.patients and p.attendingDoctor = d } for 3 but 2 Doctor, 2 Patient, 3 TimeSlot, 2 Nurse", "permalink": "acre-struck-change-mama", "time": "2023-12-07 21:36:29.043947", "cmd": 1} {"id": 8488, "parent": 8487, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// Basic Types\nsig Name, Email, ProductID, UserID {}\n\n// User Signature\nsig User {\n userID: one UserID,\n username: one Name,\n email: one Email\n}\n\n// Product Signature\nsig Product {\n productID: one ProductID,\n name: one Name,\n price: one Int,\n seller: one User\n}\n\n// Transaction Signature\nsig Transaction {\n product: one Product,\n buyer: one User,\n transactionPrice: one Int\n}\n\n// Feedback Signature\nsig Feedback {\n transaction: one Transaction,\n rating: one Int,\n comment: lone String\n}\n\n// Facts\nfact uniqueUserIDs {\n all disj u1, u2: User | u1.userID != u2.userID\n}\n\nfact uniqueProductIDs {\n all disj p1, p2: Product | p1.productID != p2.productID\n}\n\nfact transactionHasCorrectPrice {\n all t: Transaction | t.transactionPrice = t.product.price\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.buyer != t.product.seller\n}\n\npred highRatingFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // Intentionally unsatisfiable: A transaction with incorrect price\n some t: Transaction | t.transactionPrice != t.product.price\n} for 5\n\nrun satisfiableExample {\n // Satisfiable: A transaction with a valid buyer and seller\n some t: Transaction | validTransaction[t]\n} for 5", "permalink": "alto-dollar-sleet-purist", "time": "2023-12-07 21:44:01.201931", "cmd": 2} {"id": 8489, "parent": 8169, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nabstract sig Person{\n memberOfDepartment: set Department,\n id : Int\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n hasMembership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n supervises: set Student \n}\n\n// Book\nsig Book {\n inLibrary : one Library,\n checkOutBy: set Student\n}\n\n// Department\nsig Department {\n associatedStudents: set Student,\n departmentLibrarian: one Librarian\n}\n\n//Library\nsig Library{\n contains :some Book,\n incharge: some Librarian\n}\n\n// Membership\nsig Membership{\n belongsTo: set Student,\n validTill : one Date\n}\n\n//Date\nsig Date{\n day: Int,\n month: Int,\n Year: Int\n}\n\n// Facts\n// fact: A student without membership cannot borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.hasMembership implies no student.borrowedBooks\n}\n\n// fact: Each book can be checked out by at most one student at a time\nfact bookCheckedOutByAtMostOneStudent {\n all book: Book | #book.checkOutBy <= 1\n}\n\n// fact: There is only one Library instance\nfact onlyOneLibrary {\n #Library = 1\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "preset-sheet-fondue-shaky", "time": "2023-12-07 21:51:51.018521", "cmd": 1} {"id": 8490, "parent": 8489, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nabstract sig Person{\n memberOfDepartment: set Department,\n id : Int\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n hasMembership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n supervises: set Student \n}\n\n// Book\nsig Book {\n inLibrary : one Library,\n checkOutBy: set Student\n}\n\n// Department\nsig Department {\n associatedStudents: set Student,\n departmentLibrarian: one Librarian\n}\n\n//Library\nsig Library{\n contains :some Book,\n incharge: some Librarian\n}\n\n// Membership\nsig Membership{\n belongsTo: set Student,\n validTill : one Date\n}\n\n//Date\nsig Date{\n day: Int,\n month: Int,\n Year: Int\n}\n\n// Facts\n// fact: A student without membership cannot borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.hasMembership implies no student.borrowedBooks\n}\n\n// fact: Each book can be checked out by at most one student at a time\nfact bookCheckedOutByAtMostOneStudent {\n all book: Book | #book.checkOutBy <= 1\n}\n\n// fact: There is only one Library instance\nfact onlyOneLibrary {\n #Library = 1\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "prissy-hurt-choosy-alto", "time": "2023-12-07 21:55:27.371713", "cmd": 2} {"id": 8491, "parent": 8490, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nabstract sig Person{\n memberOfDepartment: set Department,\n id : Int\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n hasMembership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n supervises: set Student \n}\n\n// Book\nsig Book {\n inLibrary : one Library,\n checkOutBy: set Student\n}\n\n// Department\nsig Department {\n associatedStudents: set Student,\n departmentLibrarian: one Librarian\n}\n\n//Library\nsig Library{\n contains :some Book,\n incharge: some Librarian\n}\n\n// Membership\nsig Membership{\n belongsTo: set Student,\n validTill : one Date\n}\n\n//Date\nsig Date{\n day: Int,\n month: Int,\n Year: Int\n}\n\n// Facts\n// fact: A student without membership cannot borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.hasMembership implies no student.borrowedBooks\n}\n\n// fact: Each book can be checked out by at most one student at a time\nfact bookCheckedOutByAtMostOneStudent {\n all book: Book | #book.checkOutBy <= 1\n}\n\n// fact: There is only one Library instance\nfact onlyOneLibrary {\n #Library = 1\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "gap-reply-think-romp", "time": "2023-12-07 21:55:35.701963", "cmd": 1} {"id": 8499, "parent": 8494, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\n\nsig Director extends Person {\n \n}\n\nsig Actor extends Person {\n\n}\n\n\nrun {}", "permalink": "parish-widen-animal-debate", "time": "2023-12-07 22:05:54.042372", "cmd": 1} {"id": 8502, "parent": 7807, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\nsig Person {\n likes: set Book,\n dislikes: set Book,\n}\n\n\nsome sig Librarian extends Person {\n recommends: set Book,\n sorting_in: lone Book, \n}\n\nsig Book {\n lent_to: lone Person, // if not sorting_in and not \n continuation_of: lone Book\n}\n\nsome sig Shelf {\n holds: set Book, // books which are not reserved and not in process\n assigned_to: one Librarian\n}\n\nfact ExclusiveLikesDislikes {\n all p: Person |\n p.likes & p.dislikes = none // No book should be both liked and disliked by the same person\n}\n\nfact LibrarianRules {\n all l: Librarian |\n l.dislikes & l.recommends = none\n}\n\nfact NoLendingWhileSortingIn {\n all l: Librarian, b: Book, p : Person |\n l.sorting_in = b implies not b.lent_to = p\n}\n\nfact NoSelfContinuation {\n all b: Book | b.continuation_of != b // A book is not allowed to be its own continuation\n}\n\nfact UniqueContinuation {\n all disj b1, b2: Book | b1.continuation_of != b2.continuation_of // One book can't have more than one continuation\n}\n\nfact NoBookInMoreThanOneShelf {\n all disj sh1, sh2: Shelf | all b : Book | sh1.holds = b && sh2.holds != b \n}\n\npred ThereIsNoLibrarian{\n no Librarian\n}\n\npred DontRentOnDislike {\n all p : Person | all b : Book | p.dislikes = b implies not b.lent_to = p\n}\n\n// PRED - Acyclic continuation\n\nrun ThereIsNoLibrarian\nrun DontRentOnDislike", "permalink": "whacky-baffle-gab-facing", "time": "2023-12-07 22:07:26.524873", "cmd": 1} {"id": 8506, "parent": null, "code": "abstract sig Person {\n killed: Person -> lone Person\n}\n\none sig Agatha extends Person {}\n\npred existenceOfKiller {\n some x: Person | x in killed[Agatha]\n}\n\nrun existenceOfKiller for 3 Person", "permalink": "widow-pluck-ripple-script", "time": "2023-12-07 22:11:14.414607", "cmd": 1} {"id": 8513, "parent": 8512, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n some x: Person | Agatha in x.killed \n \n all x, y: Person |\n (x in y.killed implies x in y.hates and not x in y.richer)\n\n all x: Person | x in Agatha.hates implies not x in Charles.hates \n\n Agatha in Agatha.hates and Charles in Agatha.hates \n\n all x: Person | (not Agatha in x.richer) implies (x in Butler.hates) \n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates) \n\n all x: Person | some y: Person | (not y in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "chaos-easing-herbal-much", "time": "2023-12-07 22:20:40.016922", "cmd": 1} {"id": 8514, "parent": 8513, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n some x: Person | Agatha in x.killed \n \n all x, y: Person |\n (x in y.killed implies x in y.hates and not x in y.richer)\n\n all x: Person | x in Agatha.hates => not x in Charles.hates \n\n Agatha in Agatha.hates and Charles in Agatha.hates \n\n all x: Person | (not Agatha in x.richer) implies (x in Butler.hates) \n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates) \n\n all x: Person | some y: Person | (not y in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "false-feast-exhume-monday", "time": "2023-12-07 22:20:47.042294", "cmd": 1} {"id": 8515, "parent": 8509, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // Constraint 1\n some x: Person | Agatha in x.killed\n \n // Constraint 2\n all x, y: Person | y in x.killed implies (y in x.hates and not (y in x.richer))\n \n // Constraint 3\n all x: Person | not x.hates and Agatha implies not x.hates and Charles\n \n // Constraint 4\n Agatha in Agatha.hates and Charles in Agatha.hates\n \n // Constraint 5\n all x: Person | not x.richer and Agatha implies x.hates and Butler\n \n // Constraint 6\n all x: Person | x.hates and Agatha implies x.hates and Butler\n \n // Constraint 7\n all x: Person | some y: Person | x.hates = y\n \n // Additional Constraints\n no Agatha.hates // Constraint 8\n Agatha != Butler // Constraint 9\n no x: Person | x.hates = x // Constraint 10\n}\n\nrun puzzle for 3", "permalink": "bucked-pug-jam-gamma", "time": "2023-12-07 22:21:10.300443", "cmd": 1} {"id": 8516, "parent": 8514, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n some x: Person | Agatha in x.killed \n \n all x, y: Person |\n (x in y.killed implies x in y.hates and not x in y.richer)\n\n all x: Person | x in Agatha.hates && not x in Charles.hates \n\n Agatha in Agatha.hates and Charles in Agatha.hates \n\n all x: Person | (not Agatha in x.richer) implies (x in Butler.hates) \n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates) \n\n all x: Person | some y: Person | (not y in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "pencil-lip-storm-frisk", "time": "2023-12-07 22:21:10.883197", "cmd": 1} {"id": 8517, "parent": 8516, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n some x: Person | Agatha in x.killed \n \n all x, y: Person |\n (x in y.killed implies x in y.hates and not x in y.richer)\n\n all x: Person | x in Agatha.hates and not x in Charles.hates \n\n Agatha in Agatha.hates and Charles in Agatha.hates \n\n all x: Person | (not Agatha in x.richer) implies (x in Butler.hates) \n\n all x: Person | (x in Agatha.hates) implies (x in Butler.hates) \n\n all x: Person | some y: Person | (not y in x.hates)\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "oat-hanky-unit-panama", "time": "2023-12-07 22:21:13.904282", "cmd": 1} {"id": 8521, "parent": 8519, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\n\nsig Director extends Person {\n hasDirected: some Movie\n hasWorkedWith: some Actor\n}\n\nsig Actor extends Person {\n hasWorkedWith: some Director and set Actor \n} {\n this not in hasWorkedWith\n}\n\nsig Movie {\n\n}\n\nsig Cast {\n\n}\n\n\nrun {}", "permalink": "acting-refill-mantis-nag", "time": "2023-12-07 22:22:50.227103", "cmd": 1} {"id": 8527, "parent": 8525, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // Constraint 1\n some x: Person | Agatha in x.killed\n \n // Constraint 2\n all x, y: Person | y in x.killed implies (y in x.hates and not (y in x.richer))\n \n // Constraint 3\n all x: Person | x in Agatha.hates implies not (x in Charles.hates)\n \n // Constraint 4\n Agatha in Agatha.hates and Charles in Agatha.hates\n \n // Constraint 5\n all x: Person | not(Agatha in x.richer) implies x in Butler.hates\n \n // Constraint 6\n all x: Person | x in Agatha.hates implies x in Butler.hates\n \n // Constraint 7\n all x: Person | some y: Person | not(y in x.hates)\n \n // Additional Constraints\n no Agatha.hates // Constraint 8\n Agatha != Butler // Constraint 9\n no x: Person | x.hates = x // Constraint 10\n}\n\nrun puzzle for 3", "permalink": "pledge-system-strike-treat", "time": "2023-12-07 22:25:45.822404", "cmd": 1} {"id": 8528, "parent": 8527, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // Constraint 1\n some x: Person | Agatha in x.killed\n \n // Constraint 2\n all x, y: Person | y in x.killed implies (y in x.hates and not (y in x.richer))\n \n // Constraint 3\n all x: Person | x in Agatha.hates implies not (x in Charles.hates)\n \n // Constraint 4\n Agatha in Agatha.hates and Charles in Agatha.hates\n \n // Constraint 5\n all x: Person | not(Agatha in x.richer) implies x in Butler.hates\n \n // Constraint 6\n all x: Person | x in Agatha.hates implies x in Butler.hates\n \n // Constraint 7\n all x: Person | some y: Person | not(y in x.hates)\n \n // Additional Constraints\n // no Agatha.hates // Constraint 8\n // Agatha != Butler // Constraint 9\n // no x: Person | x.hates = x // Constraint 10\n}\n\nrun puzzle for 3", "permalink": "stray-player-area-stench", "time": "2023-12-07 22:25:54.191655", "cmd": 1} {"id": 8533, "parent": 8405, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n\n //Formula 1\n some x: Person | x in Agatha.killed\n //some x: Person | x.killed[Agatha]\n\n //Formula 2\n all x, y: Person |\n (x in y.killed implies x in y.hates and not x in y.richer)\n\n //Formula 3\n all x: Person | \n (Agatha in x.hates implies not Charles in x.hates)\n\n //Formula 4\n Agatha in Agatha.hates and Agatha in Charles.hates\n\n //Formula 5\n all x: Person | (not x in Agatha.richer implies Butler in x.hates)\n\n //Formula 6\n all x: Person | (Agatha in x.hates implies Butler in x.hates)\n\n //Formula 7\n all x: Person | some y: Person | not (x in y.hates)\n}\nrun puzzle", "permalink": "travel-bobble-scroll-bust", "time": "2023-12-07 22:28:42.141216", "cmd": 1} {"id": 8539, "parent": 8531, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: set File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or (some f.link and f.link in Trash)\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no p.link in Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash)\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no File.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv10\n\n/* No unprotected file should exist outside of Trash. */\npred inv11 {\n all f: File - Protected | f not in Trash\n}\n\nrun inv11\n\n/* If a link is deleted, the target should be deleted too. */\npred inv12 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv12\n\n/* A linked file should not be in trash. */\npred inv13 {\n no f: File | f.link in Trash and f in Trash\n}\n\nrun inv13", "permalink": "thread-casing-spruce-kennel", "time": "2023-12-07 22:32:11.204554", "cmd": 1} {"id": 8540, "parent": 8539, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: lone File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or (some f.link and f.link in Trash)\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no p.link in Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash)\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no File.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv10\n\n/* No unprotected file should exist outside of Trash. */\npred inv11 {\n all f: File - Protected | f not in Trash\n}\n\nrun inv11\n\n/* If a link is deleted, the target should be deleted too. */\npred inv12 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv12\n\n/* A linked file should not be in trash. */\npred inv13 {\n no f: File | f.link in Trash and f in Trash\n}\n\nrun inv13", "permalink": "evolve-blade-debunk-lively", "time": "2023-12-07 22:33:28.510195", "cmd": 1} {"id": 8547, "parent": 8546, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: set File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or (some f.link and f.link in Trash)\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no (p.link & Trash)\n}\n \nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash)\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no File.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv10", "permalink": "aliens-husked-payee-return", "time": "2023-12-07 22:37:24.006035", "cmd": 1} {"id": 8549, "parent": 8548, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: lone File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or (some f.link and f.link in Trash)\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no (p.link & Trash)\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash)\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no File.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv10\n\n/* No unprotected file should exist outside of Trash. */\npred inv11 {\n all f: File - Protected | f not in Trash\n}\n\nrun inv11\n\n/* If a link is deleted, the target should be deleted too. */\npred inv12 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv12\n\n/* A linked file should not be in trash. */\npred inv13 {\n no f: File | f.link in Trash and f in Trash\n}\n\nrun inv13", "permalink": "agile-alibi-gaffe-pebbly", "time": "2023-12-07 22:38:24.704455", "cmd": 1} {"id": 8552, "parent": 8551, "code": "// University Model\n\n// Signatures\nabstract sig Person {\n name: String,\n age: Int\n}\n\nsig Student extends Person {\n studentID: Int,\n major: String\n}\n\nsig Professor extends Person {\n staffID: Int,\n department: String\n}\n\nsig Course {\n courseCode: String,\n credits: Int\n}\n\nsig Classroom {\n roomNumber: Int,\n capacity: Int\n}\n\n// Inheritance\nfact StudentsArePeople {\n all s: Student | s in Person\n}\n\n// Facts\nfact CoursesHaveUniqueCodes {\n all disj c1, c2: Course | c1.courseCode = not c2.courseCode\n}\n\n// Predicates\npred TeachingCapacity {\n all p: Professor, c: Course | some room: Classroom | room.capacity > 30 and room.capacity > #(p teaches c)\n}\n\npred EnrolledStudents {\n all c: Course | some s: Student | s.major = \"Computer Science\" and c in s.enrolledCourses\n}\n\n// Run Commands\nrun {\n // This run command is unsatisfiable\n some p: Professor | no c: Course | p.teaches c\n} for 5 but exactly 3 Professor, 3 Course\n\nrun {\n // This run command is satisfiable\n some s: Student, c: Course, p: Professor, r: Classroom | s.major = \"Computer Science\" and s.enrolledCourses = c and p.teaches c and TeachingCapacity and EnrolledStudents\n} for 5 but exactly 2 Student, 2 Course, 2 Professor, 2 Classroom", "permalink": "collie-awaken-unless-huff", "time": "2023-12-07 22:39:39.928383", "cmd": 2} {"id": 8553, "parent": 8552, "code": "// University Model\n\n// Signatures\nabstract sig Person {\n name: String,\n age: Int\n}\n\nsig Student extends Person {\n studentID: Int,\n major: String\n}\n\nsig Professor extends Person {\n staffID: Int,\n department: String\n}\n\nsig Course {\n courseCode: String,\n credits: Int\n}\n\nsig Classroom {\n roomNumber: Int,\n capacity: Int\n}\n\n// Inheritance\nfact StudentsArePeople {\n all s: Student | s in Person\n}\n\n// Facts\nfact CoursesHaveUniqueCodes {\n all disj c1, c2: Course | c1.courseCode = not c2.courseCode\n}\n\n// Predicates\npred TeachingCapacity {\n all p: Professor, c: Course | some room: Classroom | room.capacity > 30 and room.capacity > #(p teaches c)\n}\n\npred EnrolledStudents {\n all c: Course | some s: Student | s.major = \"Computer Science\" and c in s.enrolledCourses\n}\n\n// Run Commands\nrun {\n // This run command is unsatisfiable\n some p: Professor | no c: Course | p.teaches c\n} for 5 but exactly 3 Professor, 3 Course\n\nrun {\n // This run command is satisfiable\n some s: Student, c: Course, p: Professor, r: Classroom | s.major = \"Computer Science\" and s.enrolledCourses = c and p.teaches c and TeachingCapacity and EnrolledStudents\n} for 5 but exactly 2 Student, 2 Course, 2 Professor, 2 Classroom", "permalink": "haiku-spoils-harbor-coke", "time": "2023-12-07 22:39:52.712921", "cmd": 1} {"id": 8555, "parent": 8549, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: lone File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or (some f.link and f.link in Trash)\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no (p.link & Trash)\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash)\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no File.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv10\n\n/* No unprotected file should exist outside of Trash. */\npred inv11 {\n all f: File - Protected | f not in Trash\n}\n\nrun inv11\n\n/* If a link is deleted, the target should be deleted too. */\npred inv12 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv12\n\n/* A linked file should not be in trash. */\npred inv13 {\n all f: File | f.link in Trash implies no f in Trash\n}\n\nrun inv13", "permalink": "riding-family-jiffy-oops", "time": "2023-12-07 22:41:50.352291", "cmd": 1} {"id": 8558, "parent": 8557, "code": "// University Model\n\n// Signatures\nabstract sig Person {\n name: String,\n age: Int\n}\n\nsig Student extends Person {\n studentID: Int,\n major: String\n}\n\nsig Professor extends Person {\n staffID: Int,\n department: String\n}\n\nsig Course {\n courseCode: String,\n credits: Int\n}\n\nsig Classroom {\n roomNumber: Int,\n capacity: Int\n}\n\n// Inheritance\nfact StudentsArePeople {\n all s: Student | s in Person\n}\n\n// Facts\nfact CoursesHaveUniqueCodes {\n all disj c1, c2: Course | c1.courseCode = not c2.courseCode\n}\n\n// Predicates\npred TeachingCapacity {\n all p: Professor, c: Course | some room: Classroom | room.capacity > 30 and room.capacity > #(p teaches c)\n}\n\npred EnrolledStudents {\n all c: Course | some s: Student | s.major = \"Computer Science\" and c in s.enrolledCourses\n}\n\n// Run Commands\nrun {\n // This run command is unsatisfiable\n some p: Professor | not c: Course | c in p.teaches\n} for 5 but exactly 3 Professor, 3 Course\n\nrun {\n // This run command is satisfiable\n some s: Student, c: Course, p: Professor, r: Classroom | s.major = \"Computer Science\" and s.enrolledCourses = c and c in p.teaches and TeachingCapacity and EnrolledStudents\n} for 5 but exactly 2 Student, 2 Course, 2 Professor, 2 Classroom", "permalink": "action-gulf-jet-attain", "time": "2023-12-07 22:43:29.525249", "cmd": 2} {"id": 8568, "parent": 8566, "code": "// University Model\n\n// Signatures\nabstract sig Person {\n name: String,\n age: Int\n}\n\nsig Student extends Person {\n studentID: Int,\n major: String,\n enrolledCourses: set Course\n}\n\nsig Professor extends Person {\n staffID: Int,\n department: String\n}\n\nsig Course {\n courseCode: String,\n credits: Int\n}\n\nsig Classroom {\n roomNumber: Int,\n capacity: Int\n}\n\n// Inheritance\nfact StudentsArePeople {\n all s: Student | s in Person\n}\n\n// Facts\nfact CoursesHaveUniqueCodes {\n all disj c1, c2: Course | c1.courseCode != c2.courseCode\n}\n\n// Predicates\npred TeachingCapacity {\n all p: Professor, c: Course, r: Classroom | some room: r | room.capacity > 30 and room.capacity > #(p teaches c)\n}\n\npred EnrolledStudents {\n all c: Course | some s: Student | s.major = \"Computer Science\" and c in s.enrolledCourses\n}\n\n// Run Commands\nrun {\n // This run command is unsatisfiable\n some p: Professor | no c: Course | p.teaches c\n} for 5 but exactly 3 Professor, 3 Course\n\nrun {\n // This run command is satisfiable\n some s: Student, c: Course, p: Professor, r: Classroom | s.major = \"Computer Science\" and c in s.enrolledCourses and TeachingCapacity[p, c, r] and EnrolledStudents\n} for 5 but exactly 2 Student, 2 Course, 2 Professor, 2 Classroom", "permalink": "verify-sprain-tall-blade", "time": "2023-12-07 22:45:29.873382", "cmd": 1} {"id": 8569, "parent": 8567, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// Signatures\n// Define a simple model\nsig Person {\n name: String,\n age: Int\n}\nsig Adult, Kid extends Person {}\n\n// sig House {\n// withLic: some Adult,\n// withoutLic: no Kid\n// }\n\n// sig numberOfPeopleWithLicense {\n// number: Int\n// }\n\n// fact LegalDrivingAge {\n// all p: Person | p.age >= 18\n// }\n// fact peopleWithLicense {\n// some p: Person | \n// }\n\n// Run command to check if all persons are under 16 years old\nrun underagePersonsExample {\n all p: Person | p.age < 16 \n}", "permalink": "void-runner-margin-junior", "time": "2023-12-07 22:45:46.114701", "cmd": 1} {"id": 8570, "parent": 8568, "code": "// University Model\n\n// Signatures\nabstract sig Person {\n name: String,\n age: Int\n}\n\nsig Student extends Person {\n studentID: Int,\n major: String,\n enrolledCourses: set Course\n}\n\nsig Professor extends Person {\n staffID: Int,\n department: String\n}\n\nsig Course {\n courseCode: String,\n credits: Int\n}\n\nsig Classroom {\n roomNumber: Int,\n capacity: Int\n}\n\n// Inheritance\nfact StudentsArePeople {\n all s: Student | s in Person\n}\n\n// Facts\nfact CoursesHaveUniqueCodes {\n all disj c1, c2: Course | c1.courseCode != c2.courseCode\n}\n\n// Predicates\npred TeachingCapacity[p: Professor, c: Course, r: Classroom] {\n some room: r | room.capacity > 30 and room.capacity > #(p teaches c)\n}\n\npred EnrolledStudents {\n all c: Course | some s: Student | s.major = \"Computer Science\" and c in s.enrolledCourses\n}\n\n// Run Commands\nrun {\n // This run command is unsatisfiable\n some p: Professor | no c: Course | p.teaches c\n} for 5 but exactly 3 Professor, 3 Course\n\nrun {\n // This run command is satisfiable\n some s: Student, c: Course, p: Professor, r: Classroom | s.major = \"Computer Science\" and c in s.enrolledCourses and TeachingCapacity[p, c, r] and EnrolledStudents\n} for 5 but exactly 2 Student, 2 Course, 2 Professor, 2 Classroom", "permalink": "length-grid-radar-tidy", "time": "2023-12-07 22:46:13.035969", "cmd": 1} {"id": 8576, "parent": 8574, "code": "// University Model\n\n// Signatures\nabstract sig Person {\n name: String,\n age: Int\n}\n\nsig Student extends Person {\n studentID: Int,\n major: String,\n enrolledCourses: set Course\n}\n\nsig Professor extends Person {\n staffID: Int,\n department: String,\n teaches: set Course\n}\n\nsig Course {\n courseCode: String,\n credits: Int\n}\n\nsig Classroom {\n roomNumber: Int,\n capacity: Int\n}\n\n// Inheritance\nfact StudentsArePeople {\n all s: Student | s in Person\n}\n\n// Facts\nfact CoursesHaveUniqueCodes {\n all disj c1, c2: Course | c1.courseCode != c2.courseCode\n}\n\n// Predicates\npred TeachingCapacity[p: Professor, c: Course, r: Classroom] {\n some room: r | room.capacity > 30 \n //and room.capacity > #(p.teaches & c)\n}\n\npred EnrolledStudents {\n all c: Course | some s: Student | s.major = \"Computer Science\" and c in s.enrolledCourses\n}\n\n// Run Commands\nrun {\n // This run command is unsatisfiable\n some p: Professor | no c: Course | c in p.teaches\n} for 5 but exactly 3 Professor, 3 Course\n\nrun {\n // This run command is satisfiable\n some s: Student, c: Course, p: Professor, r: Classroom | s.major = \"Computer Science\" and c in s.enrolledCourses and TeachingCapacity[p, c, r] and EnrolledStudents\n} for 5 but exactly 2 Student, 2 Course, 2 Professor, 2 Classroom", "permalink": "aloe-roving-exit-yogurt", "time": "2023-12-07 22:48:06.678274", "cmd": 1} {"id": 8577, "parent": 8576, "code": "// University Model\n\n// Signatures\nabstract sig Person {\n name: String,\n age: Int\n}\n\nsig Student extends Person {\n studentID: Int,\n major: String,\n enrolledCourses: set Course\n}\n\nsig Professor extends Person {\n staffID: Int,\n department: String,\n teaches: set Course\n}\n\nsig Course {\n courseCode: String,\n credits: Int\n}\n\nsig Classroom {\n roomNumber: Int,\n capacity: Int\n}\n\n// Inheritance\nfact StudentsArePeople {\n all s: Student | s in Person\n}\n\n// Facts\nfact CoursesHaveUniqueCodes {\n all disj c1, c2: Course | c1.courseCode != c2.courseCode\n}\n\n// Predicates\npred TeachingCapacity[p: Professor, c: Course, r: Classroom] {\n some room: r | room.capacity > 30 \n //and room.capacity > #(p.teaches & c)\n}\n\npred EnrolledStudents {\n all c: Course | some s: Student | s.major = \"Computer Science\" and c in s.enrolledCourses\n}\n\n// Run Commands\nrun {\n // This run command is unsatisfiable\n some p: Professor | no c: Course | c in p.teaches\n} for 5 but exactly 3 Professor, 3 Course\n\nrun {\n // This run command is satisfiable\n some s: Student, c: Course, p: Professor, r: Classroom | s.major = \"Computer Science\" and c in s.enrolledCourses and TeachingCapacity[p, c, r] and EnrolledStudents\n} for 5 but exactly 2 Student, 2 Course, 2 Professor, 2 Classroom", "permalink": "unease-list-curler-riot", "time": "2023-12-07 22:48:13.929704", "cmd": 2} {"id": 8578, "parent": 8577, "code": "// University Model\n\n// Signatures\nabstract sig Person {\n name: String,\n age: Int\n}\n\nsig Student extends Person {\n studentID: Int,\n major: String,\n enrolledCourses: set Course\n}\n\nsig Professor extends Person {\n staffID: Int,\n department: String,\n teaches: set Course\n}\n\nsig Course {\n courseCode: String,\n credits: Int\n}\n\nsig Classroom {\n roomNumber: Int,\n capacity: Int\n}\n\n// Inheritance\nfact StudentsArePeople {\n all s: Student | s in Person\n}\n\n// Facts\nfact CoursesHaveUniqueCodes {\n all disj c1, c2: Course | c1.courseCode != c2.courseCode\n}\n\n// Predicates\npred TeachingCapacity[p: Professor, c: Course, r: Classroom] {\n some room: r | room.capacity > 30 \n //and room.capacity > #(p.teaches & c)\n}\n\npred EnrolledStudents {\n all c: Course | some s: Student | s.major = \"Computer Science\" and c in s.enrolledCourses\n}\n\n// Run Commands\nrun {\n // This run command is unsatisfiable\n some p: Professor | no c: Course | c in p.teaches\n} for 5 but exactly 3 Professor, 3 Course\n\nrun {\n // This run command is satisfiable\n some s: Student, c: Course, p: Professor, r: Classroom | s.major = \"Computer Science\" and c in s.enrolledCourses and TeachingCapacity[p, c, r] and EnrolledStudents\n} for 5 but exactly 2 Student, 2 Course, 2 Professor, 2 Classroom", "permalink": "stoic-curler-magma-appear", "time": "2023-12-07 22:48:27.605426", "cmd": 1} {"id": 8580, "parent": 8579, "code": "// University Model\n\n// Signatures\nabstract sig Person {\n name: String,\n age: Int\n}\n\nsig Student extends Person {\n studentID: Int,\n major: String,\n enrolledCourses: set Course\n}\n\nsig Professor extends Person {\n staffID: Int,\n department: String,\n teaches: set Course\n}\n\nsig Course {\n courseCode: String,\n credits: Int\n}\n\nsig Classroom {\n roomNumber: Int,\n capacity: Int\n}\n\n// Inheritance\nfact StudentsArePeople {\n all s: Student | s in Person\n}\n\n// Facts\nfact CoursesHaveUniqueCodes {\n all disj c1, c2: Course | c1.courseCode != c2.courseCode\n}\n\n// Predicates\npred TeachingCapacity[p: Professor, c: Course, r: Classroom] {\n some room: r | room.capacity > 30 \n //and room.capacity > #(p.teaches & c)\n}\n\npred EnrolledStudents {\n all c: Course | some s: Student | s.major = \"Computer Science\" and c in s.enrolledCourses\n}\n\n// Run Commands\nrun {\n // This run command is unsatisfiable\n some p: Professor | no c: Course \n //| c in p.teaches\n} for 5 \n//but exactly 3 Professor, 3 Course\n\nrun {\n // This run command is satisfiable\n some s: Student, c: Course, p: Professor, r: Classroom | s.major = \"Computer Science\" and c in s.enrolledCourses and TeachingCapacity[p, c, r] and EnrolledStudents\n} for 5 but exactly 2 Student, 2 Course, 2 Professor, 2 Classroom", "permalink": "vanity-size-blunt-matted", "time": "2023-12-07 22:49:18.498059", "cmd": 1} {"id": 8587, "parent": 8586, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: lone File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no (p.link & Trash)\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n all f: File | f.link in Trash implies no f in Trash and not f.link in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no File.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash and not f.link in Trash\n}\nrun inv10\n\n/* No unprotected file should exist outside of Trash. */\npred inv11 {\n all f: File - Protected | f not in Trash and not f.link in Trash\n}\nrun inv11\n\n/* If a link is deleted, the target should be deleted too. */\npred inv12 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv12\n\n/* A linked file should not be in trash. */\npred inv13 {\n all f: File | f.link in Trash implies not f in Trash\n}\nrun inv13", "permalink": "quiver-always-runny-exodus", "time": "2023-12-07 22:58:44.082697", "cmd": 1} {"id": 8588, "parent": 8587, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: lone File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no (p.link & Trash)\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n all f: File | f.link in Trash implies not f in Trash\n}\n// pred inv7 {\n// all f: File | f.link in Trash implies no f in Trash and no f.link in Trash\n// }\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no File.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash and not f.link in Trash\n}\nrun inv10\n\n/* No unprotected file should exist outside of Trash. */\npred inv11 {\n all f: File - Protected | f not in Trash and not f.link in Trash\n}\nrun inv11\n\n/* If a link is deleted, the target should be deleted too. */\npred inv12 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv12\n\n/* A linked file should not be in trash. */\npred inv13 {\n all f: File | f.link in Trash implies not f in Trash\n}\nrun inv13", "permalink": "agent-most-taps-ascend", "time": "2023-12-07 22:58:57.649468", "cmd": 1} {"id": 8592, "parent": 8589, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: lone File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no (p.link & Trash)\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\n\npred inv7 {\n all f: File | f.link in Trash implies not f in Trash and not f.link in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no File.link \n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash and not f.link in Trash\n}\nrun inv10\n\n/* No unprotected file should exist outside of Trash. */\npred inv11 {\n all f: File - Protected | f not in Trash and not f.link in Trash\n}\nrun inv11\n\n/* If a link is deleted, the target should be deleted too. */\npred inv12 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv12\n\n/* A linked file should not be in trash. */\npred inv13 {\n all f: File | f.link in Trash implies not f in Trash\n}\nrun inv13", "permalink": "poem-stack-hazing-slot", "time": "2023-12-07 23:00:15.750322", "cmd": 1} {"id": 8594, "parent": 8593, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: lone File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n not Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | not (p.link & Trash)\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\n\npred inv7 {\n all f: File | f.link in Trash implies not f in Trash and not f.link in Trash\n}\n\nrun inv7\n\n/* There are no links. */ \npred inv8 {\n not File.link \n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n not File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash and not f.link in Trash\n}\nrun inv10\n\n/* No unprotected file should exist outside of Trash. */\npred inv11 {\n all f: File - Protected | f not in Trash and not f.link in Trash\n}\nrun inv11\n\n/* If a link is deleted, the target should be deleted too. */\npred inv12 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv12\n\n/* A linked file should not be in trash. */\npred inv13 {\n all f: File | f.link in Trash implies not f in Trash\n}\nrun inv13", "permalink": "runny-scone-lucid-unclip", "time": "2023-12-07 23:09:38.415984", "cmd": 1} {"id": 8597, "parent": 8596, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: lone File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash \n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | not (p.link & Trash)\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\n\npred inv7 {\n all f: File | f.link in Trash implies not f in Trash and not f.link in Trash\n}\n\nrun inv7 \n\n/* There are no links. */ \npred inv8 {\n not File.link \n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n not File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash and not f.link in Trash\n}\nrun inv10\n\n/* No unprotected file should exist outside of Trash. */\npred inv11 {\n all f: File - Protected | f not in Trash and not f.link in Trash\n}\nrun inv11\n\n/* If a link is deleted, the target should be deleted too. */\npred inv12 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv12\n\n/* A linked file should not be in trash. */\npred inv13 {\n all f: File | f.link in Trash implies not f in Trash\n}\nrun inv13", "permalink": "nutmeg-hence-backer-oven", "time": "2023-12-07 23:11:34.689945", "cmd": 1} {"id": 8605, "parent": 8603, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n all f: Trash | no f.link\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or some f.link in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no p in Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n no disj f1, f2: File | f1.link & f2.link = none\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f1, f2: File | f1.link & f2.link = none\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | l in Trash implies f in Trash\n}\n\nrun inv10", "permalink": "hacked-apache-gong-unwind", "time": "2023-12-07 23:19:46.203372", "cmd": 1} {"id": 8607, "parent": 8606, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n all f: Trash | no f.link\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or some f.link in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | not p in Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n no disj f1, f2: File | f1.link & f2.link = none\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f1, f2: File | f1.link & f2.link = none\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | l in Trash implies f in Trash\n}\n\nrun inv10", "permalink": "disarm-humbly-next-throng", "time": "2023-12-07 23:20:49.614527", "cmd": 1} {"id": 8614, "parent": 8613, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n all f: Trash | no f.link\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n //or some f.link in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | not p in Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n no disj f1, f2: File | f1.link & f2.link = none\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f1, f2: File | f1.link & f2.link = none\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | l in Trash implies f in Trash\n}\n\nrun inv10", "permalink": "floral-wipe-blade-iodize", "time": "2023-12-07 23:25:05.588784", "cmd": 7} {"id": 8631, "parent": 8630, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n all f: Trash | no f.link\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n //or some f.link in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | not p in Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n no disj f1, f2: File | f1.link and f2.link = none\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f1, f2: File | f1.link & f2.link = none\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | l in Trash implies f in Trash\n}\n\nrun inv10", "permalink": "hence-hubcap-remedy-rage", "time": "2023-12-07 23:29:44.190651", "cmd": 6} {"id": 8632, "parent": 8631, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n all f: Trash | no f.link\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n //or some f.link in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | not p in Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n no disj f1, f2: File | f1.link & f2.link = none\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f1, f2: File | f1.link & f2.link = none\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | l in Trash implies f in Trash\n}\n\nrun inv10", "permalink": "voter-legged-hermit-civic", "time": "2023-12-07 23:29:50.447515", "cmd": 6} {"id": 8641, "parent": 8640, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n //or some f.link in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n no disj f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | l in Trash implies f in Trash\n}\n\nrun inv10", "permalink": "theft-ablaze-poet-simple", "time": "2023-12-07 23:33:03.390167", "cmd": 4} {"id": 8648, "parent": 8646, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n //or some f.link in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | no f.link.link\n //no disj f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | l in Trash implies f in Trash\n}\n\nrun inv10", "permalink": "secret-copier-smile-snare", "time": "2023-12-07 23:40:44.398728", "cmd": 6} {"id": 8652, "parent": 8651, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n //or some f.link in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n //no disj f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n all f: File | lone f.link\n //no f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | l in Trash implies f in Trash\n}\n\nrun inv10", "permalink": "awning-chewer-coil-stony", "time": "2023-12-08 00:08:03.202524", "cmd": 9} {"id": 8542, "parent": 8536, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\n\nsig Director extends Person {\n hasDirected: some Movie,\n hasWorkedWith: some Actor\n}\n\nsig Actor extends Person {\n hasWorkedWith: some Person - this,\n moviesActed: some Movie\n}\n\nsig Movie {\n director: one Director,\n cast: one Cast\n}\n\nsig Cast {\n movie: one Movie,\n actors: some Actor\n}\n\n\nrun {}", "permalink": "upwind-diner-stride-unless", "time": "2023-12-07 22:33:56.759435", "cmd": 1} {"id": 8548, "parent": 8547, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: lone File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or (some f.link and f.link in Trash)\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no (p.link in Trash)\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash)\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no File.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv10\n\n/* No unprotected file should exist outside of Trash. */\npred inv11 {\n all f: File - Protected | f not in Trash\n}\n\nrun inv11\n\n/* If a link is deleted, the target should be deleted too. */\npred inv12 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv12\n\n/* A linked file should not be in trash. */\npred inv13 {\n no f: File | f.link in Trash and f in Trash\n}\n\nrun inv13", "permalink": "daisy-dining-large-excess", "time": "2023-12-07 22:37:47.374428", "cmd": 1} {"id": 8554, "parent": 8553, "code": "// University Model\n\n// Signatures\nabstract sig Person {\n name: String,\n age: Int\n}\n\nsig Student extends Person {\n studentID: Int,\n major: String\n}\n\nsig Professor extends Person {\n staffID: Int,\n department: String\n}\n\nsig Course {\n courseCode: String,\n credits: Int\n}\n\nsig Classroom {\n roomNumber: Int,\n capacity: Int\n}\n\n// Inheritance\nfact StudentsArePeople {\n all s: Student | s in Person\n}\n\n// Facts\nfact CoursesHaveUniqueCodes {\n all disj c1, c2: Course | c1.courseCode != c2.courseCode\n}\n\n// Predicates\npred TeachingCapacity {\n all p: Professor, c: Course | some room: Classroom | room.capacity > 30 and room.capacity > #(p teaches c)\n}\n\npred EnrolledStudents {\n all c: Course | some s: Student | s.major = \"Computer Science\" and c in s.enrolledCourses\n}\n\n// Run Commands\nrun {\n // This run command is unsatisfiable\n some p: Professor | no c: Course | p.teaches c\n} for 5 but exactly 3 Professor, 3 Course\n\nrun {\n // This run command is satisfiable\n some s: Student, c: Course, p: Professor, r: Classroom | s.major = \"Computer Science\" and s.enrolledCourses = c and p.teaches c and TeachingCapacity and EnrolledStudents\n} for 5 but exactly 2 Student, 2 Course, 2 Professor, 2 Classroom", "permalink": "pretty-old-blank-scuff", "time": "2023-12-07 22:40:09.520402", "cmd": 1} {"id": 8559, "parent": 8558, "code": "// University Model\n\n// Signatures\nabstract sig Person {\n name: String,\n age: Int\n}\n\nsig Student extends Person {\n studentID: Int,\n major: String\n}\n\nsig Professor extends Person {\n staffID: Int,\n department: String\n}\n\nsig Course {\n courseCode: String,\n credits: Int\n}\n\nsig Classroom {\n roomNumber: Int,\n capacity: Int\n}\n\n// Inheritance\nfact StudentsArePeople {\n all s: Student | s in Person\n}\n\n// Facts\nfact CoursesHaveUniqueCodes {\n all disj c1, c2: Course | c1.courseCode != c2.courseCode\n}\n\n// Predicates\npred TeachingCapacity {\n all p: Professor, c: Course | some room: Classroom | room.capacity > 30 and room.capacity > #(p teaches c)\n}\n\npred EnrolledStudents {\n all c: Course | some s: Student | s.major = \"Computer Science\" and c in s.enrolledCourses\n}\n\n// Run Commands\nrun {\n // This run command is unsatisfiable\n some p: Professor | not c: Course | c in p.teaches\n} for 5 but exactly 3 Professor, 3 Course\n\nrun {\n // This run command is satisfiable\n some s: Student, c: Course, p: Professor, r: Classroom | s.major = \"Computer Science\" and s.enrolledCourses = c and c in p.teaches and TeachingCapacity and EnrolledStudents\n} for 5 but exactly 2 Student, 2 Course, 2 Professor, 2 Classroom", "permalink": "niece-nephew-oblong-zone", "time": "2023-12-07 22:43:40.386942", "cmd": 2} {"id": 8563, "parent": 8556, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: lone File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or (some f.link and f.link in Trash)\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no (p.link & Trash)\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash)\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no File.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv10\n\n/* No unprotected file should exist outside of Trash. */\npred inv11 {\n all f: File - Protected | f not in Trash and no f.link in Trash\n}\nrun inv11\n\n/* If a link is deleted, the target should be deleted too. */\npred inv12 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv12\n\n/* A linked file should not be in trash. */\npred inv13 {\n all f: File | f.link in Trash implies not f in Trash\n}\nrun inv13", "permalink": "dingo-bath-varied-usage", "time": "2023-12-07 22:44:56.518971", "cmd": 1} {"id": 8564, "parent": 8538, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// Signatures\n// Define a simple model\nsig Person {\n name: String,\n age: Int\n}\nsig Adult, Kid extends Person {}\n\nsig House {\n withLic: some Adult,\n withoutLic: no Kid\n}\n\nsig numberOfPeopleWithLicense {\n number: Int\n}\n\nfact LegalDrivingAge {\n all p: Person | p.age >= 18\n}\nfact peopleWithLicense {\n some p: Person | \n}\n\n// Run command to check if all persons are under 16 years old\nrun underagePersonsExample {\n all p: Person | p.age < 16 \n}", "permalink": "had-runner-curdle-pastel", "time": "2023-12-07 22:45:07.960496", "cmd": 1} {"id": 8566, "parent": 8562, "code": "// University Model\n\n// Signatures\nabstract sig Person {\n name: String,\n age: Int\n}\n\nsig Student extends Person {\n studentID: Int,\n major: String,\n enrolledCourses: set Course\n}\n\nsig Professor extends Person {\n staffID: Int,\n department: String\n}\n\nsig Course {\n courseCode: String,\n credits: Int\n}\n\nsig Classroom {\n roomNumber: Int,\n capacity: Int\n}\n\n// Inheritance\nfact StudentsArePeople {\n all s: Student | s in Person\n}\n\n// Facts\nfact CoursesHaveUniqueCodes {\n all disj c1, c2: Course | c1.courseCode != c2.courseCode\n}\n\n// Predicates\npred TeachingCapacity {\n all p: Professor, c: Course, r: Classroom | some room: r | room.capacity > 30 and room.capacity > #(p teaches c)\n}\n\npred EnrolledStudents {\n all c: Course | some s: Student | s.major = \"Computer Science\" and c in s.enrolledCourses\n}\n\n// Run Commands\nrun {\n // This run command is unsatisfiable\n some p: Professor | no c: Course | p.teaches c\n} for 5 but exactly 3 Professor, 3 Course\n\nrun {\n // This run command is satisfiable\n some s: Student, c: Course, p: Professor, r: Classroom | s.major = \"Computer Science\" and c in s.enrolledCourses and TeachingCapacity[p, c, r] and EnrolledStudents\n} for 5 but exactly 2 Student, 2 Course, 2 Professor, 2 Classroom", "permalink": "glitch-dilute-evil-pebble", "time": "2023-12-07 22:45:14.335106", "cmd": 2} {"id": 8567, "parent": 8564, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// Signatures\n// Define a simple model\nsig Person {\n name: String,\n age: Int\n}\nsig Adult, Kid extends Person {}\n\nsig House {\n withLic: some Adult,\n withoutLic: no Kid\n}\n\n// sig numberOfPeopleWithLicense {\n// number: Int\n// }\n\n// fact LegalDrivingAge {\n// all p: Person | p.age >= 18\n// }\n// fact peopleWithLicense {\n// some p: Person | \n// }\n\n// Run command to check if all persons are under 16 years old\nrun underagePersonsExample {\n all p: Person | p.age < 16 \n}", "permalink": "front-eleven-lung-thud", "time": "2023-12-07 22:45:23.836343", "cmd": 1} {"id": 8582, "parent": 8581, "code": "// University Model\n\n// Signatures\nabstract sig Person {\n name: String,\n age: Int\n}\n\nsig Student extends Person {\n studentID: Int,\n major: String,\n enrolledCourses: set Course\n}\n\nsig Professor extends Person {\n staffID: Int,\n department: String,\n teaches: set Course\n}\n\nsig Course {\n courseCode: String,\n credits: Int\n}\n\nsig Classroom {\n roomNumber: Int,\n capacity: Int\n}\n\n// Inheritance\nfact StudentsArePeople {\n all s: Student | s in Person\n}\n\n// Facts\nfact CoursesHaveUniqueCodes {\n all disj c1, c2: Course | c1.courseCode != c2.courseCode\n}\n\n// Predicates\npred TeachingCapacity[p: Professor, c: Course, r: Classroom] {\n some room: r | room.capacity > 30 \n //and room.capacity > #(p.teaches & c)\n}\n\npred EnrolledStudents {\n all c: Course | some s: Student | s.major = \"Computer Science\" and c in s.enrolledCourses\n}\n\n// Run Commands\nrun {\n // This run command is unsatisfiable\n some p: Professor | no c: Course | c in p.teaches\n} for 5 \n//but exactly 3 Professor, 3 Course\n\nrun {\n // This run command is satisfiable\n some s: Student, c: Course, p: Professor, r: Classroom | s.major = \"Computer Science\" and c in s.enrolledCourses and TeachingCapacity[p, c, r] and EnrolledStudents\n} for 5 but exactly 2 Student, 2 Course, 2 Professor, 2 Classroom", "permalink": "enroll-baking-growl-plus", "time": "2023-12-07 22:49:51.901499", "cmd": 2} {"id": 8585, "parent": 8584, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: lone File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no (p.link & Trash)\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n all f: File | f.link in Trash implies not f in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no File.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash and no f.link in Trash\n}\nrun inv10\n\n/* No unprotected file should exist outside of Trash. */\npred inv11 {\n all f: File - Protected | f not in Trash and not f.link in Trash\n}\nrun inv11\n\n/* If a link is deleted, the target should be deleted too. */\npred inv12 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv12\n\n/* A linked file should not be in trash. */\npred inv13 {\n all f: File | f.link in Trash implies not f in Trash\n}\nrun inv13", "permalink": "humble-static-chaps-muppet", "time": "2023-12-07 22:57:36.751463", "cmd": 1} {"id": 8586, "parent": 8585, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: lone File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no (p.link & Trash)\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n all f: File | f.link in Trash implies not f in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no File.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash and not f.link in Trash\n}\nrun inv10\n\n/* No unprotected file should exist outside of Trash. */\npred inv11 {\n all f: File - Protected | f not in Trash and not f.link in Trash\n}\nrun inv11\n\n/* If a link is deleted, the target should be deleted too. */\npred inv12 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv12\n\n/* A linked file should not be in trash. */\npred inv13 {\n all f: File | f.link in Trash implies not f in Trash\n}\nrun inv13", "permalink": "petted-taking-chewer-pope", "time": "2023-12-07 22:57:44.841484", "cmd": 1} {"id": 8589, "parent": 8588, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: lone File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no (p.link & Trash)\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\n\npred inv7 {\n all f: File | f.link in Trash implies not f in Trash and not f.link in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no File.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash and not f.link in Trash\n}\nrun inv10\n\n/* No unprotected file should exist outside of Trash. */\npred inv11 {\n all f: File - Protected | f not in Trash and not f.link in Trash\n}\nrun inv11\n\n/* If a link is deleted, the target should be deleted too. */\npred inv12 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv12\n\n/* A linked file should not be in trash. */\npred inv13 {\n all f: File | f.link in Trash implies not f in Trash\n}\nrun inv13", "permalink": "margin-stank-sanded-carol", "time": "2023-12-07 22:59:14.385479", "cmd": 1} {"id": 8591, "parent": 8590, "code": "// University Model\n\n// Signatures\nabstract sig Person { name: String, age: Int }\n\nsig Student extends Person { studentID: Int, major: String, enrolledCourses: set Course }\n\nsig Professor extends Person { staffID: Int, department: String, teaches: set Course }\n\nsig Course { courseCode: String, credits: Int }\n\nsig Classroom { roomNumber: Int, capacity: Int }\n\n// Inheritance\nfact StudentsArePeople { all s: Student | s in Person }\n\n// Facts\nfact CoursesHaveUniqueCodes { all disj c1, c2: Course | c1.courseCode != c2.courseCode }\n\n// Predicates\npred TeachingCapacity[p: Professor, c: Course, r: Classroom] {\n some room: r | room.capacity > 30 \n}\n\npred EnrolledStudents {\n all c: Course | some s: Student | s.major = \"Computer Science\" and c in s.enrolledCourses\n}\n\n // This run command is unsatisfiable\nrun {\n\n some p: Professor | no c: Course | c in p.teaches\n} for 5 \n\n// This run command is satisfiable\nrun {\n some s: Student, c: Course, p: Professor, r: Classroom | s.major = \"Computer Science\" and c in s.enrolledCourses and TeachingCapacity[p, c, r] and EnrolledStudents\n} for 5 but exactly 2 Student, 2 Course, 2 Professor, 2 Classroom", "permalink": "entree-mangy-vixen-panda", "time": "2023-12-07 23:00:03.358952", "cmd": 2} {"id": 8595, "parent": 8594, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: lone File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n not Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | not (p.link & Trash)\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\n\npred inv7 {\n all f: File | f.link in Trash implies not f in Trash and not f.link in Trash\n}\n\nrun inv7 \n\n/* There are no links. */ \npred inv8 {\n not File.link \n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n not File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash and not f.link in Trash\n}\nrun inv10\n\n/* No unprotected file should exist outside of Trash. */\npred inv11 {\n all f: File - Protected | f not in Trash and not f.link in Trash\n}\nrun inv11\n\n/* If a link is deleted, the target should be deleted too. */\npred inv12 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv12\n\n/* A linked file should not be in trash. */\npred inv13 {\n all f: File | f.link in Trash implies not f in Trash\n}\nrun inv13", "permalink": "galley-unbent-dried-tissue", "time": "2023-12-07 23:09:58.944965", "cmd": 1} {"id": 8596, "parent": 8595, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: lone File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n not Trash \n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | not (p.link & Trash)\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\n\npred inv7 {\n all f: File | f.link in Trash implies not f in Trash and not f.link in Trash\n}\n\nrun inv7 \n\n/* There are no links. */ \npred inv8 {\n not File.link \n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n not File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash and not f.link in Trash\n}\nrun inv10\n\n/* No unprotected file should exist outside of Trash. */\npred inv11 {\n all f: File - Protected | f not in Trash and not f.link in Trash\n}\nrun inv11\n\n/* If a link is deleted, the target should be deleted too. */\npred inv12 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv12\n\n/* A linked file should not be in trash. */\npred inv13 {\n all f: File | f.link in Trash implies not f in Trash\n}\nrun inv13", "permalink": "gizmo-drudge-nappy-putt", "time": "2023-12-07 23:10:33.660244", "cmd": 1} {"id": 8598, "parent": 8597, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: lone File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | not (p.link & Trash)\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\n\npred inv7 {\n all f: File | f.link in Trash implies not f in Trash and not f.link in Trash\n}\n\nrun inv7\n\n/* There are no links. */ \npred inv8 {\n no File.link \n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash and not f.link in Trash\n}\nrun inv10\n\n/* No unprotected file should exist outside of Trash. */\npred inv11 {\n all f: File - Protected | f not in Trash and not f.link in Trash\n}\nrun inv11\n\n/* If a link is deleted, the target should be deleted too. */\npred inv12 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv12\n\n/* A linked file should not be in trash. */\npred inv13 {\n all f: File | f.link in Trash implies not f in Trash\n}\nrun inv13", "permalink": "rosy-racoon-slate-phrase", "time": "2023-12-07 23:11:58.881387", "cmd": 1} {"id": 8600, "parent": 8599, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: lone File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no (p.link & Trash)\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\n\npred inv7 {\n all f: File | f.link in Trash implies not f in Trash and not f.link in Trash\n}\n\nrun inv7\n\n/* There are no links. */ \npred inv8 {\n no File.link \n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash and not f.link in Trash\n}\nrun inv10\n\n/* No unprotected file should exist outside of Trash. */\npred inv11 {\n all f: File - Protected | f not in Trash and not f.link in Trash\n}\nrun inv11\n\n/* If a link is deleted, the target should be deleted too. */\npred inv12 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv12\n\n/* A linked file should not be in trash. */\npred inv13 {\n all f: File | f.link in Trash implies not f in Trash\n}\nrun inv13", "permalink": "sake-banish-royal-chess", "time": "2023-12-07 23:12:10.522577", "cmd": 1} {"id": 8601, "parent": 8600, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: lone File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\n \npred inv2 {\n all f: File | f in Trash or (some f.link and f.link in Trash) or no f.link and no f in File\n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no (p.link & Trash)\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\n\npred inv7 {\n all f: File | f.link in Trash implies not f in Trash and not f.link in Trash\n}\n\nrun inv7\n\n/* There are no links. */ \npred inv8 {\n no File.link \n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash and not f.link in Trash\n}\nrun inv10\n\n/* No unprotected file should exist outside of Trash. */\npred inv11 {\n all f: File - Protected | f not in Trash and not f.link in Trash\n}\nrun inv11\n\n/* If a link is deleted, the target should be deleted too. */\npred inv12 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv12\n\n/* A linked file should not be in trash. */\npred inv13 {\n all f: File | f.link in Trash implies not f in Trash\n}\nrun inv13", "permalink": "trough-agent-level-sage", "time": "2023-12-07 23:14:01.981084", "cmd": 1} {"id": 8603, "parent": 7069, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or some f.link in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no p in Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n no disj f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f1, f2: File | f1.link & f2 in File\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | l in Trash implies f in Trash\n}\n\nrun inv10", "permalink": "ducky-cola-mutual-askew", "time": "2023-12-07 23:18:17.728376", "cmd": 1} {"id": 8606, "parent": 8605, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n all f: Trash | no f.link\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n //or some f.link in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no p in Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n no disj f1, f2: File | f1.link & f2.link = none\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f1, f2: File | f1.link & f2.link = none\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | l in Trash implies f in Trash\n}\n\nrun inv10", "permalink": "wharf-legacy-nervy-aorta", "time": "2023-12-07 23:20:09.974430", "cmd": 1} {"id": 8608, "parent": 8607, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n all f: Trash | no f.link\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n //or some f.link in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | not p in Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n no disj f1, f2: File | f1.link & f2.link = none\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f1, f2: File | f1.link & f2.link = none\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | l in Trash implies f in Trash\n}\n\nrun inv10", "permalink": "hummus-junior-palace-ranch", "time": "2023-12-07 23:23:12.394320", "cmd": 1} {"id": 8609, "parent": 8608, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n all f: Trash | no f.link\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n //or some f.link in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | not p in Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n no disj f1, f2: File | f1.link & f2.link = none\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f1, f2: File | f1.link & f2.link = none\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | l in Trash implies f in Trash\n}\n\nrun inv10", "permalink": "hurray-refuse-mosaic-grudge", "time": "2023-12-07 23:24:51.135530", "cmd": 2} {"id": 8616, "parent": 8614, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n all f: Trash | no f.link\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n //or some f.link in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | not p in Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n no disj f1, f2: File | f1.link & f2.link = none\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f1, f2: File | f1.link & f2.link = none\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | l in Trash implies f in Trash\n}\n\nrun inv10", "permalink": "scam-geek-aloha-art", "time": "2023-12-07 23:25:08.201586", "cmd": 8} {"id": 8618, "parent": 8616, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n all f: Trash | no f.link\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n //or some f.link in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | not p in Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n no disj f1, f2: File | f1.link & f2.link = none\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f1, f2: File | f1.link & f2.link = none\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | l in Trash implies f in Trash\n}\n\nrun inv10", "permalink": "barber-clause-finale-smell", "time": "2023-12-07 23:25:11.051544", "cmd": 9} {"id": 8623, "parent": 8622, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: lone File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or (some f.link and f.link in Trash) or (no f.link and f not in File)\n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no (p.link & Trash)\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\n\npred inv7 {\n all f: File | f.link in Trash implies not f in Trash and not f.link in Trash\n}\n\nrun inv7\n\n/* There are no links. */ \npred inv8 {\n no File.link \n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash and not f.link in Trash\n}\nrun inv10\n\n/* No unprotected file should exist outside of Trash. */\npred inv11 {\n all f: File - Protected | f not in Trash and not f.link in Trash\n}\nrun inv11\n\n/* If a link is deleted, the target should be deleted too. */\npred inv12 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv12\n\n/* A linked file should not be in trash. */\npred inv13 {\n all f: File | f.link in Trash implies not f in Trash\n}\nrun inv13", "permalink": "award-cargo-royal-rascal", "time": "2023-12-07 23:25:22.673106", "cmd": 7} {"id": 8634, "parent": 7069, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or some f.link in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n no disj f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | l in Trash implies f in Trash\n}\n\nrun inv10", "permalink": "chug-yelp-buddy-tables", "time": "2023-12-07 23:32:41.249965", "cmd": 1} {"id": 8635, "parent": 8634, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n //or some f.link in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n no disj f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | l in Trash implies f in Trash\n}\n\nrun inv10", "permalink": "turf-comfy-maroon-expand", "time": "2023-12-07 23:32:48.982942", "cmd": 1} {"id": 8636, "parent": 8633, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: lone File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n //or (some f.link and f.link in Trash) or (no f.link and f not in File)\n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no (p.link & Trash)\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | no f.link.link\n\n}\n\nrun inv6\n\n/* No linked file is deleted. */\n\npred inv7 {\n all f: File | f.link in Trash implies not f in Trash and not f.link in Trash\n}\n\nrun inv7\n\n/* There are no links. */ \npred inv8 {\n no File.link \n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash and not f.link in Trash\n}\nrun inv10\n\n/* No unprotected file should exist outside of Trash. */\npred inv11 {\n all f: File - Protected | f not in Trash and not f.link in Trash\n}\nrun inv11\n\n/* If a link is deleted, the target should be deleted too. */\npred inv12 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv12\n\n/* A linked file should not be in trash. */\npred inv13 {\n all f: File | f.link in Trash implies not f in Trash\n}\nrun inv13", "permalink": "rubber-award-aspect-irk", "time": "2023-12-07 23:32:52.398575", "cmd": 6} {"id": 8637, "parent": 8635, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n //or some f.link in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n no disj f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | l in Trash implies f in Trash\n}\n\nrun inv10", "permalink": "french-crept-quill-sierra", "time": "2023-12-07 23:32:52.970093", "cmd": 10} {"id": 8638, "parent": 8637, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n //or some f.link in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n no disj f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | l in Trash implies f in Trash\n}\n\nrun inv10", "permalink": "ecard-sip-subpar-front", "time": "2023-12-07 23:32:55.748120", "cmd": 6} {"id": 8639, "parent": 8638, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n //or some f.link in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n no disj f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | l in Trash implies f in Trash\n}\n\nrun inv10", "permalink": "muck-elude-talcum-finch", "time": "2023-12-07 23:32:58.508754", "cmd": 2} {"id": 8644, "parent": 8643, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n //or some f.link in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n no disj f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | l in Trash implies f in Trash\n}\n\nrun inv10", "permalink": "renter-gigolo-update-banner", "time": "2023-12-07 23:33:11.614810", "cmd": 8} {"id": 8645, "parent": 8644, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n //or some f.link in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n no disj f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | l in Trash implies f in Trash\n}\n\nrun inv10", "permalink": "erased-humble-acting-iphone", "time": "2023-12-07 23:33:14.234477", "cmd": 7} {"id": 8653, "parent": 8652, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n //or some f.link in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n //no disj f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n all f: File | lone f.link.link\n //no f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | l in Trash implies f in Trash\n}\n\nrun inv10", "permalink": "carol-reseal-purge-dimple", "time": "2023-12-08 00:11:38.577540", "cmd": 9} {"id": 8661, "parent": 8659, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n //or some f.link in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n //no disj f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n //all f: File | f.link in File\n //no f1, f2: File | f1.link & f2.link != none\n all f: File | lone f.link or no f.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n //all f: File | f.link in Trash implies f in Trash\n all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\n}\n\nrun inv10", "permalink": "tacky-lagoon-buffer-strep", "time": "2023-12-08 00:30:01.227603", "cmd": 9} {"id": 8663, "parent": 8662, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\n\nsig Director extends Person {\n movies_directed: some Movie,\n worked_with: some Actor\n}\n\nsig Actor extends Person {\n movies_acted: some Movie,\n worked_with: (some Director) + (set Actor)\n}\n\nsig Movie {\n director: Director, \n actors: some Actor\n}\n\n\n\nrun {}", "permalink": "gravel-shrunk-decode-exodus", "time": "2023-12-08 00:30:28.892244", "cmd": 1} {"id": 8664, "parent": 8663, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\n\nsig Director extends Person {\n movies_directed: some Movie,\n worked_with: some Actor\n}\n\nsig Actor extends Person {\n movies_acted: some Movie,\n worked_with: {\n some Director + set Actor\n }\n}\n\nsig Movie {\n director: Director, \n actors: some Actor\n}\n\n\n\nrun {}", "permalink": "vegan-undead-ninth-remold", "time": "2023-12-08 00:31:22.882378", "cmd": 1} {"id": 8665, "parent": 8664, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\n\nsig Director extends Person {\n movies_directed: some Movie,\n worked_with: some Actor\n}\n\nsig Actor extends Person {\n movies_acted: some Movie,\n worked_with: {\n some Director && set Actor\n }\n}\n\nsig Movie {\n director: Director, \n actors: some Actor\n}\n\n\n\nrun {}", "permalink": "thirty-sulk-cactus-spoof", "time": "2023-12-08 00:31:37.202809", "cmd": 1} {"id": 8666, "parent": 8665, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\n\nsig Agent extends Person {\n clients: set (Director + Actor),\n \n}\n\nsig Director extends Person {\n movies_directed: some Movie,\n worked_with: some Actor\n}\n\nsig Actor extends Person {\n movies_acted: some Movie,\n worked_with: some Person\n}\n\nsig Movie {\n director: Director,\n actors: some Actor\n}\n\n\n\nrun {}", "permalink": "roster-suitor-sanded-quilt", "time": "2023-12-08 00:34:38.156291", "cmd": 1} {"id": 8667, "parent": 8661, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n //or some f.link in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n //no disj f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n //all f: File | f.link in File\n //no f1, f2: File | f1.link & f2.link != none\n all f: File | lone f.link and no f.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n //all f: File | f.link in Trash implies f in Trash\n all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\n}\n\nrun inv10", "permalink": "storm-cussed-boss-straw", "time": "2023-12-08 00:35:04.032067", "cmd": 9} {"id": 8669, "parent": 8668, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n //or some f.link in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n //no disj f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n //all f: File | f.link in File\n //no f1, f2: File | f1.link & f2.link != none\n //all f: File | lone f.link and no f.link\n all f: File | (no f.link) or (lone f.link and no f.link.link)\n\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n //all f: File | f.link in Trash implies f in Trash\n all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\n}\n\nrun inv10", "permalink": "front-wad-icky-smell", "time": "2023-12-08 00:44:55.582053", "cmd": 1} {"id": 8671, "parent": 8250, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// Signatures\nsig User {\n username: String,\n email: String\n}\n\nabstract sig Product {\n productId: Int,\n name: String,\n price: Int,\n seller: User\n}\n\nsig ElectronicProduct extends Product {\n brand: String,\n warrantyPeriod: Int\n}\n\nsig ClothingProduct extends Product {\n size: String,\n brand: String\n}\n\nsig Transaction {\n transactionId: Int,\n buyer: User,\n seller: User,\n product: Product\n}\n\nsig Feedback {\n feedbackId: Int,\n rating: Int,\n comment: String,\n user: User\n}\n\n// Fields\nfact uniqueUsernames {\n all u1, u2: User | u1 != u2 implies u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all t1, t2: Transaction | t1 != t2 implies t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all f1, f2: Feedback | f1 != f2 implies f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is intentionally unsatisfiable for demonstration purposes\n all p1, p2: Product | p1 = p2 implies p1.productId = p2.productId\n}\n\nrun satisfiableExample {\n // This command is designed to be satisfiable\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\n// run {} for 3", "permalink": "caviar-lard-dude-cause", "time": "2023-12-08 02:45:06.924009", "cmd": 2} {"id": 8675, "parent": 8674, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\nabstract sig Person {}\n\nsig Director extends Person {\n // has worked with at least one artist\n worked_with: some Artist,\n // has directed at least one movie\n has_directed: some Movie,\n}\n\nsig Artist extends Person {\n // has worked with any number of directors and artists\n worked_with: set Person,\n // has featured in any number of movies\n featured_in: set Movie,\n}\n\nsig Movie {\n // is directed by one director\n directed_by: one Director,\n // features at least one artists\n artists_featured: some Artist,\n}\n\n\n\nrun {}", "permalink": "wake-parade-clinic-filter", "time": "2023-12-08 09:50:51.399483", "cmd": 1} {"id": 8678, "parent": 8677, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3 but 0 List", "permalink": "brook-relax-vacate-latch", "time": "2023-12-08 10:31:25.634647", "cmd": 1} {"id": 8709, "parent": 8708, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Player, Coach extends Person {}\n\nsig Team {\n -- a team can have one or no coach\n -- and any number of players\n coach: lone Coach,\n players: set Player,\n}\n\nsig Fixture {\n -- fixture involves two teams\n home_team: one Team,\n away_team: one Team,\n}\n\nsig Result {\n -- each fixture has one winner or none (draw)\n fixture: one Fixture,\n winner: lone Team,\n}\n\nsig MOTM {\n -- each result provides a MOTM to at least one player\n result: one Result,\n player: some Player,\n}\n\n-- facts\n\n-- 1 : each coach should have one team\nfact {\n all a, b : Team | a != b => a.coach != b.coach \n}\n\nrun {}", "permalink": "dole-jet-jacket-mantis", "time": "2023-12-08 17:34:16.105744", "cmd": 1} {"id": 8712, "parent": 8711, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Player, Coach extends Person {}\n\nsig Team {\n -- a team can have one or no coach\n -- and any number of players\n coach: lone Coach,\n players: set Player,\n}\n\nsig Fixture {\n -- fixture involves two teams\n home_team: one Team,\n away_team: one Team,\n}\n\nsig Result {\n -- each fixture has one winner or none (draw)\n fixture: one Fixture,\n winner: lone Team,\n}\n\nsig MOTM {\n -- each result provides a MOTM to at least one player\n result: one Result,\n player: some Player,\n}\n\n-- facts\nfact {\n -- each team has a coach\n all a : Team | one a.coach\n -- two teams cannot have the same coach\n all a, b : Team | a != b => a.coach != b.coach\n -- \n}\n\nrun {}", "permalink": "common-jogger-modify-sled", "time": "2023-12-08 17:41:11.473466", "cmd": 1} {"id": 8713, "parent": 8712, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Player, Coach extends Person {}\n\nsig Team {\n -- a team can have one or no coach\n -- and any number of players\n coach: lone Coach,\n players: set Player,\n}\n\nsig Fixture {\n -- fixture involves two teams\n home_team: one Team,\n away_team: one Team,\n}\n\nsig Result {\n -- each fixture has one winner or none (draw)\n fixture: one Fixture,\n winner: lone Team,\n}\n\nsig MOTM {\n -- each result provides a MOTM to at least one player\n result: one Result,\n player: some Player,\n}\n\n-- facts\nfact {\n -- at least one coach exists\n some Coach, Player\n -- two teams cannot have the same coach\n all a, b : Team | a != b => a.coach != b.coach\n -- \n}\n\nrun {}", "permalink": "repave-those-yam-till", "time": "2023-12-08 17:43:17.584440", "cmd": 1} {"id": 8716, "parent": 8715, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Player, Coach extends Person {}\n\nsig Team {\n -- a team can have one or no coach\n -- and any number of players\n coach: lone Coach,\n players: set Player,\n}\n\nsig Fixture {\n -- fixture involves two teams\n home_team: one Team,\n away_team: one Team,\n}\n\nsig Result {\n -- each fixture can have less or eq to one winner\n fixture: one Fixture,\n winner: lone Team,\n}\n\nsig MOTM {\n -- each result provides a MOTM to at least one player\n result: one Result,\n player: some Player,\n}\n\n-- facts\nfact {\n -- at least one coach exists\n some Coach\n some Player\n -- \n}\n\nrun {}", "permalink": "cackle-tutor-speech-settle", "time": "2023-12-08 17:49:22.686018", "cmd": 1} {"id": 8720, "parent": 8719, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Player, Coach extends Person {}\n\nsig Team {\n -- a team can have one or no coach\n -- and any number of players\n coach: lone Coach,\n players: set Player,\n}\n\nsig Fixture {\n -- fixture involves two teams\n home_team: one Team,\n away_team: one Team,\n}\n\nsig Result {\n -- each fixture can have less or eq to one winner\n fixture: one Fixture,\n winner: lone Team,\n}\n\nsig MOTM {\n -- each result provides a MOTM to at least one player\n result: one Result,\n player: some Player,\n}\n\n-- facts\nfact {\n -- at least one coach and player exist\n some Coach\n some Player\n -- teams should have different coaches\n all a, b : Team | a != b => a.coach != b.coach\n -- fixture should have different team\n all a, b : Fixture | a.home_team != b.away_team\n -- results should have different fixtures\n all a, b : Result | a.fixture != b.fixture\n}\n\nrun {}", "permalink": "dreamy-hatred-lend-pectin", "time": "2023-12-08 17:58:09.915833", "cmd": 1} {"id": 8722, "parent": 8721, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Player, Coach extends Person {}\n\nsig Team {\n -- a team can have one or no coach\n -- and any number of players\n coach: lone Coach,\n players: set Player,\n}\n\nsig Fixture {\n -- fixture involves two teams\n home_team: one Team,\n away_team: one Team,\n}\n\nsig Result {\n -- each fixture can have less or eq to one winner\n fixture: one Fixture,\n winner: lone Team,\n}\n\nsig MOTM {\n -- each result provides a MOTM to at least one player\n result: one Result,\n player: some Player,\n}\n\n-- facts\nfact {\n -- at least one coach and player exist\n some Coach\n some Player\n -- teams should have different coaches\n all a, b : Team | a != b => a.coach != b.coach\n -- teams should have different players\n all a, b : Team | a.players && b.players = none\n -- fixture should have different team\n all a, b : Fixture | a.home_team != b.away_team\n -- results should have different fixtures\n all a, b : Result | a.fixture != b.fixture\n}\n\nrun {}", "permalink": "rust-turkey-wow-slinky", "time": "2023-12-08 18:08:59.587536", "cmd": 1} {"id": 8724, "parent": 8723, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Player, Coach extends Person {}\n\nsig Team {\n -- a team can have one or no coach\n -- and any number of players\n coach: lone Coach,\n players: set Player,\n}\n\nsig Fixture {\n -- fixture involves two teams and has a winner\n home_team: one Team,\n away_team: one Team,\n}\n\nsig Result {\n -- each fixture can have less or eq to one winner\n fixture: one Fixture,\n winner: lone Team,\n}\n\nsig MOTM {\n -- each result provides a MOTM to at least one player\n result: one Result,\n player: some Player,\n}\n\n-- facts\nfact {\n -- at least one coach and player exist\n some Coach\n some Player\n -- teams should have different coaches\n all a, b : Team | a != b => a.coach != b.coach\n -- teams should have different players\n all a, b : Team, x : Player | a != b \n => \n !(and (x in a.players) (x in b.players))\n -- fixture should have different team\n all a, b : Fixture | a.home_team != b.away_team\n -- results should have different fixtures\n all a, b : Result | a.fixture != b.fixture\n}\n\nrun {}", "permalink": "elixir-pelt-life-math", "time": "2023-12-08 18:26:14.596160", "cmd": 1} {"id": 8729, "parent": 8728, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n team_coach: one Coach,\n team_squad: some Player\n}\n\nsig Fixture {\n home_team: one Team,\n away_team: one Team,\n}\n\nsig Result {\n fixture: one Fixture,\n winner: set Team,\n}\n\nsig MOTM {\n -- each result provides a MOTM to at least one player\n result: one Result,\n player: some Player,\n}\n\n-- facts\nfact {\n -- Team: squads cant share players\n all disj t1, t2: Team, p: Player | \n not (and (p in t1.players) (p in t2.players))\n}\n\nrun {}", "permalink": "author-throng-decent-saved", "time": "2023-12-08 19:31:32.497187", "cmd": 1} {"id": 8733, "parent": 8732, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n team_coach: one Coach,\n team_squad: some Player\n}\n\nsig Fixture {\n home_team: one Team,\n away_team: one Team,\n}\n\nsig Result {\n fixture: one Fixture,\n winner: set Team,\n}\n\nsig MOTM {\n -- each result provides a MOTM to at least one player\n result: one Result,\n player: some Player,\n}\n\n-- facts\nfact {\n -- Team: coaches cant be same\n all disj t1, t2: Team | t1.team_coach != t2.team_coach\n -- Team: squads cant share players\n all disj t1, t2: Team, p: Player | \n not ((p in t1.team_squad) && (p in t2.team_squad))\n\n -- Fixture: teams cant be same\n all disj f1, f2: Fixture | f1.home_team != f2.away_team\n}\n\nrun {}", "permalink": "catty-virus-boxing-snack", "time": "2023-12-08 19:39:37.212610", "cmd": 1} {"id": 8738, "parent": 8737, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n team_coach: one Coach,\n team_squad: some Player\n}\n\nsig Fixture {\n home_team: one Team,\n away_team: one Team,\n}\n\nsig Result {\n fixture: one Fixture,\n winner: set Team,\n}\n\nsig MOTM {\n -- each result provides a MOTM to at least one player\n result: one Result,\n player: some Player,\n}\n\n-- facts\nfact {\n -- Team: coaches cant be same\n all disj t1, t2: Team | t1.team_coach != t2.team_coach\n -- Team: squads cant share players\n all disj t1, t2: Team, p: Player | \n not ((p in t1.team_squad) && (p in t2.team_squad))\n\n -- Fixture: teams cant be same\n all disj f1: Fixture | f1.home_team != f1.away_team\n -- Fixture: fixture cant repeat\n all disj f1, f2: Fixture |\n not ((f1.home_team = f2.home_team) &&\n (f1.away_team = f2.away_team))\n\n -- Result: fixtures cant share result\n all disj r1, r2: Result | r1.fixture != r2.fixture\n}\n\nrun {}", "permalink": "paying-tamer-humble-ajar", "time": "2023-12-08 19:51:31.049723", "cmd": 1} {"id": 8739, "parent": 8738, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n team_coach: one Coach,\n team_squad: some Player\n}\n\nsig Fixture {\n home_team: one Team,\n away_team: one Team,\n}\n\nsig Result {\n fixture: one Fixture,\n winner: set Team,\n}\n\nsig MOTM {\n -- each result provides a MOTM to at least one player\n result: one Result,\n player: some Player,\n}\n\n-- facts\nfact {\n -- Team: coaches cant be same\n all disj t1, t2: Team | t1.team_coach != t2.team_coach\n -- Team: squads cant share players\n all disj t1, t2: Team, p: Player | \n not ((p in t1.team_squad) && (p in t2.team_squad))\n\n -- Fixture: teams cant be same\n all disj f1: Fixture | f1.home_team != f1.away_team\n -- Fixture: fixture cant repeat\n all disj f1, f2: Fixture |\n not ((f1.home_team = f2.home_team) &&\n (f1.away_team = f2.away_team))\n\n -- Result: fixtures cant share result\n all disj r1, r2: Result | r1.fixture != r2.fixture\n}\n\nrun {}", "permalink": "prayer-empty-upon-liable", "time": "2023-12-08 19:51:59.505906", "cmd": 1} {"id": 8746, "parent": 6744, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun not({no List}) for 3", "permalink": "quiet-flask-resume-race", "time": "2023-12-09 07:35:14.958523", "cmd": 1} {"id": 8749, "parent": 8748, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\ncheck {no List} for 3", "permalink": "bath-ovary-number-daisy", "time": "2023-12-09 07:40:35.361138", "cmd": 1} {"id": 8621, "parent": 8619, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: lone File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or (some f.link and f.link in Trash) or (no f.link and f not in File)\n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no (p.link & Trash)\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\n\npred inv7 {\n all f: File | f.link in Trash implies not f in Trash and not f.link in Trash\n}\n\nrun inv7\n\n/* There are no links. */ \npred inv8 {\n no File.link \n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash and not f.link in Trash\n}\nrun inv10\n\n/* No unprotected file should exist outside of Trash. */\npred inv11 {\n all f: File - Protected | f not in Trash and not f.link in Trash\n}\nrun inv11\n\n/* If a link is deleted, the target should be deleted too. */\npred inv12 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv12\n\n/* A linked file should not be in trash. */\npred inv13 {\n all f: File | f.link in Trash implies not f in Trash\n}\nrun inv13", "permalink": "floss-dingy-mouse-upload", "time": "2023-12-07 23:25:15.311995", "cmd": 5} {"id": 8622, "parent": 8621, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: lone File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or (some f.link and f.link in Trash) or (no f.link and f not in File)\n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no (p.link & Trash)\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\n\npred inv7 {\n all f: File | f.link in Trash implies not f in Trash and not f.link in Trash\n}\n\nrun inv7\n\n/* There are no links. */ \npred inv8 {\n no File.link \n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash and not f.link in Trash\n}\nrun inv10\n\n/* No unprotected file should exist outside of Trash. */\npred inv11 {\n all f: File - Protected | f not in Trash and not f.link in Trash\n}\nrun inv11\n\n/* If a link is deleted, the target should be deleted too. */\npred inv12 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv12\n\n/* A linked file should not be in trash. */\npred inv13 {\n all f: File | f.link in Trash implies not f in Trash\n}\nrun inv13", "permalink": "reflux-rug-colt-subway", "time": "2023-12-07 23:25:18.092390", "cmd": 6} {"id": 8624, "parent": 8623, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: lone File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or (some f.link and f.link in Trash) or (no f.link and f not in File)\n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no (p.link & Trash)\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\n\npred inv7 {\n all f: File | f.link in Trash implies not f in Trash and not f.link in Trash\n}\n\nrun inv7\n\n/* There are no links. */ \npred inv8 {\n no File.link \n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash and not f.link in Trash\n}\nrun inv10\n\n/* No unprotected file should exist outside of Trash. */\npred inv11 {\n all f: File - Protected | f not in Trash and not f.link in Trash\n}\nrun inv11\n\n/* If a link is deleted, the target should be deleted too. */\npred inv12 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv12\n\n/* A linked file should not be in trash. */\npred inv13 {\n all f: File | f.link in Trash implies not f in Trash\n}\nrun inv13", "permalink": "define-nimbly-septic-emboss", "time": "2023-12-07 23:25:25.380059", "cmd": 8} {"id": 8625, "parent": 8624, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: lone File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or (some f.link and f.link in Trash) or (no f.link and f not in File)\n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no (p.link & Trash)\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\n\npred inv7 {\n all f: File | f.link in Trash implies not f in Trash and not f.link in Trash\n}\n\nrun inv7\n\n/* There are no links. */ \npred inv8 {\n no File.link \n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash and not f.link in Trash\n}\nrun inv10\n\n/* No unprotected file should exist outside of Trash. */\npred inv11 {\n all f: File - Protected | f not in Trash and not f.link in Trash\n}\nrun inv11\n\n/* If a link is deleted, the target should be deleted too. */\npred inv12 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv12\n\n/* A linked file should not be in trash. */\npred inv13 {\n all f: File | f.link in Trash implies not f in Trash\n}\nrun inv13", "permalink": "vacant-aflame-tidbit-unbend", "time": "2023-12-07 23:25:32.128859", "cmd": 9} {"id": 8626, "parent": 8625, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n /* A file is potentially a link to other files. */\n link: lone File\n}\n\n/* The set of files in the trash. */\nsig Trash in File {}\n\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash or (some f.link and f.link in Trash) or (no f.link and f not in File)\n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | no (p.link & Trash)\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File - Protected | f in Trash or (some f.link and f.link in Trash) or f not in File\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\n\npred inv7 {\n all f: File | f.link in Trash implies not f in Trash and not f.link in Trash\n}\n\nrun inv7\n\n/* There are no links. */ \npred inv8 {\n no File.link \n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no File.link.link\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash and not f.link in Trash\n}\nrun inv10\n\n/* No unprotected file should exist outside of Trash. */\npred inv11 {\n all f: File - Protected | f not in Trash and not f.link in Trash\n}\nrun inv11\n\n/* If a link is deleted, the target should be deleted too. */\npred inv12 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv12\n\n/* A linked file should not be in trash. */\npred inv13 {\n all f: File | f.link in Trash implies not f in Trash\n}\nrun inv13", "permalink": "vowel-derby-till-avert", "time": "2023-12-07 23:25:34.555708", "cmd": 10} {"id": 8629, "parent": 8628, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n all f: Trash | no f.link\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n //or some f.link in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | not p in Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n no disj f1, f2: File \n //| f1.link & f2.link = none\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f1, f2: File | f1.link & f2.link = none\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | l in Trash implies f in Trash\n}\n\nrun inv10", "permalink": "portly-said-donor-lumber", "time": "2023-12-07 23:28:55.266689", "cmd": 6} {"id": 8630, "parent": 8629, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n all f: Trash | no f.link\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n //or some f.link in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all p: Protected | not p in Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n no disj f1, f2: File | f1.link & f2.link = none\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f1, f2: File | f1.link & f2.link = none\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | l in Trash implies f in Trash\n}\n\nrun inv10", "permalink": "motive-garnet-length-tiny", "time": "2023-12-07 23:29:12.423945", "cmd": 6} {"id": 8640, "parent": 8639, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n //or some f.link in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n no disj f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | l in Trash implies f in Trash\n}\n\nrun inv10", "permalink": "visor-cymbal-civil-polio", "time": "2023-12-07 23:33:00.801406", "cmd": 3} {"id": 8642, "parent": 8641, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n //or some f.link in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n no disj f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | l in Trash implies f in Trash\n}\n\nrun inv10", "permalink": "frays-recess-thee-sanded", "time": "2023-12-07 23:33:06.452403", "cmd": 5} {"id": 8643, "parent": 8642, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n //or some f.link in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n no disj f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | l in Trash implies f in Trash\n}\n\nrun inv10", "permalink": "waving-yen-late-fever", "time": "2023-12-07 23:33:09.164043", "cmd": 6} {"id": 8646, "parent": 8645, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n //or some f.link in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n no disj f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | l in Trash implies f in Trash\n}\n\nrun inv10", "permalink": "kung-perish-ocelot-nappy", "time": "2023-12-07 23:33:19.047937", "cmd": 9} {"id": 8647, "parent": 8646, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n //or some f.link in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n no disj f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | l in Trash implies f in Trash\n}\n\nrun inv10", "permalink": "marshy-quilt-motion-pester", "time": "2023-12-07 23:38:14.300765", "cmd": 1} {"id": 8650, "parent": 8648, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n //or some f.link in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n //no disj f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n no f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | l in Trash implies f in Trash\n}\n\nrun inv10", "permalink": "robin-fossil-lion-false", "time": "2023-12-07 23:59:46.110657", "cmd": 6} {"id": 8651, "parent": 8650, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n //or some f.link in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n //no disj f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n all f: File | lone f.link\n //no f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | l in Trash implies f in Trash\n}\n\nrun inv10", "permalink": "sliver-anime-study-domain", "time": "2023-12-08 00:08:00.878058", "cmd": 6} {"id": 8654, "parent": 8653, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n //or some f.link in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n //no disj f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n all f: File | lone f.link in File\n //no f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | l in Trash implies f in Trash\n}\n\nrun inv10", "permalink": "abacus-phobia-boxy-frying", "time": "2023-12-08 00:14:14.452038", "cmd": 9} {"id": 8655, "parent": 8654, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n //or some f.link in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n //no disj f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n all f: File | f.link in File\n //no f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File, l: f.link | l in Trash implies f in Trash\n}\n\nrun inv10", "permalink": "helper-hardy-helmet-wobble", "time": "2023-12-08 00:14:28.145531", "cmd": 9} {"id": 8656, "parent": 8655, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n //or some f.link in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n //no disj f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n all f: File | f.link in File\n //no f1, f2: File | f1.link & f2.link != none\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | f.link in Trash implies f in Trash\n}\n\nrun inv10", "permalink": "clunky-clip-wanted-unease", "time": "2023-12-08 00:20:30.499183", "cmd": 10} {"id": 8670, "parent": 8669, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n all f: File | (no f.link) or (lone f.link and no f.link.link)\n\n}\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\n}\nrun inv10", "permalink": "battle-cabbie-crook-spongy", "time": "2023-12-08 00:49:02.741108", "cmd": 1} {"id": 8673, "parent": 8250, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// Signatures\nsig User {\n username: String,\n email: String\n}\n\nabstract sig Product {\n productId: Int,\n name: String,\n price: Int,\n seller: User\n}\n\nsig ElectronicProduct extends Product {\n brand: String,\n warrantyPeriod: Int\n}\n\nsig ClothingProduct extends Product {\n size: String,\n brand: String\n}\n\nsig Transaction {\n transactionId: Int,\n buyer: User,\n seller: User,\n product: Product\n}\n\nsig Feedback {\n feedbackId: Int,\n rating: Int,\n comment: String,\n user: User\n}\n\n// Fields\nfact uniqueUsernames {\n all u1, u2: User | u1 != u2 implies u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all t1, t2: Transaction | t1 != t2 implies t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all f1, f2: Feedback | f1 != f2 implies f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is intentionally unsatisfiable for demonstration purposes\n all p1, p2: Product | p1 = p2 implies p1.productId = p2.productId\n}\n\nrun satisfiableExample {\n // This command is designed to be satisfiable\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\n// run {} for 3", "permalink": "ahoy-afloat-jimmy-badge", "time": "2023-12-08 07:43:02.657940", "cmd": 1} {"id": 8674, "parent": 8666, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig ClearanceLevel, Person {}\n\n\n\nrun {}", "permalink": "cloak-afloat-jimmy-remix", "time": "2023-12-08 09:38:26.883048", "cmd": 1} {"id": 8681, "parent": 8680, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {} for 3 but 10 List", "permalink": "trench-skinny-luxury-proton", "time": "2023-12-08 10:32:01.034999", "cmd": 1} {"id": 8684, "parent": 8683, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {} for 3 but 1 Node", "permalink": "sleek-timing-supper-stem", "time": "2023-12-08 10:33:57.113799", "cmd": 1} {"id": 8685, "parent": 8684, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {} for 3 but 0 Node", "permalink": "dipped-dove-frill-kudos", "time": "2023-12-08 10:34:05.991876", "cmd": 1} {"id": 8705, "parent": 8690, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Player, Coach extends Person {}\n\nsig Team {\n -- a team can have one or no coach\n -- and any number of players\n coach: lone Coach,\n players: set Player,\n}\n\nsig Fixture {\n -- fixture involves two teams\n home_team: one Team,\n away_team: one Team,\n}\n\nsig Result {\n -- each fixture has one winner or none (draw)\n fixture: one Fixture,\n winner: lone Team,\n}\n\nsig MOTM {\n -- each result provides a MOTM to at least one player\n result: one Result,\n player: some Player,\n}\n\nrun {}", "permalink": "eject-refold-poise-image", "time": "2023-12-08 17:00:32.443401", "cmd": 1} {"id": 8715, "parent": 8714, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Player, Coach extends Person {}\n\nsig Team {\n -- a team can have one or no coach\n -- and any number of players\n coach: lone Coach,\n players: set Player,\n}\n\nsig Fixture {\n -- fixture involves two teams\n home_team: one Team,\n away_team: one Team,\n}\n\nsig Result {\n -- each fixture has one winner or none (draw)\n fixture: one Fixture,\n winner: lone Team,\n}\n\nsig MOTM {\n -- each result provides a MOTM to at least one player\n result: one Result,\n player: some Player,\n}\n\n-- facts\nfact {\n -- at least one coach exists\n some Coach\n some Player\n -- two teams cannot have the same coach\n all a, b : Team | a != b => a.coach != b.coach\n -- \n}\n\nrun {}", "permalink": "dingy-random-slicer-curled", "time": "2023-12-08 17:43:35.945617", "cmd": 1} {"id": 8719, "parent": 8718, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Player, Coach extends Person {}\n\nsig Team {\n -- a team can have one or no coach\n -- and any number of players\n coach: lone Coach,\n players: set Player,\n}\n\nsig Fixture {\n -- fixture involves two teams\n home_team: one Team,\n away_team: one Team,\n}\n\nsig Result {\n -- each fixture can have less or eq to one winner\n fixture: one Fixture,\n winner: lone Team,\n}\n\nsig MOTM {\n -- each result provides a MOTM to at least one player\n result: one Result,\n player: some Player,\n}\n\n-- facts\nfact {\n -- at least one coach and player exist\n some Coach\n some Player\n -- teams should have different coaches\n all a, b : Team | a != b => a.coach != b.coach\n -- fixture should have different team\n all a, b : Fixture | a.home_team != b.away_team\n}\n\nrun {}", "permalink": "famine-music-voyage-unwary", "time": "2023-12-08 17:56:39.207846", "cmd": 1} {"id": 8725, "parent": 8724, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Player, Coach extends Person {}\n\nsig Team {\n -- a team can have one or no coach\n -- and any number of players\n coach: lone Coach,\n players: set Player,\n}\n\nsig Fixture {\n -- fixture involves two teams and has a winner\n home_team: one Team,\n away_team: one Team,\n}\n\nsig Result {\n -- each fixture can have less or eq to one winner\n fixture: one Fixture,\n winner: lone Team,\n}\n\nsig MOTM {\n -- each result provides a MOTM to at least one player\n result: one Result,\n player: some Player,\n}\n\n-- facts\nfact {\n -- at least one coach and player exist\n some Coach\n some Player\n -- teams should have different coaches\n all a, b : Team | a != b => a.coach != b.coach\n -- teams should have different players\n all a, b : Team, x : Player | a != b \n => \n not (x in a.players && x in b.players)\n -- fixture should have different team\n all a, b : Fixture | a.home_team != b.away_team\n -- results should have different fixtures\n all a, b : Result | a.fixture != b.fixture\n}\n\nrun {}", "permalink": "ivy-google-hush-viper", "time": "2023-12-08 18:26:48.181448", "cmd": 1} {"id": 8728, "parent": 8727, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n team_coach: one Coach,\n team_squad: some Player\n}\n\nsig Fixture {\n home_team: one Team,\n away_team: one Team,\n}\n\nsig Result {\n fixture: one Fixture,\n winner: set Team,\n}\n\nsig MOTM {\n -- each result provides a MOTM to at least one player\n result: one Result,\n player: some Player,\n}\n\n-- facts\nfact {\n -- Team: squads cant share players\n all disj t1, t2: Team, p: Player\n | not (and (p in t1) (p in t2))\n}\n\nrun {}", "permalink": "amends-able-create-senior", "time": "2023-12-08 19:30:33.454940", "cmd": 1} {"id": 8734, "parent": 8733, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n team_coach: one Coach,\n team_squad: some Player\n}\n\nsig Fixture {\n home_team: one Team,\n away_team: one Team,\n}\n\nsig Result {\n fixture: one Fixture,\n winner: set Team,\n}\n\nsig MOTM {\n -- each result provides a MOTM to at least one player\n result: one Result,\n player: some Player,\n}\n\n-- facts\nfact {\n -- Team: coaches cant be same\n all disj t1, t2: Team | t1.team_coach != t2.team_coach\n -- Team: squads cant share players\n all disj t1, t2: Team, p: Player | \n not ((p in t1.team_squad) && (p in t2.team_squad))\n\n -- Fixture: teams cant be same\n all disj f1: Fixture | f1.home_team != f1.away_team\n}\n\nrun {}", "permalink": "wise-sugar-canyon-grape", "time": "2023-12-08 19:39:49.814056", "cmd": 1} {"id": 8740, "parent": 8739, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n team_coach: one Coach,\n team_squad: some Player\n}\n\nsig Fixture {\n home_team: one Team,\n away_team: one Team,\n}\n\nsig Result {\n fixture: one Fixture,\n winner: set Team,\n}\n\nsig MOTM {\n -- each result provides a MOTM to at least one player\n result: one Result,\n player: some Player,\n}\n\n-- facts\nfact {\n -- Team: coaches cant be same\n all disj t1, t2: Team | t1.team_coach != t2.team_coach\n -- Team: squads cant share players\n all disj t1, t2: Team, p: Player | \n not ((p in t1.team_squad) && (p in t2.team_squad))\n\n -- Fixture: teams cant be same\n all disj f1: Fixture | f1.home_team != f1.away_team\n -- Fixture: fixture cant repeat\n all disj f1, f2: Fixture |\n not ((f1.home_team = f2.home_team) &&\n (f1.away_team = f2.away_team))\n\n -- Result: fixtures cant share result\n all disj r1, r2: Result | r1.fixture != r2.fixture\n -- Result: can have none or one winner\n all disj r: Result | (no r.winner) || (one r.winner)\n}\n\nrun {}", "permalink": "quail-basket-sandal-washer", "time": "2023-12-08 19:53:23.992665", "cmd": 1} {"id": 8741, "parent": 8740, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n team_coach: one Coach,\n team_squad: some Player\n}\n\nsig Fixture {\n home_team: one Team,\n away_team: one Team,\n}\n\nsig Result {\n fixture: one Fixture,\n winner: set Team,\n}\n\nsig MOTM {\n -- each result provides a MOTM to at least one player\n result: one Result,\n player: some Player,\n}\n\n-- facts\nfact {\n -- Team: coaches cant be same\n all disj t1, t2: Team | t1.team_coach != t2.team_coach\n -- Team: squads cant share players\n all disj t1, t2: Team, p: Player | \n not ((p in t1.team_squad) && (p in t2.team_squad))\n\n -- Fixture: teams cant be same\n all disj f1: Fixture | f1.home_team != f1.away_team\n -- Fixture: fixture cant repeat\n all disj f1, f2: Fixture |\n not ((f1.home_team = f2.home_team) &&\n (f1.away_team = f2.away_team))\n\n -- Result: fixtures cant share result\n all disj r1, r2: Result | r1.fixture != r2.fixture\n -- Result: can have none or one winner\n all disj r: Result | (no r.winner) || (one r.winner)\n\n -- MOTM: cant share result\n all disj m1, m2: MOTM | m1.result != m2.result\n}\n\nrun {}", "permalink": "dime-hazy-saved-street", "time": "2023-12-08 19:54:48.546680", "cmd": 1} {"id": 8748, "parent": 8747, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3", "permalink": "turtle-jot-gravel-pebbly", "time": "2023-12-09 07:35:32.018741", "cmd": 1} {"id": 8750, "parent": 8749, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\ncheck {no List and no Node} for 3", "permalink": "squad-wilt-deploy-elated", "time": "2023-12-09 07:42:17.551794", "cmd": 1} {"id": 8752, "parent": 8751, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\n\nassert sList{\n some List\n}\n\nassert sNode{\n some Node\n}\nrun {no List and no Node} for 3", "permalink": "rebuff-bunion-reword-uneasy", "time": "2023-12-09 07:47:58.341408", "cmd": 1} {"id": 8754, "parent": 8753, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n team_coach: one Coach,\n team_squad: some Player\n}\n\nsig Fixture {\n home_team: one Team,\n away_team: one Team,\n}\n\nsig Result {\n fixture: one Fixture,\n winner: set Team,\n}\n\nsig MOTM {\n -- each result provides a MOTM to at least one player\n result: one Result,\n player: some Player,\n}\n\n-- facts\nfact {\n -- Team: coaches cant be same\n all disj t1, t2: Team | t1.team_coach != t2.team_coach\n -- Team: squads cant share players\n all disj t1, t2: Team, p: Player | \n not ((p in t1.team_squad) && (p in t2.team_squad))\n\n -- Fixture: teams cant be same\n all disj f1: Fixture | f1.home_team != f1.away_team\n -- Fixture: fixture cant repeat\n all disj f1, f2: Fixture |\n not ((f1.home_team = f2.home_team) &&\n (f1.away_team = f2.away_team))\n\n -- Result: fixtures cant share result\n all disj r1, r2: Result | r1.fixture != r2.fixture\n -- Result: can have none or one winner\n all disj r: Result | (no r.winner) || (one r.winner)\n\n -- MOTM: cant share result\n all disj m1, m2: MOTM | m1.result != m2.result\n}\n\n-- predicates\n-- Result: winning team must be one of the two teams\n-- from the related Fixture\npred PolicyDecidingWinner(r: Result, t: Team) {\n t in r.fixture.home_team or\n t in r.fixture.away_team\n}\n\n-- MOTM: only goes to players of the winning team\n-- from the related result\n\n\n\nrun {}", "permalink": "crayon-chump-flap-siding", "time": "2023-12-09 10:27:12.815745", "cmd": 1} {"id": 8761, "parent": 8760, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n trainer: one Coach,\n squad: some Player\n}\n\nsig Fixture {\n home: one Team,\n away: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n -- one winner or a draw\n winner: lone Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n -- using lone in case of draw (no award given)\n related_result: one Result,\n player: lone Player,\n}\n\n-- facts\nfact {\n -- Team: two teams cannot have the same trainer\n all disj t1, t2: Team | \n \tt1.trainer != t2.trainer\n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player | \n not ((p in t1.squad) && (p in t2.squad))\n\n -- Fixture: different home and away team\n all disj f: Fixture | \n f.home != f.away\n -- Fixture: two fixtures cannot have \n -- same home and away teams\n all disj f1, f2: Fixture |\n not ((f1.home = f2.home) && (f1.away = f2.away))\n\n -- Result: two results cannot relate to same fixture\n all disj r1, r2: Result | \n r1.related_fixture != r2.related_fixture\n\n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award | \n a1.related_result != a2.related_result\n}\n\nrun {}", "permalink": "slick-tusk-perky-quake", "time": "2023-12-09 11:25:26.457354", "cmd": 1} {"id": 8768, "parent": 8767, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n trainer: one Coach,\n squad: some Player\n}\n\nsig Fixture {\n home: one Team,\n away: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n -- one winner or a draw\n winner: lone Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n -- using lone in case of draw (no award given)\n related_result: one Result,\n player_awarded: lone Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same trainer\n all disj t1, t2: Team | \n \tt1.trainer != t2.trainer\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.squad) && (p in t2.squad))\n\n -- Fixture: different home and away team\n all disj f: Fixture \n | f.home != f.away\n \n -- Fixture: two fixtures cannot have \n -- same home and away teams\n all disj f1, f2: Fixture \n | not ((f1.home = f2.home) and (f1.away = f2.away))\n\n -- Result: two results cannot relate to same fixture\n all disj r1, r2: Result \n | r1.related_fixture != r2.related_fixture\n\n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1: if a result has a winner, it should be from the \n-- home and away teams in its related fixture\npred PolicyDecidingResult(r: Result, t: Team) {\n r.winner = t implies\n t in r.related_fixture.home or\n t in r.related_fixture.away\n}\n\nassert onlyTeamInvolvedCanWin {\n all r: Result, t: Team \n | PolicyDecidingResult[r, t]\n}\n\ncheck onlyTeamInvolvedCanWin\n\n-- 2: Award is only given if the related result has a winner\n-- the player awarded must be from the winning side\n\npred PolicyDecidingAward(a: Award, p: Player) {\n a.player_awarded = p implies\n (a.related_result.winner != none and\n p in a.related_result.winner.squad)\n}\n\nassert onlyWinningPlayerGetsAward {\n all a: Award, p: Player |\n PolicyDecidingAward[a, p]\n}\n\ncheck onlyWinningPlayerGetsAward\n\nrun {}", "permalink": "acting-wanted-lend-cash", "time": "2023-12-09 13:00:09.691041", "cmd": 1} {"id": 8770, "parent": 8769, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n trainer: one Coach,\n squad: some Player\n}\n\nsig Fixture {\n home: one Team,\n away: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n -- one winner or a draw\n winner: lone Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n -- using lone in case of draw (no award given)\n related_result: one Result,\n player_awarded: lone Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same trainer\n all disj t1, t2: Team | \n \tt1.trainer != t2.trainer\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.squad) && (p in t2.squad))\n\n -- Fixture: different home and away team\n all disj f: Fixture \n | f.home != f.away\n \n -- Fixture: two fixtures cannot have \n -- same home and away teams\n all disj f1, f2: Fixture \n | not ((f1.home = f2.home) and (f1.away = f2.away))\n\n -- Result: two results cannot relate to same fixture\n all disj r1, r2: Result \n | r1.related_fixture != r2.related_fixture\n\n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1: if a result has a winner, it should be from the \n-- home and away teams in its related fixture\npred PolicyDecidingResult(r: Result, t: Team) {\n t = r.related_fixture.home or\n t = r.related_fixture.away\n}\n\nassert onlyTeamInvolvedCanWin {\n all r: Result, t: Team \n | r.winner != none implies \n PolicyDecidingResult[r, t]\n}\n\ncheck onlyTeamInvolvedCanWin\n\n-- 2: Award is only given if the related result has a winner\n-- the player awarded must be from the winning side\n\npred PolicyDecidingAward(a: Award, p: Player) {\n a.player_awarded = p implies\n (a.related_result.winner != none and\n p in a.related_result.winner.squad)\n}\n\nassert onlyWinningPlayerGetsAward {\n all a: Award, p: Player |\n PolicyDecidingAward[a, p]\n}\n\ncheck onlyWinningPlayerGetsAward\n\nrun {}", "permalink": "thrash-hence-decent-jaunt", "time": "2023-12-09 13:07:43.912172", "cmd": 1} {"id": 8772, "parent": 8771, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n trainer: one Coach,\n squad: some Player\n}\n\nsig Fixture {\n home: one Team,\n away: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n -- one winner or a draw\n winner: lone Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n -- using lone in case of draw (no award given)\n related_result: one Result,\n player_awarded: lone Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same trainer\n all disj t1, t2: Team | \n \tt1.trainer != t2.trainer\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.squad) && (p in t2.squad))\n\n -- Fixture: different home and away team\n all disj f: Fixture \n | f.home != f.away\n \n -- Fixture: two fixtures cannot have \n -- same home and away teams\n all disj f1, f2: Fixture \n | not ((f1.home = f2.home) and (f1.away = f2.away))\n\n -- Result: two results cannot relate to same fixture\n all disj r1, r2: Result \n | r1.related_fixture != r2.related_fixture\n\n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1: if a result has a winner, it should be from the \n-- home and away teams in its related fixture\npred PolicyDecidingResult(r: Result, t: Team) {\n (t = r.related_fixture.home) ||\n (t = r.related_fixture.away)\n}\n\nassert onlyTeamInvolvedCanWin {\n all r: Result, t: Team \n | r.winner != none implies \n PolicyDecidingResult[r, t]\n}\n\ncheck onlyTeamInvolvedCanWin\n\n-- 2: Award is only given if the related result has a winner\n-- the player awarded must be from the winning side\n\npred PolicyDecidingAward(a: Award, p: Player) {\n a.player_awarded = p implies\n (a.related_result.winner != none and\n p in a.related_result.winner.squad)\n}\n\nassert onlyWinningPlayerGetsAward {\n all a: Award, p: Player |\n PolicyDecidingAward[a, p]\n}\n\ncheck onlyWinningPlayerGetsAward\n\nrun {}", "permalink": "drudge-deploy-pushy-recoup", "time": "2023-12-09 13:09:11.218720", "cmd": 1} {"id": 8774, "parent": 8773, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\n\nassert sList{\n some List\n}\n\nassert sNode{\n some Node\n}\nrun {no List and no Node} for 3\nrun no List for 3", "permalink": "blouse-sprain-eel-snugly", "time": "2023-12-09 13:33:14.762944", "cmd": 2} {"id": 8777, "parent": 8776, "code": "module houses\n\nabstract sig House {\n major: one Major,\n color: one Color,\n}\n\none sig H1, H2, H3 extends House {}\n\nenum Major {\n Math, Phil, CS\n}\n\nenum Color {\n Blue, Red, White\n}\n\nfact {\n // all majors are in/linked by some house\n Major in House.major\n // all colors are on/used by some house\n Color in House.color\n \n // The philosophy major lives directly to the right of the red house.\n (H1.color = Red and H2.major = Phil) or ((H2.color = Red and H3.major = Phil))\n //The computer science major lives in the blue house.\n some h : House | h.color = Blue and h.major = CS\n //The math major lives in house 2.\n H2.major = Math \n}\n\nrun {} \n\ncheck ", "permalink": "statue-elude-citric-ride", "time": "2023-12-09 13:34:37.966660", "cmd": 2} {"id": 8779, "parent": 8778, "code": "module houses\n\nabstract sig House {\n major: one Major,\n color: one Color,\n}\n\none sig H1, H2, H3 extends House {}\n\nenum Major {\n Math, Phil, CS\n}\n\nenum Color {\n Blue, Red, White\n}\n\nfact {\n // all majors are in/linked by some house\n Major in House.major\n // all colors are on/used by some house\n Color in House.color\n \n // The philosophy major lives directly to the right of the red house.\n (H1.color = Red and H2.major = Phil) or ((H2.color = Red and H3.major = Phil))\n //The computer science major lives in the blue house.\n some h : House | h.color = Blue and h.major = CS\n //The math major lives in house 2.\n H2.major = Math \n}\n\nrun {} \n\ncheck fact", "permalink": "musket-jacket-jinx-front", "time": "2023-12-09 13:34:56.372800", "cmd": 1} {"id": 8796, "parent": 8772, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- There \n\nrun {}", "permalink": "lyrics-askew-petite-trash", "time": "2023-12-09 15:57:13.947672", "cmd": 1} {"id": 8803, "parent": 8802, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture | f.team1 != f.team2\n\n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- There \n\nrun {}", "permalink": "deeply-ruby-enable-repair", "time": "2023-12-09 16:44:52.750122", "cmd": 1} {"id": 8809, "parent": 8808, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\n\nassert chek{\n some List\n}\nrun acyclic for 3\ncheck chek", "permalink": "bath-acts-unroll-groom", "time": "2023-12-09 17:00:08.713602", "cmd": 2} {"id": 8814, "parent": 8813, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\n\nassert chek{\n some List\n}\n\nrun no chek", "permalink": "asleep-impose-idiom-shifty", "time": "2023-12-09 17:11:09.703383", "cmd": 1} {"id": 8818, "parent": 8804, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture |\n not ((f1.team1 = f2.team1 and f1.team2 = f2.team2)\n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- There \n\nrun {}", "permalink": "earwig-crave-deceit-gag", "time": "2023-12-09 17:25:41.824612", "cmd": 1} {"id": 8822, "parent": 8821, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- There \n\nrun {}", "permalink": "throat-game-blinks-steep", "time": "2023-12-09 17:37:02.927657", "cmd": 1} {"id": 8830, "parent": 8829, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\n\nassert chek{\n some Node\n}\n\nrun {not Node}", "permalink": "feeble-widget-scenic-barn", "time": "2023-12-09 17:42:33.775469", "cmd": 2} {"id": 8831, "parent": 8830, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\n\nassert chek{\n some Node\n}\n\nrun not { Node}", "permalink": "value-vegan-given-decent", "time": "2023-12-09 17:42:46.576851", "cmd": 1} {"id": 8836, "parent": 8835, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\n\n\n\npred chek(){\n some Node\n}\n\nrun {no List} for 3\n\nrun { no chek}", "permalink": "body-copy-derail-haven", "time": "2023-12-09 17:48:04.198091", "cmd": 2} {"id": 8657, "parent": 8542, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\n\nsig Director extends Person {\n movies_directed: set Movie,\n}\n\nsig Actor extends Person {\n movies_acted: set Movie\n}\n\nsig Movie {\n director: Director,\n actors: some Actor\n}\n\nrun {}", "permalink": "scam-stilt-gas-boss", "time": "2023-12-08 00:20:52.493369", "cmd": 1} {"id": 8677, "parent": null, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3", "permalink": "rogue-scary-tipped-sassy", "time": "2023-12-08 10:27:01.798924", "cmd": 1} {"id": 8679, "parent": 8678, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {} for 3 but 0 List", "permalink": "boggle-hurry-oink-hunk", "time": "2023-12-08 10:31:44.264688", "cmd": 1} {"id": 8683, "parent": 8682, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {} for 3 but exactly 10 Node", "permalink": "batch-each-ample-atom", "time": "2023-12-08 10:33:04.067967", "cmd": 1} {"id": 8686, "parent": 8685, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n some n : List.header.*link | no n.link\n}\nrun acyclic for 3 but 0 Node", "permalink": "ogle-giddy-lash-legume", "time": "2023-12-08 10:34:33.782167", "cmd": 1} {"id": 8688, "parent": 8676, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\nabstract sig Person {}\n\nsig Player, Agent extends Person\nsig Company \n\n\nsig Deal {\n\n}\n\nrun {}", "permalink": "length-july-petty-mule", "time": "2023-12-08 12:18:16.556828", "cmd": 1} {"id": 8689, "parent": 8688, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\nabstract sig Person {}\n\nsig Player, Agent extends Person {}\nsig Company {}\n\n\nsig Deal {\n\n}\n\nrun {}", "permalink": "keg-launch-glitch-tattoo", "time": "2023-12-08 12:18:27.892031", "cmd": 1} {"id": 8706, "parent": 8705, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Player, Coach extends Person {}\n\nsig Team {\n -- a team can have one or no coach\n -- and any number of players\n coach: lone Coach,\n players: set Player,\n}\n\nsig Fixture {\n -- fixture involves two teams\n home_team: one Team,\n away_team: one Team,\n}\n\nsig Result {\n -- each fixture has one winner or none (draw)\n fixture: one Fixture,\n winner: lone Team,\n}\n\nsig MOTM {\n -- each result provides a MOTM to at least one player\n result: one Result,\n player: some Player,\n}\n\n-- facts\n\n-- 1 : each coach should have one team\nfact {\n for all a, b : Coach | a.coach != b.coach \n}\n\nrun {}", "permalink": "grab-gag-deploy-turf", "time": "2023-12-08 17:08:47.463165", "cmd": 1} {"id": 8707, "parent": 8706, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Player, Coach extends Person {}\n\nsig Team {\n -- a team can have one or no coach\n -- and any number of players\n coach: lone Coach,\n players: set Player,\n}\n\nsig Fixture {\n -- fixture involves two teams\n home_team: one Team,\n away_team: one Team,\n}\n\nsig Result {\n -- each fixture has one winner or none (draw)\n fixture: one Fixture,\n winner: lone Team,\n}\n\nsig MOTM {\n -- each result provides a MOTM to at least one player\n result: one Result,\n player: some Player,\n}\n\n-- facts\n\n-- 1 : each coach should have one team\nfact {\n for all a, b : Coach | a != b => a.coach != b.coach \n}\n\nrun {}", "permalink": "erupt-unbend-amuck-celtic", "time": "2023-12-08 17:09:43.011149", "cmd": 1} {"id": 8711, "parent": 8710, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Player, Coach extends Person {}\n\nsig Team {\n -- a team can have one or no coach\n -- and any number of players\n coach: lone Coach,\n players: set Player,\n}\n\nsig Fixture {\n -- fixture involves two teams\n home_team: one Team,\n away_team: one Team,\n}\n\nsig Result {\n -- each fixture has one winner or none (draw)\n fixture: one Fixture,\n winner: lone Team,\n}\n\nsig MOTM {\n -- each result provides a MOTM to at least one player\n result: one Result,\n player: some Player,\n}\n\n-- facts\nfact {\n -- each team has a coach\n all a : Team | one a.coach\n -- two teams cannot have the same coach\n all a, b : Team | a != b => a.coach != b.coach\n -- \n -- two teams cannot have the same coach\n \n}\n\nrun {}", "permalink": "fresh-exodus-velvet-bottom", "time": "2023-12-08 17:40:01.139738", "cmd": 1} {"id": 8721, "parent": 8720, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Player, Coach extends Person {}\n\nsig Team {\n -- a team can have one or no coach\n -- and any number of players\n coach: lone Coach,\n players: set Player,\n}\n\nsig Fixture {\n -- fixture involves two teams\n home_team: one Team,\n away_team: one Team,\n}\n\nsig Result {\n -- each fixture can have less or eq to one winner\n fixture: one Fixture,\n winner: lone Team,\n}\n\nsig MOTM {\n -- each result provides a MOTM to at least one player\n result: one Result,\n player: some Player,\n}\n\n-- facts\nfact {\n -- at least one coach and player exist\n some Coach\n some Player\n -- teams should have different coaches\n all a, b : Team | a != b => a.coach != b.coach\n -- fixture should have different team\n all a, b : Fixture | a.home_team != b.away_team\n -- results should have different fixtures\n all a, b : Result | a.fixture != b.fixture\n}\n\nrun {}", "permalink": "silk-flail-grill-motto", "time": "2023-12-08 18:07:01.488718", "cmd": 1} {"id": 8723, "parent": 8722, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Player, Coach extends Person {}\n\nsig Team {\n -- a team can have one or no coach\n -- and any number of players\n coach: lone Coach,\n players: set Player,\n}\n\nsig Fixture {\n -- fixture involves two teams and has a winner\n home_team: one Team,\n away_team: one Team,\n}\n\nsig Result {\n -- each fixture can have less or eq to one winner\n fixture: one Fixture,\n winner: lone Team,\n}\n\nsig MOTM {\n -- each result provides a MOTM to at least one player\n result: one Result,\n player: some Player,\n}\n\n-- facts\nfact {\n -- at least one coach and player exist\n some Coach\n some Player\n -- teams should have different coaches\n all a, b : Team | a != b => a.coach != b.coach\n -- teams should have different players\n all a, b : Team, x : Player\n | x not in a.players && b.players\n -- fixture should have different team\n all a, b : Fixture | a.home_team != b.away_team\n -- results should have different fixtures\n all a, b : Result | a.fixture != b.fixture\n}\n\nrun {}", "permalink": "grove-spleen-area-lion", "time": "2023-12-08 18:20:29.865216", "cmd": 1} {"id": 8730, "parent": 8729, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n team_coach: one Coach,\n team_squad: some Player\n}\n\nsig Fixture {\n home_team: one Team,\n away_team: one Team,\n}\n\nsig Result {\n fixture: one Fixture,\n winner: set Team,\n}\n\nsig MOTM {\n -- each result provides a MOTM to at least one player\n result: one Result,\n player: some Player,\n}\n\n-- facts\nfact {\n -- Team: squads cant share players\n all disj t1, t2: Team, p: Player | \n not ((p in t1.players) && (p in t2.players))\n}\n\nrun {}", "permalink": "wolf-scorn-basil-oaf", "time": "2023-12-08 19:31:52.088444", "cmd": 1} {"id": 8735, "parent": 8734, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n team_coach: one Coach,\n team_squad: some Player\n}\n\nsig Fixture {\n home_team: one Team,\n away_team: one Team,\n}\n\nsig Result {\n fixture: one Fixture,\n winner: set Team,\n}\n\nsig MOTM {\n -- each result provides a MOTM to at least one player\n result: one Result,\n player: some Player,\n}\n\n-- facts\nfact {\n -- Team: coaches cant be same\n all disj t1, t2: Team | t1.team_coach != t2.team_coach\n -- Team: squads cant share players\n all disj t1, t2: Team, p: Player | \n not ((p in t1.team_squad) && (p in t2.team_squad))\n\n -- Fixture: teams cant be same\n all disj f1: Fixture | f1.home_team != f1.away_team\n -- Fixture: fixture cant repeat\n all disj f1, f2: Fixture |\n not (f1.home_team == f2.home_team &&\n f1.away_team == f2.away_team)\n}\n\nrun {}", "permalink": "creme-clip-alive-foam", "time": "2023-12-08 19:44:43.288389", "cmd": 1} {"id": 8757, "parent": 8756, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n home_team: one Team,\n away_team: one Team,\n}\n\nsig Result {\n fixture: one Fixture,\n winner: set Team,\n}\n\nsig MOTM {\n -- each result provides a MOTM to at least one player\n result: one Result,\n player: some Player,\n}\n\n-- facts\nfact {\n -- Team: coaches cant be same\n all disj t1, t2: Team | t1.coach != t2.coach\n -- Team: squads cant share players\n all disj t1, t2: Team, p: Player | \n not ((p in t1.players) && (p in t2.players))\n\n -- Fixture: teams cant be same\n all disj f1: Fixture | f1.home_team != f1.away_team\n -- Fixture: fixture cant repeat\n all disj f1, f2: Fixture |\n not ((f1.home_team = f2.home_team) &&\n (f1.away_team = f2.away_team))\n\n -- Result: fixtures cant share result\n all disj r1, r2: Result | r1.fixture != r2.fixture\n -- Result: can have none or one winner\n all disj r: Result | (no r.winner) || (one r.winner)\n\n -- MOTM: cant share result\n all disj m1, m2: MOTM | m1.result != m2.result\n}\n\n-- predicates\n-- Result: winning team must be one of the two teams\n-- from the related Fixture\npred PolicyDecidingWinner(r: Result, t: Team) {\n t in r.fixture.home_team or\n t in r.fixture.away_team\n}\n\nassert onlyTeamsInvolvedCanWin {\n all r: Result, t: Team |\n PolicyDecidingWinner[r, t]\n}\n\ncheck onlyTeamsInvolvedCanWin\n\n-- MOTM: only goes to players of the winning team\n-- from the related result\npred PolicyDecidingMOTM(m: MOTM, p: Player) {\n p in MOTM.result.winner.players\n}\n\nassert onlyWinningTeamHasMOTM {\n all m: MOTM, p: Player |\n PolicyDecidingMOTM[m, p]\n}\n\n\nrun {}", "permalink": "emu-corned-shifty-claw", "time": "2023-12-09 10:40:26.382429", "cmd": 2} {"id": 8758, "parent": 8757, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n home_team: one Team,\n away_team: one Team,\n}\n\nsig Result {\n fixture: one Fixture,\n winner: set Team,\n}\n\nsig MOTM {\n -- each result provides a MOTM to at least one player\n result: one Result,\n player: some Player,\n}\n\n-- facts\nfact {\n -- Team: coaches cant be same\n all disj t1, t2: Team | t1.coach != t2.coach\n -- Team: squads cant share players\n all disj t1, t2: Team, p: Player | \n not ((p in t1.players) && (p in t2.players))\n\n -- Fixture: teams cant be same\n all disj f1: Fixture | f1.home_team != f1.away_team\n -- Fixture: fixture cant repeat\n all disj f1, f2: Fixture |\n not ((f1.home_team = f2.home_team) &&\n (f1.away_team = f2.away_team))\n\n -- Result: fixtures cant share result\n all disj r1, r2: Result | r1.fixture != r2.fixture\n -- Result: can have none or one winner\n all disj r: Result | (no r.winner) || (one r.winner)\n\n -- MOTM: cant share result\n all disj m1, m2: MOTM | m1.result != m2.result\n}\n\n-- predicates\n-- Result: winning team must be one of the two teams\n-- from the related Fixture\npred PolicyDecidingWinner(r: Result, t: Team) {\n t in r.fixture.home_team or\n t in r.fixture.away_team\n}\n\nassert onlyTeamsInvolvedCanWin {\n all r: Result, t: Team |\n PolicyDecidingWinner[r, t]\n}\n\ncheck onlyTeamsInvolvedCanWin\n\n-- MOTM: only goes to players of the winning team\n-- from the related result\npred PolicyDecidingMOTM(m: MOTM, p: Player) {\n p in MOTM.result.winner.players\n}\n\nassert onlyWinningTeamHasMOTM {\n all m: MOTM, p: Player |\n PolicyDecidingMOTM[m, p]\n}\n\ncheck onlyWinningTeamHasMOTM\n\nrun {}", "permalink": "raven-chump-jogger-woof", "time": "2023-12-09 10:40:40.751088", "cmd": 1} {"id": 8759, "parent": 8758, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n home_team: one Team,\n away_team: one Team,\n}\n\nsig Result {\n fixture: one Fixture,\n winner: set Team,\n}\n\nsig MOTM {\n -- each result provides a MOTM to at least one player\n result: one Result,\n player: some Player,\n}\n\n-- facts\nfact {\n -- Team: coaches cant be same\n all disj t1, t2: Team | t1.coach != t2.coach\n -- Team: squads cant share players\n all disj t1, t2: Team, p: Player | \n not ((p in t1.players) && (p in t2.players))\n\n -- Fixture: teams cant be same\n all disj f1: Fixture | f1.home_team != f1.away_team\n -- Fixture: fixture cant repeat\n all disj f1, f2: Fixture |\n not ((f1.home_team = f2.home_team) &&\n (f1.away_team = f2.away_team))\n\n -- Result: fixtures cant share result\n all disj r1, r2: Result | r1.fixture != r2.fixture\n -- Result: can have none or one winner\n all disj r: Result | (no r.winner) || (one r.winner)\n\n -- MOTM: cant share result\n all disj m1, m2: MOTM | m1.result != m2.result\n}\n\n-- predicates\n-- Result: winning team must be one of the two teams\n-- from the related Fixture\npred PolicyDecidingWinner(r: Result, t: Team) {\n t = r.fixture.home_team or\n t = r.fixture.away_team\n}\n\nassert onlyTeamsInvolvedCanWin {\n all r: Result, t: Team |\n PolicyDecidingWinner[r, t]\n}\n\ncheck onlyTeamsInvolvedCanWin\n\n-- MOTM: only goes to players of the winning team\n-- from the related result\npred PolicyDecidingMOTM(m: MOTM, p: Player) {\n p in MOTM.result.winner.players\n}\n\nassert onlyWinningTeamHasMOTM {\n all m: MOTM, p: Player |\n PolicyDecidingMOTM[m, p]\n}\n\ncheck onlyWinningTeamHasMOTM\n\nrun {}", "permalink": "flaky-folic-marrow-lying", "time": "2023-12-09 10:41:30.369910", "cmd": 1} {"id": 8760, "parent": 8759, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n trainer: one Coach,\n squad: some Player\n}\n\nsig Fixture {\n home: one Team,\n away: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n -- one winner or a draw\n winner: lone Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n -- using lone in case of draw (no award given)\n related_result: one Result,\n player: lone Player,\n}\n\n-- facts\nfact {\n -- Team: two teams cannot have the same trainer\n all disj t1, t2: Team | \n \tt1.trainer != t2.trainer\n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player | \n not ((p in t1.squad) && (p in t2.squad))\n\n -- Fixture: different home and away team\n all disj f: Fixture | \n f.home != f.away\n -- Fixture: two fixtures cannot have \n -- same home and away teams\n all disj f1, f2: Fixture |\n not ((f1.home = f2.home) && (f1.away = f2.away))\n\n -- Result: two results cannot relate to same fixture\n all disj r1, r2: Result | \n r1.related_fixture != r2.related_fixture\n\n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award | \n m1.related_result != m2.related_result\n}\n\nrun {}", "permalink": "groovy-expel-hut-silo", "time": "2023-12-09 11:24:59.391926", "cmd": 1} {"id": 8763, "parent": 8762, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n trainer: one Coach,\n squad: some Player\n}\n\nsig Fixture {\n home: one Team,\n away: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n -- one winner or a draw\n winner: lone Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n -- using lone in case of draw (no award given)\n related_result: one Result,\n player_awarded: lone Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same trainer\n all disj t1, t2: Team | \n \tt1.trainer != t2.trainer\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.squad) && (p in t2.squad))\n\n -- Fixture: different home and away team\n all disj f: Fixture \n | f.home != f.away\n \n -- Fixture: two fixtures cannot have \n -- same home and away teams\n all disj f1, f2: Fixture \n | not ((f1.home = f2.home) and (f1.away = f2.away))\n\n -- Result: two results cannot relate to same fixture\n all disj r1, r2: Result \n | r1.related_fixture != r2.related_fixture\n\n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1: if a result has a winner, it should be from the \n-- home and away teams in its related fixture\npred PolicyDecidingResult(r: Result) {\n r.winner != none \n implies r.winner in r.related_fixture.home \n or r.winner in r.related_fixture.away\n}\n\nassert onlyTeamInvolvedCanWin {\n all r: Result, t: Team\n | PolicyDecidingResult(r, t) implies\n r.winner not in\n (all Team not in \n {r.related_fixture.home, r.related_fixture.away})\n}\n\ncheck onlyTeamInvolvedCanWin\n\n-- 2: Award is only given if the related result has a winner\n-- the player awarded must be from the winning side\n\n\nrun {}", "permalink": "relive-talon-appear-most", "time": "2023-12-09 12:22:56.962176", "cmd": 2} {"id": 8766, "parent": 8765, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n trainer: one Coach,\n squad: some Player\n}\n\nsig Fixture {\n home: one Team,\n away: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n -- one winner or a draw\n winner: lone Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n -- using lone in case of draw (no award given)\n related_result: one Result,\n player_awarded: lone Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same trainer\n all disj t1, t2: Team | \n \tt1.trainer != t2.trainer\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.squad) && (p in t2.squad))\n\n -- Fixture: different home and away team\n all disj f: Fixture \n | f.home != f.away\n \n -- Fixture: two fixtures cannot have \n -- same home and away teams\n all disj f1, f2: Fixture \n | not ((f1.home = f2.home) and (f1.away = f2.away))\n\n -- Result: two results cannot relate to same fixture\n all disj r1, r2: Result \n | r1.related_fixture != r2.related_fixture\n\n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1: if a result has a winner, it should be from the \n-- home and away teams in its related fixture\npred PolicyDecidingResult(r: Result, t: Team) {\n r.winner != none \n implies r.winner in r.related_fixture.home \n or r.winner in r.related_fixture.away\n}\n\nassert onlyTeamInvolvedCanWin {\n all r: Result, t: Team \n | PolicyDecidingResult[r, t]\n}\n\ncheck onlyTeamInvolvedCanWin\n\n-- 2: Award is only given if the related result has a winner\n-- the player awarded must be from the winning side\n\n\nrun {}", "permalink": "corral-jam-robin-croak", "time": "2023-12-09 12:46:28.439842", "cmd": 2} {"id": 8769, "parent": 8768, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n trainer: one Coach,\n squad: some Player\n}\n\nsig Fixture {\n home: one Team,\n away: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n -- one winner or a draw\n winner: lone Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n -- using lone in case of draw (no award given)\n related_result: one Result,\n player_awarded: lone Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same trainer\n all disj t1, t2: Team | \n \tt1.trainer != t2.trainer\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.squad) && (p in t2.squad))\n\n -- Fixture: different home and away team\n all disj f: Fixture \n | f.home != f.away\n \n -- Fixture: two fixtures cannot have \n -- same home and away teams\n all disj f1, f2: Fixture \n | not ((f1.home = f2.home) and (f1.away = f2.away))\n\n -- Result: two results cannot relate to same fixture\n all disj r1, r2: Result \n | r1.related_fixture != r2.related_fixture\n\n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1: if a result has a winner, it should be from the \n-- home and away teams in its related fixture\npred PolicyDecidingResult(r: Result, t: Team) {\n (r.winner != none and r.winner = t) implies\n (t = r.related_fixture.home or\n t = r.related_fixture.away)\n}\n\nassert onlyTeamInvolvedCanWin {\n all r: Result, t: Team \n | PolicyDecidingResult[r, t]\n}\n\ncheck onlyTeamInvolvedCanWin\n\n-- 2: Award is only given if the related result has a winner\n-- the player awarded must be from the winning side\n\npred PolicyDecidingAward(a: Award, p: Player) {\n a.player_awarded = p implies\n (a.related_result.winner != none and\n p in a.related_result.winner.squad)\n}\n\nassert onlyWinningPlayerGetsAward {\n all a: Award, p: Player |\n PolicyDecidingAward[a, p]\n}\n\ncheck onlyWinningPlayerGetsAward\n\nrun {}", "permalink": "briar-dinghy-shed-splice", "time": "2023-12-09 13:06:12.257183", "cmd": 1} {"id": 8775, "parent": 8774, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\n\nassert sList{\n some List\n}\n\nassert sNode{\n some Node\n}\nrun {no List and no Node} for 3\ncheck List", "permalink": "both-junkie-thee-deftly", "time": "2023-12-09 13:33:53.025254", "cmd": 2} {"id": 8776, "parent": 8775, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\n\nassert sList{\n some List\n}\n\nassert sNode{\n some Node\n}\nrun {no List and no Node} for 3\ncheck Node", "permalink": "nimbly-whiff-pacify-argue", "time": "2023-12-09 13:34:03.873445", "cmd": 2} {"id": 8780, "parent": 8779, "code": "module houses\n\nabstract sig House {\n major: one Major,\n color: one Color,\n}\n\none sig H1, H2, H3 extends House {}\n\nenum Major {\n Math, Phil, CS\n}\n\nenum Color {\n Blue, Red, White\n}\n\nfact {\n // all majors are in/linked by some house\n Major in House.major\n // all colors are on/used by some house\n Color in House.color\n \n // The philosophy major lives directly to the right of the red house.\n (H1.color = Red and H2.major = Phil) or ((H2.color = Red and H3.major = Phil))\n //The computer science major lives in the blue house.\n some h : House | h.color = Blue and h.major = CS\n //The math major lives in house 2.\n H2.major = Math \n}\npred cColor{\n some Color\n}\n\nrun {} \n\ncheck cColor\n", "permalink": "baton-prism-versus-shorty", "time": "2023-12-09 13:35:46.313383", "cmd": 2} {"id": 8781, "parent": 8780, "code": "module houses\n\nabstract sig House {\n major: one Major,\n color: one Color,\n}\n\none sig H1, H2, H3 extends House {}\n\nenum Major {\n Math, Phil, CS\n}\n\nenum Color {\n Blue, Red, White\n}\n\nfact {\n // all majors are in/linked by some house\n Major in House.major\n // all colors are on/used by some house\n Color in House.color\n \n // The philosophy major lives directly to the right of the red house.\n (H1.color = Red and H2.major = Phil) or ((H2.color = Red and H3.major = Phil))\n //The computer science major lives in the blue house.\n some h : House | h.color = Blue and h.major = CS\n //The math major lives in house 2.\n H2.major = Math \n}\nfact cColor{\n some Color\n}\n\nrun {} \n\ncheck cColor\n", "permalink": "wasabi-glider-blimp-groin", "time": "2023-12-09 13:35:53.140573", "cmd": 2} {"id": 8785, "parent": 8784, "code": "module houses\n\nabstract sig House {\n major: one Major,\n color: one Color,\n}\n\none sig H1, H2, H3 extends House {}\n\nenum Major {\n Math, Phil, CS\n}\n\nenum Color {\n Blue, Red, White\n}\n\nfact {\n // all majors are in/linked by some house\n Major in House.major\n // all colors are on/used by some house\n Color in House.color\n \n // The philosophy major lives directly to the right of the red house.\n (H1.color = Red and H2.major = Phil) or ((H2.color = Red and H3.major = Phil))\n //The computer science major lives in the blue house.\n some h : House | h.color = Blue and h.major = CS\n //The math major lives in house 2.\n H2.major = Math \n}\nassert cColor{\n some Major\n}\n\nrun {no cColor} \n\n\n", "permalink": "cobweb-zombie-giving-afar", "time": "2023-12-09 13:37:34.670205", "cmd": 1} {"id": 8786, "parent": 8785, "code": "module houses\n\nabstract sig House {\n major: one Major,\n color: one Color,\n}\n\none sig H1, H2, H3 extends House {}\n\nenum Major {\n Math, Phil, CS\n}\n\nenum Color {\n Blue, Red, White\n}\n\nfact {\n // all majors are in/linked by some house\n Major in House.major\n // all colors are on/used by some house\n Color in House.color\n \n // The philosophy major lives directly to the right of the red house.\n (H1.color = Red and H2.major = Phil) or ((H2.color = Red and H3.major = Phil))\n //The computer science major lives in the blue house.\n some h : House | h.color = Blue and h.major = CS\n //The math major lives in house 2.\n H2.major = Math \n}\nassert cColor{\n some Major\n}\n\nrun {not cColor} \n\n\n", "permalink": "down-duke-nugget-petted", "time": "2023-12-09 13:37:43.432843", "cmd": 1} {"id": 8789, "parent": 8788, "code": "module houses\n\nabstract sig House {\n major: one Major,\n color: one Color,\n}\n\none sig H1, H2, H3 extends House {}\n\nenum Major {\n Math, Phil, CS\n}\n\nenum Color {\n Blue, Red, White\n}\n\nfact {\n // all majors are in/linked by some house\n Major in House.major\n // all colors are on/used by some house\n Color in House.color\n \n // The philosophy major lives directly to the right of the red house.\n (H1.color = Red and H2.major = Phil) or ((H2.color = Red and H3.major = Phil))\n //The computer science major lives in the blue house.\n some h : House | h.color = Blue and h.major = CS\n //The math major lives in house 2.\n H2.major = Math \n}\nassert cColor{\n some Math\n}\n\nrun {} \ncheck cColor\n\n\n", "permalink": "kelp-valid-poster-amends", "time": "2023-12-09 13:38:22.025342", "cmd": 2} {"id": 8790, "parent": 8789, "code": "module houses\n\nabstract sig House {\n major: one Major,\n color: one Color,\n}\n\none sig H1, H2, H3 extends House {}\n\nenum Major {\n Math, Phil, CS\n}\n\nenum Color {\n Blue, Red, White\n}\n\nfact {\n // all majors are in/linked by some house\n Major in House.major\n // all colors are on/used by some house\n Color in House.color\n \n // The philosophy major lives directly to the right of the red house.\n (H1.color = Red and H2.major = Phil) or ((H2.color = Red and H3.major = Phil))\n //The computer science major lives in the blue house.\n some h : House | h.color = Blue and h.major = CS\n //The math major lives in house 2.\n H2.major = Math \n}\nassert cColor{\n some House\n}\n\nrun {} \ncheck cColor\n\n\n", "permalink": "cut-tulip-hedge-duly", "time": "2023-12-09 13:38:31.070194", "cmd": 2} {"id": 8802, "parent": 8796, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture | f.team1 != f.team2\n\n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- There \n\nrun {}", "permalink": "rally-poser-book-quill", "time": "2023-12-09 16:41:35.373207", "cmd": 1} {"id": 8808, "parent": 8807, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\n\npred chek{\n some List\n}\nrun acyclic for 3\ncheck chek", "permalink": "widen-kite-tripod-fog", "time": "2023-12-09 17:00:02.524348", "cmd": 2} {"id": 8810, "parent": 8809, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\n\nassert chek{\n some Node\n}\nrun acyclic for 3\ncheck chek", "permalink": "cocoa-mule-truce-omen", "time": "2023-12-09 17:00:17.581174", "cmd": 2} {"id": 8811, "parent": 8810, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\n\nassert chek{\n some Node\n}\n\ncheck chek", "permalink": "twenty-city-obtain-poking", "time": "2023-12-09 17:00:57.693661", "cmd": 2} {"id": 8812, "parent": 8811, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\n\nassert chek{\n some List\n}\n\ncheck chek", "permalink": "alias-hence-moving-brook", "time": "2023-12-09 17:01:03.684492", "cmd": 2} {"id": 8819, "parent": 8818, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = (r.related_fixture.team1 or r.related_fixture.team2) \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- There \n\nrun {}", "permalink": "usher-civic-shrine-chuck", "time": "2023-12-09 17:29:59.667950", "cmd": 1} {"id": 8823, "parent": 8817, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\n\nassert chek{\n some Node\n}\n\ncheck List", "permalink": "cradle-icky-latch-racing", "time": "2023-12-09 17:37:10.600875", "cmd": 1} {"id": 8825, "parent": 8822, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- There \n\nrun {}", "permalink": "clinic-follow-gnarly-much", "time": "2023-12-09 17:37:20.913139", "cmd": 1} {"id": 8828, "parent": 8827, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\n\nassert chek{\n some Node\n}\n\ncheck chek", "permalink": "rejoin-duress-yield-sponge", "time": "2023-12-09 17:37:32.458630", "cmd": 2} {"id": 8832, "parent": 8831, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\n\nassert chek{\n some Node\n}\n\nrun {no Node}", "permalink": "outer-slug-pardon-roamer", "time": "2023-12-09 17:43:02.110983", "cmd": 2} {"id": 8842, "parent": 8841, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\nassert chek(){\n no List\n}\n\ncheck {chek}", "permalink": "upper-tiger-buckle-chubby", "time": "2023-12-09 17:49:46.302396", "cmd": 2} {"id": 8843, "parent": 8842, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\nassert chek{\n no List\n}\n\ncheck {chek}", "permalink": "rotten-second-hurray-deed", "time": "2023-12-09 17:49:50.640018", "cmd": 2} {"id": 8844, "parent": 8843, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\nassert chek(){\n no List\n}\n\ncheck {chek}", "permalink": "dollar-equate-expend-crimp", "time": "2023-12-09 17:50:00.932298", "cmd": 2} {"id": 8848, "parent": 8847, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\nrun not acyclic", "permalink": "iodize-unsure-zips-tasty", "time": "2023-12-09 17:53:51.666352", "cmd": 2} {"id": 8855, "parent": 8854, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\npred checkSig {\n not (Node)\n}\n\nrun checkSig", "permalink": "factor-bluff-undead-sphere", "time": "2023-12-09 17:58:11.244847", "cmd": 2} {"id": 8862, "parent": 8861, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\npred checkSig {\n not (some Node)\n}\n\nrun checkSig for 3", "permalink": "coke-duo-jurist-trend", "time": "2023-12-09 18:03:36.837758", "cmd": 2} {"id": 8876, "parent": 8875, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1 - Player awarded must be from winning team\npred AwardPlayer(a: Award, p: Player) {\n p = a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all a: Award, p: Player\n | AwardPlayer[a, p] implies p in \n a.related_result.related_fixture.winner.players\n}\n\ncheck onlyAwardWinningPlayer\n\n\n-- There \n\nrun {}", "permalink": "jingle-myth-karma-dart", "time": "2023-12-09 18:41:24.996656", "cmd": 2} {"id": 8899, "parent": 8898, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 2 - \n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\ncheck onlyAwardWinningPlayer\n\nrun {}", "permalink": "raven-duct-crept-dodge", "time": "2023-12-09 19:05:26.302671", "cmd": 2} {"id": 8900, "parent": 8899, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 2 - \n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\ncheck onlyAwardWinningPlayer", "permalink": "spotty-thorn-flier-pastel", "time": "2023-12-09 19:06:00.230328", "cmd": 1} {"id": 8904, "parent": 8903, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 2 - \n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\nrun onlyAwardWinningPlayer\n\nrun{}", "permalink": "fifth-armory-subway-oyster", "time": "2023-12-09 20:46:18.570671", "cmd": 2} {"id": 8911, "parent": 8910, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 2 - \n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\ncheck onlyAwardWinningPlayer{}\n\nrun onlyAwardWinningPlayer{}\n\nrun{}", "permalink": "thank-jury-gazing-java", "time": "2023-12-09 20:49:27.082315", "cmd": 1} {"id": 8979, "parent": 8978, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\n-- predicates\n\n-- 1: all players get award\npred AllPlayersGetAward {\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\n-- 2: no team wins\npred NoTeamWins {\n all r: Result, t: Team |\n t not in r.winner\n}\n\nrun AllPlayersGetAward", "permalink": "cycle-rust-zoom-crux", "time": "2023-12-09 22:45:06.212910", "cmd": 1} {"id": 8672, "parent": 8671, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// Signatures\nsig User {\n username: String,\n email: String\n}\n\nabstract sig Product {\n productId: Int,\n name: String,\n price: Int,\n seller: User\n}\n\nsig ElectronicProduct extends Product {\n brand: String,\n warrantyPeriod: Int\n}\n\nsig ClothingProduct extends Product {\n size: String,\n brand: String\n}\n\nsig Transaction {\n transactionId: Int,\n buyer: User,\n seller: User,\n product: Product\n}\n\nsig Feedback {\n feedbackId: Int,\n rating: Int,\n comment: String,\n user: User\n}\n\n// Fields\nfact uniqueUsernames {\n all u1, u2: User | u1 != u2 implies u1.username != u2.username\n}\n\nfact uniqueProductIds {\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\nfact uniqueTransactionIds {\n all t1, t2: Transaction | t1 != t2 implies t1.transactionId != t2.transactionId\n}\n\nfact uniqueFeedbackIds {\n all f1, f2: Feedback | f1 != f2 implies f1.feedbackId != f2.feedbackId\n}\n\n// Predicates\npred validTransaction[t: Transaction] {\n t.product.seller != t.buyer\n}\n\npred positiveFeedback[f: Feedback] {\n f.rating > 3\n}\n\n// Run Commands\nrun unsatisfiableExample {\n // This command is intentionally unsatisfiable for demonstration purposes\n all p1, p2: Product | p1 = p2 implies p1.productId = p2.productId\n}\n\nrun satisfiableExample {\n // This command is designed to be satisfiable\n all p1, p2: Product | p1 != p2 implies p1.productId != p2.productId\n}\n\n// run {} for 3", "permalink": "sweat-engine-hatred-napkin", "time": "2023-12-08 02:45:13.157003", "cmd": 1} {"id": 8676, "parent": 8675, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\nabstract sig Person {}\n\nsig Director extends Person {\n // has directed at least one movie\n has_directed: some Movie,\n // has worked with at least one artist\n worked_with: some Artist,\n}\n\nsig Artist extends Person {\n // has worked with any number of directors and artists\n worked_with: set Person,\n // has featured in any number of movies\n featured_in: set Movie,\n}\n\nsig Movie {\n // is directed by one director\n directed_by: one Director,\n // features at least one artist\n artists_featured: some Artist,\n}\n\n// fact: Artist has not worked with themselves\nfact {\n all a : Artist | a not in a.worked_with \n}\n\nrun {}", "permalink": "raven-switch-fifty-mutual", "time": "2023-12-08 09:54:39.730658", "cmd": 1} {"id": 8680, "parent": 8679, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {} for 3 but 1 List", "permalink": "skater-keenly-crummy-unwell", "time": "2023-12-08 10:31:56.002706", "cmd": 1} {"id": 8682, "parent": 8681, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {} for 3 but 10 Node", "permalink": "impale-truce-quilt-spongy", "time": "2023-12-08 10:32:53.808939", "cmd": 1} {"id": 8687, "parent": 8686, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n some n : List.header.*link | no n.link\n}\nrun acyclic for 3 but 1 Node", "permalink": "gargle-throng-iodine-panda", "time": "2023-12-08 10:34:38.860656", "cmd": 1} {"id": 8690, "parent": 8689, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\nabstract sig Person {}\n\nsig Agent extends Person {}\n\nsig Player extends Person {\n player_agent: one Agent,\n}\n\nrun {}", "permalink": "woof-five-growl-wound", "time": "2023-12-08 12:37:10.989558", "cmd": 1} {"id": 8708, "parent": 8707, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Player, Coach extends Person {}\n\nsig Team {\n -- a team can have one or no coach\n -- and any number of players\n coach: lone Coach,\n players: set Player,\n}\n\nsig Fixture {\n -- fixture involves two teams\n home_team: one Team,\n away_team: one Team,\n}\n\nsig Result {\n -- each fixture has one winner or none (draw)\n fixture: one Fixture,\n winner: lone Team,\n}\n\nsig MOTM {\n -- each result provides a MOTM to at least one player\n result: one Result,\n player: some Player,\n}\n\n-- facts\n\n-- 1 : each coach should have one team\nfact {\n all a, b : Coach | a != b => a.coach != b.coach \n}\n\nrun {}", "permalink": "ravine-huddle-posh-attest", "time": "2023-12-08 17:33:55.008340", "cmd": 1} {"id": 8710, "parent": 8709, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Player, Coach extends Person {}\n\nsig Team {\n -- a team can have one or no coach\n -- and any number of players\n coach: lone Coach,\n players: set Player,\n}\n\nsig Fixture {\n -- fixture involves two teams\n home_team: one Team,\n away_team: one Team,\n}\n\nsig Result {\n -- each fixture has one winner or none (draw)\n fixture: one Fixture,\n winner: lone Team,\n}\n\nsig MOTM {\n -- each result provides a MOTM to at least one player\n result: one Result,\n player: some Player,\n}\n\n-- facts\nfact {\n -- two teams cannot have the same coach\n all a, b : Team | a != b => a.coach != b.coach\n -- \n}\n\nrun {}", "permalink": "badge-plural-shun-jigsaw", "time": "2023-12-08 17:36:07.852007", "cmd": 1} {"id": 8714, "parent": 8713, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Player, Coach extends Person {}\n\nsig Team {\n -- a team can have one or no coach\n -- and any number of players\n coach: lone Coach,\n players: set Player,\n}\n\nsig Fixture {\n -- fixture involves two teams\n home_team: one Team,\n away_team: one Team,\n}\n\nsig Result {\n -- each fixture has one winner or none (draw)\n fixture: one Fixture,\n winner: lone Team,\n}\n\nsig MOTM {\n -- each result provides a MOTM to at least one player\n result: one Result,\n player: some Player,\n}\n\n-- facts\nfact {\n -- at least one coach exists\n some Coach\n -- two teams cannot have the same coach\n all a, b : Team | a != b => a.coach != b.coach\n -- \n}\n\nrun {}", "permalink": "slush-mango-baggy-fame", "time": "2023-12-08 17:43:26.056038", "cmd": 1} {"id": 8717, "parent": 8716, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Player, Coach extends Person {}\n\nsig Team {\n -- a team can have one or no coach\n -- and any number of players\n coach: lone Coach,\n players: set Player,\n}\n\nsig Fixture {\n -- fixture involves two teams\n home_team: one Team,\n away_team: one Team,\n}\n\nsig Result {\n -- each fixture can have less or eq to one winner\n fixture: one Fixture,\n winner: lone Team,\n}\n\nsig MOTM {\n -- each result provides a MOTM to at least one player\n result: one Result,\n player: some Player,\n}\n\n-- facts\nfact {\n -- at least one coach and player exist\n some Coach\n some Player\n -- teams should have different coaches\n all a, b : Team | a != b => a.coach != b.coach \n}\n\nrun {}", "permalink": "track-earthy-bulk-tacky", "time": "2023-12-08 17:53:20.675038", "cmd": 1} {"id": 8718, "parent": 8717, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Player, Coach extends Person {}\n\nsig Team {\n -- a team can have one or no coach\n -- and any number of players\n coach: lone Coach,\n players: set Player,\n}\n\nsig Fixture {\n -- fixture involves two teams\n home_team: one Team,\n away_team: one Team,\n}\n\nsig Result {\n -- each fixture can have less or eq to one winner\n fixture: one Fixture,\n winner: lone Team,\n}\n\nsig MOTM {\n -- each result provides a MOTM to at least one player\n result: one Result,\n player: some Player,\n}\n\n-- facts\nfact {\n -- at least one coach and player exist\n some Coach\n some Player\n -- teams should have different coaches\n all a, b : Team | a != b => a.coach != b.coach\n}\n\nrun {}", "permalink": "cost-twisty-gigolo-geek", "time": "2023-12-08 17:54:45.165383", "cmd": 1} {"id": 8726, "parent": 8725, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n team_coach: one Coach,\n team_squad: some Player\n}\n\nsig Fixture {\n home_team: one Team,\n away_team: one Team,\n}\n\nsig Result {\n fixture: one Fixture,\n winner: set Winner,\n}\n\nsig MOTM {\n -- each result provides a MOTM to at least one player\n result: one Result,\n player: some Player,\n}\n\n-- facts\nfact {\n}\n\nrun {}", "permalink": "radish-punk-duller-editor", "time": "2023-12-08 19:00:56.458860", "cmd": 1} {"id": 8727, "parent": 8726, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n team_coach: one Coach,\n team_squad: some Player\n}\n\nsig Fixture {\n home_team: one Team,\n away_team: one Team,\n}\n\nsig Result {\n fixture: one Fixture,\n winner: set Team,\n}\n\nsig MOTM {\n -- each result provides a MOTM to at least one player\n result: one Result,\n player: some Player,\n}\n\n-- facts\nfact {\n}\n\nrun {}", "permalink": "santa-mama-swipe-flirt", "time": "2023-12-08 19:01:13.202508", "cmd": 1} {"id": 8731, "parent": 8730, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n team_coach: one Coach,\n team_squad: some Player\n}\n\nsig Fixture {\n home_team: one Team,\n away_team: one Team,\n}\n\nsig Result {\n fixture: one Fixture,\n winner: set Team,\n}\n\nsig MOTM {\n -- each result provides a MOTM to at least one player\n result: one Result,\n player: some Player,\n}\n\n-- facts\nfact {\n -- Team: squads cant share players\n all disj t1, t2: Team, p: Player | \n not ((p in t1.team_squad) && (p in t2.team_squad))\n}\n\nrun {}", "permalink": "uptown-bulge-upside-tinker", "time": "2023-12-08 19:32:12.160652", "cmd": 1} {"id": 8732, "parent": 8731, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n team_coach: one Coach,\n team_squad: some Player\n}\n\nsig Fixture {\n home_team: one Team,\n away_team: one Team,\n}\n\nsig Result {\n fixture: one Fixture,\n winner: set Team,\n}\n\nsig MOTM {\n -- each result provides a MOTM to at least one player\n result: one Result,\n player: some Player,\n}\n\n-- facts\nfact {\n -- Team: coaches cant be same\n all disj t1, t2: Team | t1.team_coach != t2.team_coach\n -- Team: squads cant share players\n all disj t1, t2: Team, p: Player | \n not ((p in t1.team_squad) && (p in t2.team_squad))\n}\n\nrun {}", "permalink": "exhale-relax-treat-poach", "time": "2023-12-08 19:34:13.171387", "cmd": 1} {"id": 8736, "parent": 8735, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n team_coach: one Coach,\n team_squad: some Player\n}\n\nsig Fixture {\n home_team: one Team,\n away_team: one Team,\n}\n\nsig Result {\n fixture: one Fixture,\n winner: set Team,\n}\n\nsig MOTM {\n -- each result provides a MOTM to at least one player\n result: one Result,\n player: some Player,\n}\n\n-- facts\nfact {\n -- Team: coaches cant be same\n all disj t1, t2: Team | t1.team_coach != t2.team_coach\n -- Team: squads cant share players\n all disj t1, t2: Team, p: Player | \n not ((p in t1.team_squad) && (p in t2.team_squad))\n\n -- Fixture: teams cant be same\n all disj f1: Fixture | f1.home_team != f1.away_team\n -- Fixture: fixture cant repeat\n all disj f1, f2: Fixture |\n not ((f1.home_team == f2.home_team) &&\n (f1.away_team == f2.away_team))\n}\n\nrun {}", "permalink": "dandy-bulk-city-defeat", "time": "2023-12-08 19:45:43.526866", "cmd": 1} {"id": 8737, "parent": 8736, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n team_coach: one Coach,\n team_squad: some Player\n}\n\nsig Fixture {\n home_team: one Team,\n away_team: one Team,\n}\n\nsig Result {\n fixture: one Fixture,\n winner: set Team,\n}\n\nsig MOTM {\n -- each result provides a MOTM to at least one player\n result: one Result,\n player: some Player,\n}\n\n-- facts\nfact {\n -- Team: coaches cant be same\n all disj t1, t2: Team | t1.team_coach != t2.team_coach\n -- Team: squads cant share players\n all disj t1, t2: Team, p: Player | \n not ((p in t1.team_squad) && (p in t2.team_squad))\n\n -- Fixture: teams cant be same\n all disj f1: Fixture | f1.home_team != f1.away_team\n -- Fixture: fixture cant repeat\n all disj f1, f2: Fixture |\n not ((f1.home_team = f2.home_team) &&\n (f1.away_team = f2.away_team))\n}\n\nrun {}", "permalink": "mulch-detail-rage-ozone", "time": "2023-12-08 19:46:24.667817", "cmd": 1} {"id": 8747, "parent": 8746, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun not {no List} for 3", "permalink": "photo-masses-moaner-rinse", "time": "2023-12-09 07:35:23.346334", "cmd": 1} {"id": 8753, "parent": 8741, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n team_coach: one Coach,\n team_squad: some Player\n}\n\nsig Fixture {\n home_team: one Team,\n away_team: one Team,\n}\n\nsig Result {\n fixture: one Fixture,\n winner: set Team,\n}\n\nsig MOTM {\n -- each result provides a MOTM to at least one player\n result: one Result,\n player: some Player,\n}\n\n-- facts\nfact {\n -- Team: coaches cant be same\n all disj t1, t2: Team | t1.team_coach != t2.team_coach\n -- Team: squads cant share players\n all disj t1, t2: Team, p: Player | \n not ((p in t1.team_squad) && (p in t2.team_squad))\n\n -- Fixture: teams cant be same\n all disj f1: Fixture | f1.home_team != f1.away_team\n -- Fixture: fixture cant repeat\n all disj f1, f2: Fixture |\n not ((f1.home_team = f2.home_team) &&\n (f1.away_team = f2.away_team))\n\n -- Result: fixtures cant share result\n all disj r1, r2: Result | r1.fixture != r2.fixture\n -- Result: can have none or one winner\n all disj r: Result | (no r.winner) || (one r.winner)\n\n -- MOTM: cant share result\n all disj m1, m2: MOTM | m1.result != m2.result\n}\n\n\n\nrun {}", "permalink": "sprawl-dares-lilly-doze", "time": "2023-12-09 10:04:08.418850", "cmd": 1} {"id": 8756, "parent": 8755, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n team_coach: one Coach,\n team_squad: some Player\n}\n\nsig Fixture {\n home_team: one Team,\n away_team: one Team,\n}\n\nsig Result {\n fixture: one Fixture,\n winner: set Team,\n}\n\nsig MOTM {\n -- each result provides a MOTM to at least one player\n result: one Result,\n player: some Player,\n}\n\n-- facts\nfact {\n -- Team: coaches cant be same\n all disj t1, t2: Team | t1.team_coach != t2.team_coach\n -- Team: squads cant share players\n all disj t1, t2: Team, p: Player | \n not ((p in t1.team_squad) && (p in t2.team_squad))\n\n -- Fixture: teams cant be same\n all disj f1: Fixture | f1.home_team != f1.away_team\n -- Fixture: fixture cant repeat\n all disj f1, f2: Fixture |\n not ((f1.home_team = f2.home_team) &&\n (f1.away_team = f2.away_team))\n\n -- Result: fixtures cant share result\n all disj r1, r2: Result | r1.fixture != r2.fixture\n -- Result: can have none or one winner\n all disj r: Result | (no r.winner) || (one r.winner)\n\n -- MOTM: cant share result\n all disj m1, m2: MOTM | m1.result != m2.result\n}\n\n-- predicates\n-- Result: winning team must be one of the two teams\n-- from the related Fixture\npred PolicyDecidingWinner(r: Result, t: Team) {\n t in r.fixture.home_team or\n t in r.fixture.away_team\n}\n\nassert onlyTeamsInvolvedCanWin {\n all r: Result, t: Team |\n PolicyDecidingWinner[r, t]\n}\n\ncheck onlyTeamsInvolvedCanWin\n-- MOTM: only goes to players of the winning team\n-- from the related result\n\n\n\nrun {}", "permalink": "vegan-kiln-pretty-thumb", "time": "2023-12-09 10:31:45.800373", "cmd": 2} {"id": 8765, "parent": 8764, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n trainer: one Coach,\n squad: some Player\n}\n\nsig Fixture {\n home: one Team,\n away: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n -- one winner or a draw\n winner: lone Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n -- using lone in case of draw (no award given)\n related_result: one Result,\n player_awarded: lone Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same trainer\n all disj t1, t2: Team | \n \tt1.trainer != t2.trainer\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.squad) && (p in t2.squad))\n\n -- Fixture: different home and away team\n all disj f: Fixture \n | f.home != f.away\n \n -- Fixture: two fixtures cannot have \n -- same home and away teams\n all disj f1, f2: Fixture \n | not ((f1.home = f2.home) and (f1.away = f2.away))\n\n -- Result: two results cannot relate to same fixture\n all disj r1, r2: Result \n | r1.related_fixture != r2.related_fixture\n\n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1: if a result has a winner, it should be from the \n-- home and away teams in its related fixture\npred PolicyDecidingResult(r: Result) {\n r.winner != none \n implies r.winner in r.related_fixture.home \n or r.winner in r.related_fixture.away\n}\n\nassert onlyTeamInvolvedCanWin {\n all r: Result, t: Team\n | PolicyDecidingResult[r, t] implies\n r.winner not in\n (Team not in \n {r.related_fixture.home, r.related_fixture.away})\n}\n\ncheck onlyTeamInvolvedCanWin\n\n-- 2: Award is only given if the related result has a winner\n-- the player awarded must be from the winning side\n\n\nrun {}", "permalink": "duvet-trump-target-ecard", "time": "2023-12-09 12:23:26.118453", "cmd": 2} {"id": 8771, "parent": 8770, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n trainer: one Coach,\n squad: some Player\n}\n\nsig Fixture {\n home: one Team,\n away: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n -- one winner or a draw\n winner: lone Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n -- using lone in case of draw (no award given)\n related_result: one Result,\n player_awarded: lone Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same trainer\n all disj t1, t2: Team | \n \tt1.trainer != t2.trainer\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.squad) && (p in t2.squad))\n\n -- Fixture: different home and away team\n all disj f: Fixture \n | f.home != f.away\n \n -- Fixture: two fixtures cannot have \n -- same home and away teams\n all disj f1, f2: Fixture \n | not ((f1.home = f2.home) and (f1.away = f2.away))\n\n -- Result: two results cannot relate to same fixture\n all disj r1, r2: Result \n | r1.related_fixture != r2.related_fixture\n\n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1: if a result has a winner, it should be from the \n-- home and away teams in its related fixture\npred PolicyDecidingResult(r: Result, t: Team) {\n (t = r.related_fixture.home) or\n (t = r.related_fixture.away)\n}\n\nassert onlyTeamInvolvedCanWin {\n all r: Result, t: Team \n | r.winner != none implies \n PolicyDecidingResult[r, t]\n}\n\ncheck onlyTeamInvolvedCanWin\n\n-- 2: Award is only given if the related result has a winner\n-- the player awarded must be from the winning side\n\npred PolicyDecidingAward(a: Award, p: Player) {\n a.player_awarded = p implies\n (a.related_result.winner != none and\n p in a.related_result.winner.squad)\n}\n\nassert onlyWinningPlayerGetsAward {\n all a: Award, p: Player |\n PolicyDecidingAward[a, p]\n}\n\ncheck onlyWinningPlayerGetsAward\n\nrun {}", "permalink": "arming-pucker-dawn-lair", "time": "2023-12-09 13:09:01.787870", "cmd": 1} {"id": 8773, "parent": 8752, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\n\nassert sList{\n some List\n}\n\nassert sNode{\n some Node\n}\nrun {no List and no Node} for 3\nrun no List", "permalink": "atop-kelp-hula-pager", "time": "2023-12-09 13:33:06.670101", "cmd": 2} {"id": 8778, "parent": 8777, "code": "module houses\n\nabstract sig House {\n major: one Major,\n color: one Color,\n}\n\none sig H1, H2, H3 extends House {}\n\nenum Major {\n Math, Phil, CS\n}\n\nenum Color {\n Blue, Red, White\n}\n\nfact {\n // all majors are in/linked by some house\n Major in House.major\n // all colors are on/used by some house\n Color in House.color\n \n // The philosophy major lives directly to the right of the red house.\n (H1.color = Red and H2.major = Phil) or ((H2.color = Red and H3.major = Phil))\n //The computer science major lives in the blue house.\n some h : House | h.color = Blue and h.major = CS\n //The math major lives in house 2.\n H2.major = Math \n}\n\nrun {} \n\ncheck Color", "permalink": "boxcar-armful-timid-aside", "time": "2023-12-09 13:34:49.911868", "cmd": 1} {"id": 8782, "parent": 8781, "code": "module houses\n\nabstract sig House {\n major: one Major,\n color: one Color,\n}\n\none sig H1, H2, H3 extends House {}\n\nenum Major {\n Math, Phil, CS\n}\n\nenum Color {\n Blue, Red, White\n}\n\nfact {\n // all majors are in/linked by some house\n Major in House.major\n // all colors are on/used by some house\n Color in House.color\n \n // The philosophy major lives directly to the right of the red house.\n (H1.color = Red and H2.major = Phil) or ((H2.color = Red and H3.major = Phil))\n //The computer science major lives in the blue house.\n some h : House | h.color = Blue and h.major = CS\n //The math major lives in house 2.\n H2.major = Math \n}\nassert cColor{\n some Color\n}\n\nrun {} \n\ncheck cColor\n", "permalink": "rimmed-dosage-dimmed-ozone", "time": "2023-12-09 13:35:59.767772", "cmd": 2} {"id": 8783, "parent": 8782, "code": "module houses\n\nabstract sig House {\n major: one Major,\n color: one Color,\n}\n\none sig H1, H2, H3 extends House {}\n\nenum Major {\n Math, Phil, CS\n}\n\nenum Color {\n Blue, Red, White\n}\n\nfact {\n // all majors are in/linked by some house\n Major in House.major\n // all colors are on/used by some house\n Color in House.color\n \n // The philosophy major lives directly to the right of the red house.\n (H1.color = Red and H2.major = Phil) or ((H2.color = Red and H3.major = Phil))\n //The computer science major lives in the blue house.\n some h : House | h.color = Blue and h.major = CS\n //The math major lives in house 2.\n H2.major = Math \n}\nassert cColor{\n some Major\n}\n\nrun {} \n\ncheck cColor\n", "permalink": "batch-afford-gothic-decade", "time": "2023-12-09 13:36:14.267748", "cmd": 2} {"id": 8784, "parent": 8783, "code": "module houses\n\nabstract sig House {\n major: one Major,\n color: one Color,\n}\n\none sig H1, H2, H3 extends House {}\n\nenum Major {\n Math, Phil, CS\n}\n\nenum Color {\n Blue, Red, White\n}\n\nfact {\n // all majors are in/linked by some house\n Major in House.major\n // all colors are on/used by some house\n Color in House.color\n \n // The philosophy major lives directly to the right of the red house.\n (H1.color = Red and H2.major = Phil) or ((H2.color = Red and H3.major = Phil))\n //The computer science major lives in the blue house.\n some h : House | h.color = Blue and h.major = CS\n //The math major lives in house 2.\n H2.major = Math \n}\nassert cColor{\n some Major\n}\n\nrun {} \n\ncheck cColor\n", "permalink": "saline-roping-bundle-babble", "time": "2023-12-09 13:37:11.397014", "cmd": 2} {"id": 8791, "parent": 8790, "code": "module houses\n\nabstract sig House {\n major: one Major,\n color: one Color,\n}\n\none sig H1, H2, H3 extends House {}\n\nenum Major {\n Math, Phil, CS\n}\n\nenum Color {\n Blue, Red, White\n}\n\nfact {\n // all majors are in/linked by some house\n Major in House.major\n // all colors are on/used by some house\n Color in House.color\n \n // The philosophy major lives directly to the right of the red house.\n (H1.color = Red and H2.major = Phil) or ((H2.color = Red and H3.major = Phil))\n //The computer science major lives in the blue house.\n some h : House | h.color = Blue and h.major = CS\n //The math major lives in house 2.\n H2.major = Math \n}\nassert cColor{\n some Red\n}\n\nrun {} \ncheck cColor\n\n\n", "permalink": "gawk-husked-amuser-amuck", "time": "2023-12-09 13:38:38.268522", "cmd": 2} {"id": 8805, "parent": 8791, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "jovial-icy-jimmy-each", "time": "2023-12-09 16:58:37.872999", "cmd": 1} {"id": 8820, "parent": 8819, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- There \n\nrun {}", "permalink": "golf-arson-slit-shaded", "time": "2023-12-09 17:30:20.271680", "cmd": 1} {"id": 8826, "parent": 8824, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\n\nassert chek{\n some Node\n}\n\ncheck Node", "permalink": "doing-turkey-quack-galore", "time": "2023-12-09 17:37:22.288435", "cmd": 2} {"id": 8829, "parent": 8828, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\n\nassert chek{\n some Node\n}\n\nrun {no Node}", "permalink": "cone-dash-croak-quail", "time": "2023-12-09 17:42:19.984129", "cmd": 2} {"id": 8833, "parent": 8832, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\n\nassert chek{\n some Node\n}\n\nrun {chek}", "permalink": "untidy-grunt-shower-grant", "time": "2023-12-09 17:47:10.731786", "cmd": 2} {"id": 8834, "parent": 8833, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\n\nassert chek{\n some Node\n}\n\nrun { no chek}", "permalink": "boxing-thorn-concur-bucked", "time": "2023-12-09 17:47:20.128216", "cmd": 2} {"id": 8835, "parent": 8834, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\n\n\n\nassert chek{\n some Node\n}\n\nrun {no List} for 3\n\nrun { no chek}", "permalink": "ducky-await-arrive-upon", "time": "2023-12-09 17:47:30.457263", "cmd": 2} {"id": 8839, "parent": 8838, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\n\n\n\n\n\nrun {no List} for 3\n\npred chek(){\n some List\n}\n\nrun {not chek}", "permalink": "clerk-array-zoning-nail", "time": "2023-12-09 17:48:41.467538", "cmd": 2} {"id": 8840, "parent": 8839, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\n\n\n\n\n\nrun {no List} for 3\n\npred chek(){\n no Node\n}\n\nrun {chek}", "permalink": "thong-banker-decay-floss", "time": "2023-12-09 17:49:08.882532", "cmd": 2} {"id": 8847, "parent": 8846, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\nrun Node", "permalink": "around-squire-half-crock", "time": "2023-12-09 17:51:29.801592", "cmd": 2} {"id": 8850, "parent": 8849, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\ncheck List", "permalink": "voting-ending-blade-revert", "time": "2023-12-09 17:54:01.949598", "cmd": 1} {"id": 8851, "parent": 8850, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\ncheck acyclic", "permalink": "plated-smirk-musky-turf", "time": "2023-12-09 17:54:08.557054", "cmd": 1} {"id": 8854, "parent": 8853, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\npred checkSig {\n not Node\n}\n\nrun checkSig", "permalink": "tipper-cadet-snuff-cod", "time": "2023-12-09 17:57:59.330699", "cmd": 2} {"id": 8856, "parent": 8855, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\npred checkSig {\n not (Node)\n}\n\nrun checkSig for 3", "permalink": "why-yo-yo-subtly-ladle", "time": "2023-12-09 17:58:20.415823", "cmd": 2} {"id": 8857, "parent": 8856, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\nsig Signatur{\n s1: some List,\n s2: some Node\n}\n\npred checkSig {\n not (List in Signatur)\n}\n\nrun checkSig for 3", "permalink": "wizard-upbeat-stand-earthy", "time": "2023-12-09 18:00:18.511861", "cmd": 2} {"id": 8875, "parent": 8874, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1 - Player awarded must be from winning team\npred AwardPlayer(a: Award, p: Player) {\n p = a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all a: Award, p: Player\n | AwardPlayer[a, p] implies p in \n a.related_result.related_fixture.winner.squad\n}\n\ncheck onlyAwardWinningPlayer\n\n\n-- There \n\nrun {}", "permalink": "acorn-uncut-jelly-deuce", "time": "2023-12-09 18:41:17.646020", "cmd": 2} {"id": 8877, "parent": 8876, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all a: Award, p: Player | AwardPlayer[a, p] \n implies p \n in a.related_result.related_fixture.winner.players\n}\n\ncheck onlyAwardWinningPlayer\n\n\n-- There \n\nrun {}", "permalink": "ensure-usher-unsure-rocker", "time": "2023-12-09 18:46:02.465132", "cmd": 2} {"id": 8878, "parent": 8877, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.related_fixture.winner.players\n}\n\ncheck onlyAwardWinningPlayer\n\n\n-- There \n\nrun {}", "permalink": "used-cannon-iodize-drab", "time": "2023-12-09 18:48:06.348843", "cmd": 2} {"id": 8879, "parent": 8878, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\ncheck onlyAwardWinningPlayer\n\n\n-- There \n\nrun {}", "permalink": "sector-fervor-snooze-daisy", "time": "2023-12-09 18:49:04.911581", "cmd": 2} {"id": 8880, "parent": 8879, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\ncheck onlyAwardWinningPlayer\n\n-- There \n\nrun onlyAwardWinningPlayer 4 {}", "permalink": "icy-denote-carol-cleat", "time": "2023-12-09 18:50:09.932921", "cmd": 1} {"id": 8884, "parent": 8883, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\ncheck onlyAwardWinningPlayer\n\n-- There \n\nrun onlyAwardWinningPlayer for 1 {}", "permalink": "valium-slick-citric-buffer", "time": "2023-12-09 18:52:08.495482", "cmd": 1} {"id": 8885, "parent": 8884, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\ncheck onlyAwardWinningPlayer for 1\n\n-- There \n\nrun {}", "permalink": "ship-ladle-zips-motion", "time": "2023-12-09 18:52:28.277045", "cmd": 1} {"id": 8887, "parent": 8886, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 2 - \n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\ncheck\n\n-- There \n\nrun {}", "permalink": "freely-vision-bauble-thaw", "time": "2023-12-09 19:01:21.698083", "cmd": 1} {"id": 8888, "parent": 8887, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 2 - \n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\ncheck all\n\n-- There \n\nrun {}", "permalink": "primp-laurel-verify-puppet", "time": "2023-12-09 19:02:27.130099", "cmd": 2} {"id": 8895, "parent": 8894, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3\n\npred checkSig {\n not (some Node)\n}\n\nrun checkSig", "permalink": "speak-slogan-dry-giver", "time": "2023-12-09 19:04:16.916958", "cmd": 1} {"id": 8902, "parent": 8901, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 2 - \n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\nrun onlyAwardWinningPlayer", "permalink": "duvet-nimble-keg-siren", "time": "2023-12-09 20:45:33.340613", "cmd": 1} {"id": 8751, "parent": 6744, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\n\nassert sList{\n some List\n}\n\nassert sNode{\n some Node\n}\nrun {no List and no Node} for 3\nrun sNode for 3", "permalink": "mantis-raisin-ice-crave", "time": "2023-12-09 07:47:33.894728", "cmd": 2} {"id": 8755, "parent": 8754, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n team_coach: one Coach,\n team_squad: some Player\n}\n\nsig Fixture {\n home_team: one Team,\n away_team: one Team,\n}\n\nsig Result {\n fixture: one Fixture,\n winner: set Team,\n}\n\nsig MOTM {\n -- each result provides a MOTM to at least one player\n result: one Result,\n player: some Player,\n}\n\n-- facts\nfact {\n -- Team: coaches cant be same\n all disj t1, t2: Team | t1.team_coach != t2.team_coach\n -- Team: squads cant share players\n all disj t1, t2: Team, p: Player | \n not ((p in t1.team_squad) && (p in t2.team_squad))\n\n -- Fixture: teams cant be same\n all disj f1: Fixture | f1.home_team != f1.away_team\n -- Fixture: fixture cant repeat\n all disj f1, f2: Fixture |\n not ((f1.home_team = f2.home_team) &&\n (f1.away_team = f2.away_team))\n\n -- Result: fixtures cant share result\n all disj r1, r2: Result | r1.fixture != r2.fixture\n -- Result: can have none or one winner\n all disj r: Result | (no r.winner) || (one r.winner)\n\n -- MOTM: cant share result\n all disj m1, m2: MOTM | m1.result != m2.result\n}\n\n-- predicates\n-- Result: winning team must be one of the two teams\n-- from the related Fixture\npred PolicyDecidingWinner(r: Result, t: Team) {\n t in r.fixture.home_team or\n t in r.fixture.away_team\n}\n\nassert onlyTeamsInvolvedCanWin {\n all r: Result, t: Team |\n PolicyDecidingWinner[r, t]\n}\n\n-- MOTM: only goes to players of the winning team\n-- from the related result\n\n\n\nrun {}", "permalink": "septum-dorsal-unseen-choice", "time": "2023-12-09 10:31:33.039954", "cmd": 1} {"id": 8762, "parent": 8761, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n trainer: one Coach,\n squad: some Player\n}\n\nsig Fixture {\n home: one Team,\n away: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n -- one winner or a draw\n winner: lone Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n -- using lone in case of draw (no award given)\n related_result: one Result,\n player: lone Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same trainer\n all disj t1, t2: Team | \n \tt1.trainer != t2.trainer\n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player | \n not ((p in t1.squad) && (p in t2.squad))\n\n -- Fixture: different home and away team\n all disj f: Fixture | \n f.home != f.away\n -- Fixture: two fixtures cannot have \n -- same home and away teams\n all disj f1, f2: Fixture |\n not ((f1.home = f2.home) && (f1.away = f2.away))\n\n -- Result: two results cannot relate to same fixture\n all disj r1, r2: Result | \n r1.related_fixture != r2.related_fixture\n\n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award | \n a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1: if a result has a winner, it should be from the \n-- home and away teams in its related fixture\npred PolicyDecidingResult(r: Result, t: Team) {\n t in r.related_fixture.home or\n t in r.related_fixture.away\n}\n\nassert onlyTeamInvolvedCanWin {\n all r: Result, t: Team |\n r.winner != none implies PolicyDecidingResult[r, t]\n}\n\ncheck onlyTeamInvolvedCanWin\n\nrun {}", "permalink": "kiwi-chip-sprite-wasabi", "time": "2023-12-09 11:43:40.628682", "cmd": 2} {"id": 8764, "parent": 8763, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n trainer: one Coach,\n squad: some Player\n}\n\nsig Fixture {\n home: one Team,\n away: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n -- one winner or a draw\n winner: lone Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n -- using lone in case of draw (no award given)\n related_result: one Result,\n player_awarded: lone Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same trainer\n all disj t1, t2: Team | \n \tt1.trainer != t2.trainer\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.squad) && (p in t2.squad))\n\n -- Fixture: different home and away team\n all disj f: Fixture \n | f.home != f.away\n \n -- Fixture: two fixtures cannot have \n -- same home and away teams\n all disj f1, f2: Fixture \n | not ((f1.home = f2.home) and (f1.away = f2.away))\n\n -- Result: two results cannot relate to same fixture\n all disj r1, r2: Result \n | r1.related_fixture != r2.related_fixture\n\n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1: if a result has a winner, it should be from the \n-- home and away teams in its related fixture\npred PolicyDecidingResult(r: Result) {\n r.winner != none \n implies r.winner in r.related_fixture.home \n or r.winner in r.related_fixture.away\n}\n\nassert onlyTeamInvolvedCanWin {\n all r: Result, t: Team\n | PolicyDecidingResult[r, t] implies\n r.winner not in\n (all Team not in \n {r.related_fixture.home, r.related_fixture.away})\n}\n\ncheck onlyTeamInvolvedCanWin\n\n-- 2: Award is only given if the related result has a winner\n-- the player awarded must be from the winning side\n\n\nrun {}", "permalink": "splice-strum-sloped-tarot", "time": "2023-12-09 12:23:15.365053", "cmd": 2} {"id": 8767, "parent": 8766, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n trainer: one Coach,\n squad: some Player\n}\n\nsig Fixture {\n home: one Team,\n away: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n -- one winner or a draw\n winner: lone Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n -- using lone in case of draw (no award given)\n related_result: one Result,\n player_awarded: lone Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same trainer\n all disj t1, t2: Team | \n \tt1.trainer != t2.trainer\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.squad) && (p in t2.squad))\n\n -- Fixture: different home and away team\n all disj f: Fixture \n | f.home != f.away\n \n -- Fixture: two fixtures cannot have \n -- same home and away teams\n all disj f1, f2: Fixture \n | not ((f1.home = f2.home) and (f1.away = f2.away))\n\n -- Result: two results cannot relate to same fixture\n all disj r1, r2: Result \n | r1.related_fixture != r2.related_fixture\n\n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1: if a result has a winner, it should be from the \n-- home and away teams in its related fixture\npred PolicyDecidingResult(r: Result, t: Team) {\n r.winner = t implies\n t in r.related_fixture.home or\n t in r.related_fixture.away\n}\n\nassert onlyTeamInvolvedCanWin {\n all r: Result, t: Team \n | PolicyDecidingResult[r, t]\n}\n\ncheck onlyTeamInvolvedCanWin\n\n-- 2: Award is only given if the related result has a winner\n-- the player awarded must be from the winning side\n\n\nrun {}", "permalink": "rotten-wavy-spouse-sinner", "time": "2023-12-09 12:53:04.408825", "cmd": 2} {"id": 8787, "parent": 8786, "code": "module houses\n\nabstract sig House {\n major: one Major,\n color: one Color,\n}\n\none sig H1, H2, H3 extends House {}\n\nenum Major {\n Math, Phil, CS\n}\n\nenum Color {\n Blue, Red, White\n}\n\nfact {\n // all majors are in/linked by some house\n Major in House.major\n // all colors are on/used by some house\n Color in House.color\n \n // The philosophy major lives directly to the right of the red house.\n (H1.color = Red and H2.major = Phil) or ((H2.color = Red and H3.major = Phil))\n //The computer science major lives in the blue house.\n some h : House | h.color = Blue and h.major = CS\n //The math major lives in house 2.\n H2.major = Math \n}\nassert cColor{\n some Major\n}\n\nrun {} \ncheck cColor\n\n\n", "permalink": "bush-lurch-juicy-worst", "time": "2023-12-09 13:37:55.872329", "cmd": 1} {"id": 8788, "parent": 8787, "code": "module houses\n\nabstract sig House {\n major: one Major,\n color: one Color,\n}\n\none sig H1, H2, H3 extends House {}\n\nenum Major {\n Math, Phil, CS\n}\n\nenum Color {\n Blue, Red, White\n}\n\nfact {\n // all majors are in/linked by some house\n Major in House.major\n // all colors are on/used by some house\n Color in House.color\n \n // The philosophy major lives directly to the right of the red house.\n (H1.color = Red and H2.major = Phil) or ((H2.color = Red and H3.major = Phil))\n //The computer science major lives in the blue house.\n some h : House | h.color = Blue and h.major = CS\n //The math major lives in house 2.\n H2.major = Math \n}\nassert cColor{\n some Major\n}\n\nrun {} \ncheck cColor\n\n\n", "permalink": "siren-femur-silt-grit", "time": "2023-12-09 13:37:59.857586", "cmd": 2} {"id": 8804, "parent": 8803, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture | f.team1 != f.team2\n\n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- There \n\nrun {}", "permalink": "frail-parole-mangy-sneak", "time": "2023-12-09 16:45:27.971064", "cmd": 1} {"id": 8806, "parent": 8805, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\npred checkList{\n some Node\n}\nrun acyclic for 3\ncheck checkList", "permalink": "barley-hunk-undone-folic", "time": "2023-12-09 16:59:03.705352", "cmd": 2} {"id": 8807, "parent": 8806, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\npred checkList{\n some List\n}\nrun acyclic for 3\ncheck checkList", "permalink": "mutate-impure-blip-puppy", "time": "2023-12-09 16:59:12.146893", "cmd": 2} {"id": 8813, "parent": 8812, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\n\nassert chek{\n some List\n}\n\nrun not chek", "permalink": "jumble-floral-salary-sled", "time": "2023-12-09 17:11:00.790967", "cmd": 1} {"id": 8815, "parent": 8814, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\n\nassert chek{\n some List\n}\n\ncheck chek", "permalink": "slicer-pull-voyage-juice", "time": "2023-12-09 17:11:25.261651", "cmd": 1} {"id": 8816, "parent": 8815, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\n\nassert chek{\n some List\n}\n\ncheck chek", "permalink": "rumble-remedy-truth-body", "time": "2023-12-09 17:11:30.764480", "cmd": 2} {"id": 8817, "parent": 8816, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\n\nassert chek{\n some Node\n}\n\ncheck chek", "permalink": "flirt-capped-fiber-yoga", "time": "2023-12-09 17:11:37.858028", "cmd": 2} {"id": 8821, "parent": 8820, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- There \n\nrun {}", "permalink": "squid-pagan-prude-alias", "time": "2023-12-09 17:30:47.728402", "cmd": 1} {"id": 8824, "parent": 8823, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\n\nassert chek{\n some Node\n}\n\ncheck List", "permalink": "awoke-shrill-croak-aware", "time": "2023-12-09 17:37:16.090539", "cmd": 2} {"id": 8827, "parent": 8826, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\n\nassert chek{\n some Node\n}\n\ncheck chek", "permalink": "zesty-lurk-deftly-booted", "time": "2023-12-09 17:37:30.514530", "cmd": 1} {"id": 8846, "parent": 8845, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\nrun no Node", "permalink": "negate-clamp-ridden-bony", "time": "2023-12-09 17:51:11.427381", "cmd": 2} {"id": 8849, "parent": 8848, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\nrun not List", "permalink": "cinch-carton-blitz-sacred", "time": "2023-12-09 17:53:57.513354", "cmd": 2} {"id": 8852, "parent": 8851, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\ncheck acyclic()", "permalink": "rotten-taps-both-anemia", "time": "2023-12-09 17:54:13.174201", "cmd": 1} {"id": 8853, "parent": 8852, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\ncheck not acyclic for 3", "permalink": "apply-neuron-sports-swell", "time": "2023-12-09 17:54:24.577200", "cmd": 1} {"id": 8858, "parent": 8857, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\nsig Signatur{\n s1: some List,\n s2: some Node\n}\n\npred checkSig {\n (List in Signatur)\n}\n\nrun checkSig for 3", "permalink": "prior-vice-deck-fever", "time": "2023-12-09 18:00:34.571371", "cmd": 2} {"id": 8860, "parent": 8859, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\n//pred checkSig {\n// not (List)\n//}\n\n//run checkSig for 3", "permalink": "brute-blurry-idly-shrink", "time": "2023-12-09 18:02:00.114795", "cmd": 1} {"id": 8861, "parent": 8860, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\npred checkSig {\n not (some List)\n}\n\nrun checkSig for 3", "permalink": "author-evade-avert-wiry", "time": "2023-12-09 18:03:17.782249", "cmd": 2} {"id": 8863, "parent": 8862, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\npred checkSig {\n not (some Node)\n}\n\nrun checkSig ", "permalink": "aids-velvet-stuck-tried", "time": "2023-12-09 18:03:57.634652", "cmd": 2} {"id": 8864, "parent": 8863, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\npred checkSig {\n not (some Node)\n}\n\nrun checkSig ", "permalink": "folk-denial-derby-plus", "time": "2023-12-09 18:04:09.330326", "cmd": 1} {"id": 8865, "parent": 8864, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\npred checkSig {\n not (all List)\n}\n\nrun checkSig ", "permalink": "duty-afar-raking-haven", "time": "2023-12-09 18:04:26.851414", "cmd": 1} {"id": 8866, "parent": 8865, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\npred checkSig {\n not (some List)\n}\n\nrun checkSig ", "permalink": "sesame-karate-baking-fossil", "time": "2023-12-09 18:04:46.658941", "cmd": 1} {"id": 8867, "parent": 8866, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\npred checkSig {\n not (some Node)\n}\n\nrun checkSig ", "permalink": "halves-sample-mouth-shriek", "time": "2023-12-09 18:04:52.998945", "cmd": 1} {"id": 8869, "parent": 8868, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\npred checkSig {\n not (some Node)\n}\n\nrun checkSig ", "permalink": "next-thrive-sheep-wifi", "time": "2023-12-09 18:05:48.572809", "cmd": 1} {"id": 8871, "parent": 8870, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3\n\npred checkSig {\n not (some List)\n}\n\nrun checkSig ", "permalink": "rumor-walk-mooned-manned", "time": "2023-12-09 18:15:11.823992", "cmd": 2} {"id": 8872, "parent": 8871, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3\n\npred checkSig {\n not (some Node)\n}\n\nrun checkSig ", "permalink": "revoke-gains-woven-lagged", "time": "2023-12-09 18:15:15.342326", "cmd": 2} {"id": 8874, "parent": 8825, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1 - Player awarded must be from winning team\npred AwardPlayer(a: Award, p: Player) {\n p = award.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all a: Award, p: Player\n | AwardPlayer[a, p] implies p in \n a.related_result.related_fixture.winner.squad\n}\n\ncheck onlyAwardWinningPlayer\n\n\n-- There \n\nrun {}", "permalink": "onward-yodel-visa-turkey", "time": "2023-12-09 18:41:03.584154", "cmd": 2} {"id": 8883, "parent": 8880, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\ncheck onlyAwardWinningPlayer\n\n-- There \n\nrun onlyAwardWinningPlayer {}", "permalink": "unison-marrow-shut-ferris", "time": "2023-12-09 18:50:22.771449", "cmd": 1} {"id": 8891, "parent": 8890, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 2 - \n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\ncheck onlyAwardWinningPlayer\n\n-- There \n\nrun {}", "permalink": "paltry-shun-gift-curing", "time": "2023-12-09 19:03:40.419774", "cmd": 2} {"id": 8901, "parent": 8900, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 2 - \n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\nrun {}", "permalink": "relic-shrink-canola-ice", "time": "2023-12-09 20:44:22.144669", "cmd": 1} {"id": 8903, "parent": 8902, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 2 - \n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\nrun{}", "permalink": "santa-dupe-wobbly-sleet", "time": "2023-12-09 20:46:03.313090", "cmd": 1} {"id": 8908, "parent": 8907, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 2 - \n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\ncheck onlyAwardWinningPlayer\n\nrun onlyAwardWinningPlayer{}\n\nrun{}", "permalink": "scarf-spongy-studio-shorts", "time": "2023-12-09 20:47:10.316299", "cmd": 1} {"id": 8909, "parent": 8908, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 2 - \n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\nrun onlyAwardWinningPlayer{}\n\nrun{}", "permalink": "radar-chest-stack-lather", "time": "2023-12-09 20:48:08.654041", "cmd": 1} {"id": 8910, "parent": 8909, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 2 - \n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\ncheck onlyAwardWinningPlayer{}\n\nrun onlyAwardWinningPlayer{}\n\nrun{}", "permalink": "atlas-silo-reflux-common", "time": "2023-12-09 20:49:24.317019", "cmd": 2} {"id": 8917, "parent": 8916, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\n-- 2: All teams finish winless\npred PolicyAllowsWin(r: Result, t: Team) {\n t in r.winner\n}\n\nassert noTeamWins{\n all r: Result, t: Team |\n not PolicyAllowsWin[r, t]\n}\n\nrun onlyAwardWinningPlayer{}\n\nrun{}", "permalink": "likely-buffer-pager-opium", "time": "2023-12-09 20:59:31.275446", "cmd": 1} {"id": 8921, "parent": 8920, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\n-- 2: All teams finish winless\npred PolicyAllowsWin(r: Result, t: Team) {\n t in r.winner\n}\n\nassert noTeamWins{\n all r: Result, t: Team |\n not PolicyAllowsWin[r, t]\n}\n\nrun onlyAwardWinningPlayer{}\n\ncheck noTeamWins\nrun{}", "permalink": "legged-atlas-street-shabby", "time": "2023-12-09 21:01:15.058726", "cmd": 1} {"id": 8925, "parent": 8924, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\n-- 2: All teams finish winless\npred PolicyAllowsWin(r: Result, t: Team) {\n t in r.winner\n}\n\nassert noTeamWins{\n all r: Result, t: Team |\n not PolicyAllowsWin[r, t]\n}\n\nrun onlyAwardWinningPlayer{}\n\ncheck noTeamWins\nrun{}", "permalink": "ruse-cube-verse-ocean", "time": "2023-12-09 21:01:32.774117", "cmd": 1} {"id": 8837, "parent": 8836, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\n\n\n\npred chek(){\n some Node\n}\n\nrun {no List} for 3\n\nrun {not chek}", "permalink": "duffel-stomp-mashed-garnet", "time": "2023-12-09 17:48:13.902552", "cmd": 2} {"id": 8838, "parent": 8837, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\n\n\n\npred chek(){\n some List\n}\n\nrun {no List} for 3\n\nrun {not chek}", "permalink": "upload-bungee-alike-cut", "time": "2023-12-09 17:48:25.320024", "cmd": 2} {"id": 8841, "parent": 8840, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\n\n\n\n\n\nrun {no List} for 3\n\npred chek(){\n no List\n}\n\nrun {chek}", "permalink": "reheat-footer-vision-carbon", "time": "2023-12-09 17:49:22.903332", "cmd": 2} {"id": 8845, "parent": 8844, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\nassert chek(){\n no List\n}\n\nrun no Node", "permalink": "irk-crook-romp-couch", "time": "2023-12-09 17:51:05.223018", "cmd": 2} {"id": 8859, "parent": 8858, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\nsig Signatur{\n s1: some List,\n s2: some Node\n}\n\npred checkSig {\n (List = Signatur)\n}\n\nrun checkSig for 3", "permalink": "ascent-clean-cough-spry", "time": "2023-12-09 18:00:44.201757", "cmd": 2} {"id": 8868, "parent": 8867, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\npred checkSig {\n not (all Node)\n}\n\nrun checkSig ", "permalink": "mammal-powwow-myth-static", "time": "2023-12-09 18:05:13.004140", "cmd": 1} {"id": 8870, "parent": 8869, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3\n\npred checkSig {\n not (some XYZ)\n}\n\nrun checkSig ", "permalink": "cringe-lark-viper-steed", "time": "2023-12-09 18:06:11.589272", "cmd": 1} {"id": 8873, "parent": 8872, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3\n\npred checkSig {\n not (some List)\n}\n\nrun checkSig ", "permalink": "same-cork-widget-thesis", "time": "2023-12-09 18:15:23.107949", "cmd": 2} {"id": 8886, "parent": 8885, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\ncheck onlyAwardWinningPlayer for 2\n\n-- There \n\nrun {}", "permalink": "supper-remix-shun-dipper", "time": "2023-12-09 18:52:32.806632", "cmd": 1} {"id": 8889, "parent": 8888, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 2 - \n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\ncheck {}\n\n-- There \n\nrun {}", "permalink": "emblem-both-wipe-rising", "time": "2023-12-09 19:03:09.852150", "cmd": 1} {"id": 8890, "parent": 8889, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 2 - \n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\ncheck {}\n\n-- There \n\nrun {}", "permalink": "rewire-revolt-buffer-nugget", "time": "2023-12-09 19:03:16.951810", "cmd": 2} {"id": 8892, "parent": 8891, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 2 - \n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\ncheck onlyAwardWinningPlayer\n\n-- There \n\nrun ", "permalink": "slot-abroad-friday-batch", "time": "2023-12-09 19:03:50.756658", "cmd": 1} {"id": 8893, "parent": 8892, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 2 - \n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\ncheck onlyAwardWinningPlayer\n\n-- There \n\nrun {}", "permalink": "cement-bully-smugly-riot", "time": "2023-12-09 19:03:59.701459", "cmd": 1} {"id": 8894, "parent": 8873, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3\n\npred checkSig {\n not (some List)\n}\n\nrun checkSig", "permalink": "nappy-studio-sponge-lasso", "time": "2023-12-09 19:04:11.927726", "cmd": 1} {"id": 8896, "parent": 8893, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 2 - \n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\n\nrun {}", "permalink": "manger-grinch-grief-peso", "time": "2023-12-09 19:04:36.811150", "cmd": 1} {"id": 8897, "parent": 8896, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 2 - \n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\ncheck onlyAwardWinningPlayer\n\nrun {}", "permalink": "salt-mockup-swipe-rogue", "time": "2023-12-09 19:04:56.288214", "cmd": 2} {"id": 8898, "parent": 8897, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 2 - \n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\ncheck onlyAwardWinningPlayer\n\nrun {}", "permalink": "amulet-racism-fringe-rust", "time": "2023-12-09 19:05:05.739416", "cmd": 1} {"id": 8905, "parent": 8904, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 2 - \n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\nrun onlyAwardWinningPlayer{}\n\nrun{}", "permalink": "eggnog-swung-octane-vowel", "time": "2023-12-09 20:46:40.992148", "cmd": 2} {"id": 8906, "parent": 8905, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 2 - \n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\nrun onlyAwardWinningPlayer{}\n\nrun{}", "permalink": "aloha-wipe-moody-earful", "time": "2023-12-09 20:46:45.529413", "cmd": 1} {"id": 8907, "parent": 8906, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 2 - \n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\ncheck onlyAwardWinningPlayer\n\nrun onlyAwardWinningPlayer{}\n\nrun{}", "permalink": "reply-yogurt-agony-chemo", "time": "2023-12-09 20:47:06.551608", "cmd": 2} {"id": 8912, "parent": 8911, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 2 - \n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\ncheck onlyAwardWinningPlayer\n\nrun onlyAwardWinningPlayer{}\n\nrun{}", "permalink": "rink-flying-goal-greedy", "time": "2023-12-09 20:49:40.905772", "cmd": 1} {"id": 8914, "parent": 8913, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\n-- 2:\n\nrun onlyAwardWinningPlayer{}\n\nrun{}", "permalink": "awoke-plank-judge-coming", "time": "2023-12-09 20:50:51.734793", "cmd": 1} {"id": 8915, "parent": 8914, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\n-- 2: All teams finish winless\npred PolicyAllowsWin(r: Result, t: Team) {\n t in r.winner\n}\n\nassert noTeamWins{\n all r: Result, t: Team |\n PolicyAllowsWin[r, t] implies false\n}\n\nrun onlyAwardWinningPlayer{}\n\nrun{}", "permalink": "likely-making-streak-outwit", "time": "2023-12-09 20:59:00.492001", "cmd": 1} {"id": 8918, "parent": 8917, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\n-- 2: All teams finish winless\npred PolicyAllowsWin(r: Result, t: Team) {\n t in r.winner\n}\n\nassert noTeamWins{\n all r: Result, t: Team |\n not PolicyAllowsWin[r, t]\n}\n\nrun onlyAwardWinningPlayer{}\n\nrun noTeamWins{}\n\nrun{}", "permalink": "canal-crane-olive-relish", "time": "2023-12-09 20:59:57.416344", "cmd": 1} {"id": 8919, "parent": 8918, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\n-- 2: All teams finish winless\npred PolicyAllowsWin(r: Result, t: Team) {\n t in r.winner\n}\n\nassert noTeamWins{\n all r: Result, t: Team |\n not PolicyAllowsWin[r, t]\n}\n\nrun onlyAwardWinningPlayer{}\n\nrun noTeamWins{}\n\nrun{}", "permalink": "lure-veggie-sitter-thing", "time": "2023-12-09 21:00:01.557237", "cmd": 2} {"id": 8913, "parent": 8912, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 2 - \n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\nrun onlyAwardWinningPlayer{}\n\nrun{}", "permalink": "tutor-posing-awhile-payee", "time": "2023-12-09 20:49:52.432027", "cmd": 1} {"id": 8916, "parent": 8915, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\n-- 2: All teams finish winless\npred PolicyAllowsWin(r: Result, t: Team) {\n t in r.winner\n}\n\nassert noTeamWins{\n all r: Result, t: Team |\n PolicyAllowsWin[r, t] implies none\n}\n\nrun onlyAwardWinningPlayer{}\n\nrun{}", "permalink": "mutual-mobile-affirm-supply", "time": "2023-12-09 20:59:08.903789", "cmd": 1} {"id": 8920, "parent": 8919, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\n-- 2: All teams finish winless\npred PolicyAllowsWin(r: Result, t: Team) {\n t in r.winner\n}\n\nassert noTeamWins{\n all r: Result, t: Team |\n not PolicyAllowsWin[r, t]\n}\n\nrun onlyAwardWinningPlayer{}\n\nrun noTeamWins{} for 4\n\nrun{}", "permalink": "skirt-flint-basket-wing", "time": "2023-12-09 21:00:26.983910", "cmd": 2} {"id": 8922, "parent": 8921, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\n-- 2: All teams finish winless\npred PolicyAllowsWin(r: Result, t: Team) {\n t in r.winner\n}\n\nassert noTeamWins{\n all r: Result, t: Team |\n not PolicyAllowsWin[r, t]\n}\n\nrun onlyAwardWinningPlayer{}\n\ncheck noTeamWins\nrun{}", "permalink": "udder-resort-ethics-caring", "time": "2023-12-09 21:01:17.968732", "cmd": 2} {"id": 8923, "parent": 8922, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\n-- 2: All teams finish winless\npred PolicyAllowsWin(r: Result, t: Team) {\n t in r.winner\n}\n\nassert noTeamWins{\n all r: Result, t: Team |\n not PolicyAllowsWin[r, t]\n}\n\nrun onlyAwardWinningPlayer{}\n\ncheck noTeamWins\nrun{}", "permalink": "flail-ending-clique-scale", "time": "2023-12-09 21:01:21.306305", "cmd": 3} {"id": 8924, "parent": 8923, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\n-- 2: All teams finish winless\npred PolicyAllowsWin(r: Result, t: Team) {\n t in r.winner\n}\n\nassert noTeamWins{\n all r: Result, t: Team |\n not PolicyAllowsWin[r, t]\n}\n\nrun onlyAwardWinningPlayer{}\n\ncheck noTeamWins\nrun{}", "permalink": "puppy-hefty-mating-awning", "time": "2023-12-09 21:01:25.377273", "cmd": 2} {"id": 8926, "parent": 8925, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\n-- 2: All teams finish winless\npred PolicyAllowsWin(r: Result, t: Team) {\n t in r.winner\n}\n\nassert noTeamWins{\n all r: Result, t: Team |\n not PolicyAllowsWin[r, t]\n}\n\nrun onlyAwardWinningPlayer for 4{}\n\ncheck noTeamWins\nrun{}", "permalink": "ragged-down-sulk-shore", "time": "2023-12-09 21:11:22.348085", "cmd": 1} {"id": 8927, "parent": 8926, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\n-- 2: All teams finish winless\npred PolicyAllowsWin(r: Result, t: Team) {\n t in r.winner\n}\n\nassert noTeamWins{\n all r: Result, t: Team |\n not PolicyAllowsWin[r, t]\n}\n\nrun onlyAwardWinningPlayer for 4\n\ncheck noTeamWins\nrun{}", "permalink": "neatly-saloon-deem-grower", "time": "2023-12-09 21:11:28.320032", "cmd": 1} {"id": 8928, "parent": 8927, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\n-- 2: All teams finish winless\npred PolicyAllowsWin(r: Result, t: Team) {\n t in r.winner\n}\n\nassert noTeamWins{\n all r: Result, t: Team |\n not PolicyAllowsWin[r, t]\n}\n\nrun onlyAwardWinningPlayer\n\ncheck noTeamWins\nrun{}", "permalink": "sullen-graves-bottle-deuce", "time": "2023-12-09 21:11:35.474888", "cmd": 1} {"id": 8929, "parent": 8928, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\n-- 2: All teams finish winless\npred PolicyAllowsWin(r: Result, t: Team) {\n t in r.winner\n}\n\nassert noTeamWins{\n all r: Result, t: Team |\n not PolicyAllowsWin[r, t]\n}\n\ncheck onlyAwardWinningPlayer\nrun{}", "permalink": "snide-folk-anyway-line", "time": "2023-12-09 21:12:26.242739", "cmd": 2} {"id": 8930, "parent": 8929, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\n-- 2: All teams finish winless\npred PolicyAllowsWin(r: Result, t: Team) {\n t in r.winner\n}\n\nassert noTeamWins{\n all r: Result, t: Team |\n not PolicyAllowsWin[r, t]\n}\n\ncheck onlyAwardWinningPlayer\nrun{}", "permalink": "canopy-drove-vanity-cheer", "time": "2023-12-09 21:12:29.946238", "cmd": 1} {"id": 8931, "parent": 8930, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\n-- 2: All teams finish winless\npred PolicyAllowsWin(r: Result, t: Team) {\n t in r.winner\n}\n\nassert noTeamWins{\n all r: Result, t: Team |\n not PolicyAllowsWin[r, t]\n}\n\ncheck not noTeamWins\ncheck onlyAwardWinningPlayer\nrun{}", "permalink": "arrive-headed-upside-mouth", "time": "2023-12-09 21:12:49.960175", "cmd": 1} {"id": 8932, "parent": 8931, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\n-- 2: All teams finish winless\npred PolicyAllowsWin(r: Result, t: Team) {\n t in r.winner\n}\n\nassert noTeamWins{\n all r: Result, t: Team |\n not PolicyAllowsWin[r, t]\n}\n\ncheck noTeamWins\ncheck onlyAwardWinningPlayer\nrun{}", "permalink": "timing-cone-crease-bleach", "time": "2023-12-09 21:13:00.159109", "cmd": 1} {"id": 8933, "parent": 8932, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\n-- 2: All teams finish winless\npred PolicyAllowsWin(r: Result, t: Team) {\n t in r.winner\n}\n\nassert noTeamWins{\n all r: Result, t: Team |\n not PolicyAllowsWin[r, t]\n}\n\ncheck noTeamWins\ncheck onlyAwardWinningPlayer\nrun{}", "permalink": "gargle-grape-wavy-lint", "time": "2023-12-09 21:14:05.418805", "cmd": 2} {"id": 8934, "parent": 7069, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n -- someone killed Agatha\n some p: Person | Agatha in p.killed\n}\n\nrun puzzle", "permalink": "badass-reuse-lingo-scorn", "time": "2023-12-09 21:33:03.946714", "cmd": 1} {"id": 8935, "parent": 8934, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n -- 1\n some p: Person | Agatha in p.killed\n and\n -- 2\n all p1, p2: Person |\n p2 in p1.killed implies\n p2 in p1.hates and p2 not in p1.richer\n\n}\n\nrun puzzle", "permalink": "canola-vision-smirk-elope", "time": "2023-12-09 21:35:54.386559", "cmd": 1} {"id": 8936, "parent": 8935, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n -- 1\n some p: Person | Agatha in p.killed\n -- 2\n all p1, p2: Person |\n p2 in p1.killed implies\n p2 in p1.hates and p2 not in p1.richer\n -- 3\n all p: Person |\n p in Agatha.hates implies\n p not in Charles.hates\n\n}\n\nrun puzzle", "permalink": "groovy-appear-nimble-dense", "time": "2023-12-09 21:37:26.539559", "cmd": 1} {"id": 8937, "parent": 8936, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n -- 1\n some p: Person | Agatha in p.killed\n -- 2\n all p1, p2: Person |\n p2 in p1.killed implies\n p2 in p1.hates and p2 not in p1.richer\n -- 3\n all p: Person |\n p in Agatha.hates implies\n p not in Charles.hates\n -- 4\n Agatha in Agatha.hates and Charles in Agatha.hates\n}\n\nrun puzzle", "permalink": "vista-single-bubbly-headed", "time": "2023-12-09 21:38:43.022672", "cmd": 1} {"id": 8938, "parent": 8937, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n -- 1\n some x: Person | Agatha in x.killed\n -- 2\n all x, y: Person |\n y in x.killed implies\n y in x.hates and x not in y.richer\n -- 3\n all x: Person |\n x in Agatha.hates implies\n x not in Charles.hates\n -- 4\n Agatha in Agatha.hates and Charles in Agatha.hates\n -- 5\n all x: Person |\n x not in Agatha.richer implies\n x in Butler.hates\n \n}\n\nrun puzzle", "permalink": "dupe-docile-friend-fable", "time": "2023-12-09 21:43:07.473284", "cmd": 1} {"id": 8939, "parent": 8938, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n -- 1\n some x: Person | Agatha in x.killed\n -- 2\n all x, y: Person |\n y in x.killed implies\n y in x.hates and x not in y.richer\n -- 3\n all x: Person |\n x in Agatha.hates implies\n x not in Charles.hates\n -- 4\n Agatha in Agatha.hates and Charles in Agatha.hates\n -- 5\n all x: Person |\n x not in Agatha.richer implies\n x in Butler.hates\n -- 6\n all x: Person |\n x in Agatha.hates implies\n x in Butler.hates\n --7\n all x: Person, some y: Person |\n y not in x.hates\n\n}\n\nrun puzzle", "permalink": "scary-unsnap-crop-haiku", "time": "2023-12-09 21:45:06.315934", "cmd": 1} {"id": 8940, "parent": 8939, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n -- 1\n some x: Person | Agatha in x.killed\n -- 2\n all x, y: Person |\n y in x.killed implies\n y in x.hates and x not in y.richer\n -- 3\n all x: Person |\n x in Agatha.hates implies\n x not in Charles.hates\n -- 4\n Agatha in Agatha.hates and Charles in Agatha.hates\n -- 5\n all x: Person |\n x not in Agatha.richer implies\n x in Butler.hates\n -- 6\n all x: Person |\n x in Agatha.hates implies\n x in Butler.hates\n --7\n all x: Person some y: Person |\n y not in x.hates\n\n}\n\nrun puzzle", "permalink": "smudgy-banter-cannot-mantis", "time": "2023-12-09 21:45:13.687895", "cmd": 1} {"id": 8941, "parent": 8940, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n -- 1\n some x: Person | Agatha in x.killed\n -- 2\n all x, y: Person |\n y in x.killed implies\n y in x.hates and x not in y.richer\n -- 3\n all x: Person |\n x in Agatha.hates implies\n x not in Charles.hates\n -- 4\n Agatha in Agatha.hates and Charles in Agatha.hates\n -- 5\n all x: Person |\n x not in Agatha.richer implies\n x in Butler.hates\n -- 6\n all x: Person |\n x in Agatha.hates implies\n x in Butler.hates\n --7\n all x: Person |\n some y: Person |\n y not in x.hates\n\n}\n\nrun puzzle", "permalink": "cherub-shy-tamale-rebel", "time": "2023-12-09 21:46:37.806023", "cmd": 1} {"id": 8942, "parent": 8933, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\n-- 2: All teams finish winless\npred PolicyAllowsWin(r: Result, t: Team) {\n t in r.winner\n}\n\nassert noTeamWins{\n all r: Result, t: Team |\n not PolicyAllowsWin[r, t]\n}\n\nrun onlyAwardWinningPlayer{}\nrun noTeamWins{}", "permalink": "poser-murky-oboe-broken", "time": "2023-12-09 21:49:09.139422", "cmd": 1} {"id": 8943, "parent": 8942, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\n-- 2: All teams finish winless\npred PolicyAllowsWin(r: Result, t: Team) {\n t in r.winner\n}\n\nassert noTeamWins{\n all r: Result, t: Team |\n not PolicyAllowsWin[r, t]\n}\n\nrun onlyAwardWinningPlayer{}\nrun noTeamWins{}", "permalink": "thorn-guts-afar-luxury", "time": "2023-12-09 21:49:12.560697", "cmd": 2} {"id": 8944, "parent": 8943, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\n-- 2: All teams finish winless\npred PolicyAllowsWin(r: Result, t: Team) {\n t in r.winner\n}\n\nassert allTeamWins{\n all r: Result, t: Team |\n PolicyAllowsWin[r, t]\n}\n\nrun onlyAwardWinningPlayer{}\nrun noTeamWins{}", "permalink": "agency-dubbed-cleft-late", "time": "2023-12-09 21:49:22.774587", "cmd": 2} {"id": 8945, "parent": 8944, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\n-- 2: All teams finish winless\npred PolicyAllowsWin(r: Result, t: Team) {\n t in r.winner\n}\n\nassert allTeamWins{\n all r: Result, t: Team |\n PolicyAllowsWin[r, t]\n}\n\nrun onlyAwardWinningPlayer{}\nrun allTeamWins{}", "permalink": "surely-eskimo-half-plated", "time": "2023-12-09 21:49:31.265263", "cmd": 1} {"id": 8946, "parent": 8945, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n \n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\n-- 2: All teams finish winless\npred PolicyAllowsWin(r: Result, t: Team) {\n t in r.winner\n}\n\nassert allTeamWins{\n all r: Result, t: Team |\n PolicyAllowsWin[r, t]\n}\n\nrun onlyAwardWinningPlayer{}\nrun allTeamWins{}", "permalink": "remix-unsure-status-gazing", "time": "2023-12-09 21:49:33.980490", "cmd": 2} {"id": 8947, "parent": 7297, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "ruby-earwig-alone-defile", "time": "2023-12-09 21:54:12.593875", "cmd": 1} {"id": 8948, "parent": 8947, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no f: File | f in Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "ebook-eatery-sadly-crave", "time": "2023-12-09 21:56:05.403991", "cmd": 1} {"id": 8949, "parent": 8948, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no f: File | f in Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "cover-sadly-neuter-hatbox", "time": "2023-12-09 21:56:49.370950", "cmd": 1} {"id": 8950, "parent": 8949, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no f: File | f in Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "vibes-ouch-pull-savor", "time": "2023-12-09 21:56:57.264364", "cmd": 2} {"id": 8951, "parent": 8950, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no f: File | f in Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "poison-glance-shy-gallon", "time": "2023-12-09 21:58:11.038640", "cmd": 3} {"id": 8952, "parent": 8951, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no f: File | f in Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all f: File | \n f in Protected implies f not in Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "wok-gloomy-jeep-silent", "time": "2023-12-09 21:59:07.235038", "cmd": 3} {"id": 8953, "parent": 8952, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no f: File | f in Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all f: File | \n f in Protected implies f not in Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "throng-chuck-rug-clerk", "time": "2023-12-09 21:59:14.221651", "cmd": 4} {"id": 8954, "parent": 8953, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no f: File | f in Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all f: File | \n f in Protected implies f not in Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File |\n f not in Protected implies f in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "vowed-happy-left-poet", "time": "2023-12-09 22:00:26.763956", "cmd": 5} {"id": 8955, "parent": 8954, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no f: File | f in Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all f: File | \n f in Protected implies f not in Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File |\n f not in Protected implies f in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File |\n f.link is lone\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "saga-oozy-urchin-mud", "time": "2023-12-09 22:02:09.485768", "cmd": 5} {"id": 8956, "parent": 8955, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no f: File | f in Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all f: File | \n f in Protected implies f not in Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File |\n f not in Protected implies f in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File |\n lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "wizard-scabby-macaw-flask", "time": "2023-12-09 22:02:25.177827", "cmd": 5} {"id": 8957, "parent": 8956, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no f: File | f in Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all f: File | \n f in Protected implies f not in Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File |\n f not in Protected implies f in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File |\n lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "haiku-willow-oops-cure", "time": "2023-12-09 22:02:44.845508", "cmd": 6} {"id": 8958, "parent": 8957, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no f: File | f in Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all f: File | \n f in Protected implies f not in Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File |\n f not in Protected implies f in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File |\n lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n all f1, f2: File |\n f2 in f1.link implies f2 not in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "opt-occupy-gilled-radio", "time": "2023-12-09 22:04:15.099661", "cmd": 7} {"id": 8959, "parent": 8958, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no f: File | f in Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all f: File | \n f in Protected implies f not in Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File |\n f not in Protected implies f in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File |\n lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n all f1, f2: File |\n f2 in f1.link implies f2 not in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n all f: File |\n none f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "unrest-vision-clamp-cackle", "time": "2023-12-09 22:05:14.700414", "cmd": 7} {"id": 8960, "parent": 8959, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no f: File | f in Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all f: File | \n f in Protected implies f not in Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File |\n f not in Protected implies f in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File |\n lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n all f1, f2: File |\n f2 in f1.link implies f2 not in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n all f: File |\n no f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "doozy-karate-relish-dugout", "time": "2023-12-09 22:05:19.920052", "cmd": 7} {"id": 8961, "parent": 8960, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no f: File | f in Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all f: File | \n f in Protected implies f not in Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File |\n f not in Protected implies f in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File |\n lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n all f1, f2: File |\n f2 in f1.link implies f2 not in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n all f: File |\n no f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "shorty-strep-gangly-laurel", "time": "2023-12-09 22:05:23.101888", "cmd": 8} {"id": 8962, "parent": 8961, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no f: File | f in Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all f: File | \n f in Protected implies f not in Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File |\n f not in Protected implies f in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File |\n lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n all f1, f2: File |\n f2 in f1.link implies f2 not in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n all f: File |\n no f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n \n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "mossy-payee-croak-glitzy", "time": "2023-12-09 22:09:40.724486", "cmd": 8} {"id": 8963, "parent": 8962, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no f: File | f in Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all f: File | \n f in Protected implies f not in Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File |\n f not in Protected implies f in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File |\n lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n all f1, f2: File |\n f2 in f1.link implies f2 not in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n all f: File |\n no f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n \n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "jet-chance-rely-settle", "time": "2023-12-09 22:09:47.701613", "cmd": 6} {"id": 8964, "parent": 8963, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no f: File | f in Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all f: File | \n f in Protected implies f not in Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File |\n f not in Protected implies f in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File |\n lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n all f1, f2: File |\n f2 in f1.link implies f2 not in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n all f: File |\n no f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n all f1, f2, f3: File |\n f1 in f2.link implies f2 not in f3.link \n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "shaded-banish-entire-cartel", "time": "2023-12-09 22:20:58.894737", "cmd": 9} {"id": 8965, "parent": 8964, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no f: File | f in Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all f: File | \n f in Protected implies f not in Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File |\n f not in Protected implies f in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File |\n lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n all f1, f2: File |\n f2 in f1.link implies f2 not in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n all f: File |\n no f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n all f1, f2, f3: File |\n f1 in f2.link implies f2 not in f3.link \n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f1, f2 |\n f1 in f2.link and f1 in Trash \n implies f2 in Trash \n}\n\nrun inv10", "permalink": "detail-plant-karma-swivel", "time": "2023-12-09 22:23:09.933399", "cmd": 10} {"id": 8966, "parent": 8965, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no f: File | f in Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n all f: File | \n f in Protected implies f not in Trash\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all f: File |\n f not in Protected implies f in Trash\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File |\n lone f.link\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n all f1, f2: File |\n f2 in f1.link implies f2 not in Trash\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n all f: File |\n no f.link\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n all f1, f2, f3: File |\n f1 in f2.link implies f2 not in f3.link \n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f1, f2: File |\n f1 in f2.link and f1 in Trash \n implies f2 in Trash \n}\n\nrun inv10", "permalink": "sanded-mascot-graph-bootie", "time": "2023-12-09 22:23:29.587755", "cmd": 10} {"id": 8967, "parent": 8946, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\n-- 2: All teams finish winless\npred PolicyAllowsWin(r: Result, t: Team) {\n t in r.winner\n}\n\nassert allTeamWins{\n all r: Result, t: Team |\n PolicyAllowsWin[r, t]\n}\n\nrun onlyAwardWinningPlayer{}\nrun allTeamWins{}", "permalink": "unwed-colt-line-reward", "time": "2023-12-09 22:29:11.523473", "cmd": 2} {"id": 8968, "parent": 8967, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\n-- predicates\n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\n-- 2: All teams finish winless\npred PolicyAllowsWin(r: Result, t: Team) {\n t in r.winner\n}\n\nassert allTeamWins{\n all r: Result, t: Team |\n PolicyAllowsWin[r, t]\n}\n\nrun onlyAwardWinningPlayer{}\nrun allTeamWins{}", "permalink": "poster-granny-easel-itunes", "time": "2023-12-09 22:30:17.663117", "cmd": 1} {"id": 8969, "parent": 8968, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\n-- predicates\n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\n-- 2: All teams finish winless\npred PolicyAllowsWin(r: Result, t: Team) {\n t in r.winner\n}\n\nassert allTeamWins{\n all r: Result, t: Team |\n PolicyAllowsWin[r, t]\n}\n\nrun onlyAwardWinningPlayer{}\nrun allTeamWins{}", "permalink": "uphold-sporty-crafty-reseal", "time": "2023-12-09 22:34:13.448190", "cmd": 1} {"id": 8970, "parent": 8969, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\n-- predicates\n\n-- 1\n\n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\n-- 2: All teams finish winless\npred PolicyAllowsWin(r: Result, t: Team) {\n t in r.winner\n}\n\nassert allTeamWins{\n all r: Result, t: Team |\n PolicyAllowsWin[r, t]\n}\n\nrun onlyAwardWinningPlayer{}\nrun allTeamWins", "permalink": "brink-relic-creed-task", "time": "2023-12-09 22:35:06.196963", "cmd": 2} {"id": 8971, "parent": 8970, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\n-- predicates\n\n-- 1\n\n\n-- 1 - Player awarded must be from winning team\npred PolicyAllowsAward(p: Player, a: Award) {\n p in a.player_awarded\n}\n\nassert onlyAwardWinningPlayer{\n all p: Player, a: Award | PolicyAllowsAward[p, a] \n implies p \n in a.related_result.winner.players\n}\n\n-- 2: All teams wins\npred allTeamsWin {\n all t: Teams, r: Result | t in some \n}\n\nrun onlyAwardWinningPlayer{}\nrun allTeamWins", "permalink": "unrest-angler-nebula-buddy", "time": "2023-12-09 22:36:53.018994", "cmd": 2} {"id": 8972, "parent": 8971, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\n-- predicates\n\n-- 1: all teams should win\npred AllPlayersGetAward{\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\nrun onlyAwardWinningPlayer{}", "permalink": "deem-kiln-ahoy-impale", "time": "2023-12-09 22:41:24.152094", "cmd": 1} {"id": 8973, "parent": 8972, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\n-- predicates\n\n-- 1: all teams should win\npred AllPlayersGetAward{\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\nrun AllPlayersGetAward", "permalink": "glory-riot-ought-bungee", "time": "2023-12-09 22:41:40.178799", "cmd": 1} {"id": 8974, "parent": 8973, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\n-- predicates\n\n-- 1: all teams should win\npred AllPlayersGetAward{\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\nrun AllPlayersGetAward for 4", "permalink": "curry-chest-shriek-napped", "time": "2023-12-09 22:42:20.640278", "cmd": 1} {"id": 8975, "parent": 8974, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\n-- predicates\n\n-- 1: all teams should win\npred AllPlayersGetAward{\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\nrun AllPlayersGetAward for 4 Player", "permalink": "deputy-width-jimmy-glue", "time": "2023-12-09 22:42:31.849072", "cmd": 1} {"id": 8976, "parent": 8975, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\n-- predicates\n\n-- 1: all teams should win\npred AllPlayersGetAward{\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\nrun AllPlayersGetAward for 5", "permalink": "bonded-huddle-marine-acid", "time": "2023-12-09 22:42:49.323944", "cmd": 1} {"id": 8977, "parent": 8976, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\n-- predicates\n\n-- 1: all teams should win\npred AllPlayersGetAward{\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\ncheck AllPlayersGetAward\n\nrun AllPlayersGetAward", "permalink": "mummy-henna-secret-squeak", "time": "2023-12-09 22:43:08.354471", "cmd": 2} {"id": 8978, "parent": 8977, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\n-- predicates\n\n-- 1: all teams should win\npred AllPlayersGetAward{\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\ncheck AllPlayersGetAward\n\nrun AllPlayersGetAward", "permalink": "bully-uphill-second-pep", "time": "2023-12-09 22:43:16.316550", "cmd": 1} {"id": 8980, "parent": 8979, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\n-- predicates\n\n-- 1: all players get award\npred AllPlayersGetAward {\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\n-- 2: no team wins\npred NoTeamWins {\n all r: Result, t: Team |\n t not in r.winner\n}\n\nrun AllPlayersGetAward\nrun NoTeamWins", "permalink": "used-dodgy-keep-senior", "time": "2023-12-09 22:45:13.923477", "cmd": 2} {"id": 8981, "parent": 8980, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\n-- predicates\n\n-- 1: all players get award\npred AllPlayersGetAward {\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\n-- 2: no team wins\npred NoTeamWins {\n all r: Result, t: Team |\n t not in r.winner\n}\n\nrun AllPlayersGetAward\nrun NoTeamWins for 5 Result", "permalink": "afar-tingle-nearby-facial", "time": "2023-12-09 22:45:32.337797", "cmd": 1} {"id": 8982, "parent": 8981, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\n-- predicates\n\n-- 1: all players get award\npred AllPlayersGetAward {\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\n-- 2: no team wins\npred NoTeamWins {\n all r: Result, t: Team |\n t not in r.winner\n}\n\nrun AllPlayersGetAward\nrun NoTeamWins for 5 Result", "permalink": "pushy-deed-july-crop", "time": "2023-12-09 22:45:37.175770", "cmd": 2} {"id": 8984, "parent": 8983, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\nfact {\n all disj t: Team |\n some f: Fixture | t in f.team1 or t in f.team2\n}\n\n-- predicates\n\n-- 1: all players get award\npred AllPlayersGetAward {\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\n-- 2: no team wins\npred NoTeamWins {\n all r: Result, t: Team |\n t not in r.winner\n}\n\nrun AllPlayersGetAward\nrun NoTeamWins for 5", "permalink": "sulk-yoga-armful-slept", "time": "2023-12-09 22:50:29.460601", "cmd": 2} {"id": 8990, "parent": 8989, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: at least two teams\n some Team and (one Team)\n\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\nfact {\n all disj t: Team |\n some f: Fixture | t in f.team1 or t in f.team2\n}\n\nfact {\n all disj f: Fixture |\n some r: Result | f in r.related_fixture\n}\n\n-- predicates\n\n-- 1: all players get award\npred AllPlayersGetAward {\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\n-- 2: no team wins\npred NoTeamWins {\n all r: Result, t: Team |\n t not in r.winner\n}\n\nrun AllPlayersGetAward\nrun NoTeamWins\n\nrun {}", "permalink": "dodge-power-ravage-salsa", "time": "2023-12-09 22:53:08.188368", "cmd": 3} {"id": 8992, "parent": 8991, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\nfact {\n all disj t: Team |\n some f: Fixture | t in f.team1 or t in f.team2\n}\n\nfact {\n all disj f: Fixture |\n some r: Result | f in r.related_fixture\n}\n\n-- predicates\n\n-- 1: all players get award\npred AllPlayersGetAward {\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\n-- 2: no team wins\npred NoTeamWins {\n all r: Result, t: Team |\n t not in r.winner\n}\n\nrun AllPlayersGetAward\nrun NoTeamWins\n\nrun{}", "permalink": "jam-tipper-tusk-uproot", "time": "2023-12-09 22:53:41.306215", "cmd": 3} {"id": 8997, "parent": 8996, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\nfact {\n all disj t: Team |\n some f: Fixture | t in f.team1 or t in f.team2\n}\n\nfact {\n all disj f: Fixture |\n some r: Result | f in r.related_fixture\n}\n\n-- predicates\n\n-- 1: all players get award\npred AllPlayersGetAward {\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\n-- 2: no team wins\npred NoTeamWins {\n all r: Result, t: Team |\n t not in r.winner\n}\n\nrun AllPlayersGetAward\nrun NoTeamWins for 5\n\nrun{}", "permalink": "wrath-wilt-zippy-scroll", "time": "2023-12-09 22:55:40.874154", "cmd": 1} {"id": 8998, "parent": 8997, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsome sig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\nfact {\n all disj t: Team |\n some f: Fixture | t in f.team1 or t in f.team2\n}\n\nfact {\n all disj f: Fixture |\n some r: Result | f in r.related_fixture\n}\n\n-- predicates\n\n-- 1: all players get award\npred AllPlayersGetAward {\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\n-- 2: no team wins\npred NoTeamWins {\n all r: Result, t: Team |\n t not in r.winner\n}\n\nrun AllPlayersGetAward\nrun NoTeamWins for 5\n\nrun{}", "permalink": "skewer-yen-saved-letter", "time": "2023-12-09 22:55:55.595628", "cmd": 1} {"id": 9000, "parent": 8999, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsome sig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\nfact {\n all disj t: Team |\n some f: Fixture | t in f.team1 or t in f.team2\n}\n\nfact {\n all disj f: Fixture |\n some r: Result | f in r.related_fixture\n}\n\n-- predicates\n\n-- 1: all players get award\npred AllPlayersGetAward {\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\n-- 2: no team wins\npred NoTeamWins {\n all r: Result, t: Team |\n t not in r.winner\n}\n\nrun AllPlayersGetAward\nrun NoTeamWins\n\nrun{}", "permalink": "tutor-saved-rising-cough", "time": "2023-12-09 22:56:11.413088", "cmd": 2} {"id": 9001, "parent": 9000, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsome sig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\nfact {\n all disj t: Team |\n some f: Fixture | t in f.team1 or t in f.team2\n}\n\nfact {\n all disj f: Fixture |\n some r: Result | f in r.related_fixture\n}\n\n-- predicates\n\n-- 1: all players get award\npred AllPlayersGetAward {\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\n-- 2: no team wins\npred NoTeamWins {\n all r: Result, t: Team |\n t not in r.winner\n}\n\nrun AllPlayersGetAward\nrun NoTeamWins", "permalink": "saline-phony-dolly-driver", "time": "2023-12-09 22:56:17.481369", "cmd": 1} {"id": 9002, "parent": 9001, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsome sig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\nfact {\n all disj t: Team |\n some f: Fixture | t in f.team1 or t in f.team2\n}\n\nfact {\n all disj f: Fixture |\n some r: Result | f in r.related_fixture\n}\n\n-- predicates\n\n-- 1: all players get award\npred AllPlayersGetAward {\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\n-- 2: no team wins\npred NoTeamWins {\n all r: Result, t: Team |\n t not in r.winner\n}\n\nrun AllPlayersGetAward\nrun NoTeamWins", "permalink": "flaky-earthy-ragged-saloon", "time": "2023-12-09 22:58:51.727248", "cmd": 1} {"id": 9005, "parent": 9004, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsome sig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\nfact {\n all disj t: Team |\n some f: Fixture | t in f.team1 or t in f.team2\n}\n\nfact {\n all disj f: Fixture |\n some r: Result | f in r.related_fixture\n}\n\n-- predicates\n\n-- 1: all players get award\npred AllPlayersGetAward {\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\n-- 2: no team wins\npred NoTeamWins {\n all r: Result, t: Team |\n t not in r.winner\n}\n\nrun AllPlayersGetAward\nrun NoTeamWins", "permalink": "itunes-rarity-doing-gore", "time": "2023-12-09 23:02:27.249364", "cmd": 2} {"id": 9006, "parent": 9005, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsome sig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\nfact {\n all disj t: Team |\n some f: Fixture | t in f.team1 or t in f.team2\n}\n\nfact {\n all disj f: Fixture |\n some r: Result | f in r.related_fixture\n}\n\n-- predicates\n\n-- 1: all players get award\npred AllPlayersGetAward {\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\n-- 2: no team wins\npred NoTeamWins {\n all r: Result, t: Team |\n t not in r.winner\n}\n\nrun NoTeamWins\nrun AllPlayersGetAward", "permalink": "drippy-drift-sturdy-coffee", "time": "2023-12-09 23:03:38.472196", "cmd": 1} {"id": 9009, "parent": 9008, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player extends Person {}\n\nsome sig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\nfact {\n all disj t: Team |\n some f: Fixture | t in f.team1 or t in f.team2\n}\n\nfact {\n all disj f: Fixture |\n some r: Result | f in r.related_fixture\n}\n\n-- predicates\n\n-- 1: all players get award\npred AllPlayersGetAward {\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\n-- 2: no team wins\npred NoTeamWins {\n all r: Result, t: Team |\n t not in r.winner\n}\n\nrun NoTeamWins\nrun AllPlayersGetAward", "permalink": "acting-strict-annex-lash", "time": "2023-12-09 23:04:32.139388", "cmd": 1} {"id": 9014, "parent": 9013, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player in Person {}\n\nsome sig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\nfact {\n all disj t: Team |\n some f: Fixture | t in f.team1 or t in f.team2\n}\n\nfact {\n all disj f: Fixture |\n some r: Result | f in r.related_fixture\n}\n\n-- predicates\n\n-- 1: all players get award\npred AllPlayersGetAward {\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\n-- 2: no team wins\npred NoTeamWins {\n all r: Result, t: Team |\n t not in r.winner\n}\n\nrun NoTeamWins\nrun AllPlayersGetAward\nrun {}", "permalink": "caddie-sliced-ample-angled", "time": "2023-12-09 23:05:35.897477", "cmd": 2} {"id": 9021, "parent": 6977, "code": "one sig List {\n header: lone Node \n} \nsig Node {\n link: lone Node \n}\nfact noDanglingNodes {\n Node in List.header.*link\n}\n\nrun { all n : List.header.*link | no n.link } for 3", "permalink": "unsold-liquid-zesty-halved", "time": "2023-12-10 12:14:39.844192", "cmd": 1} {"id": 9029, "parent": null, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3", "permalink": "wad-dense-greedy-mating", "time": "2023-12-10 19:23:03.464443", "cmd": 1} {"id": 9037, "parent": 9036, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\n// fact {\n// !(no List and no Node)\n// }\nrun {no List and no Node} for 3\nrun {! List} for 3", "permalink": "carat-punch-wasabi-avid", "time": "2023-12-10 19:33:12.572262", "cmd": 2} {"id": 9039, "parent": 9038, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\n// fact {\n// !(no List and no Node)\n// }\nrun {no List and no Node} for 3\nrun {List} for 3", "permalink": "record-large-appear-shone", "time": "2023-12-10 19:33:50.042602", "cmd": 2} {"id": 9043, "parent": 9042, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\n// fact {\n// !(no List and no Node)\n// }\nrun {no List and no Node} for 3\nrun {no Node} for 3", "permalink": "shabby-carry-scone-lying", "time": "2023-12-10 19:35:57.875765", "cmd": 2} {"id": 9045, "parent": 9044, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\nfact {\n (no List and no Node)\n}\nrun {no List and no Node} for 3\nrun {some Node} for 3", "permalink": "unit-gory-clock-aorta", "time": "2023-12-10 19:38:28.728358", "cmd": 2} {"id": 9049, "parent": 9048, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\nfact {\n (no List and no Node)\n}\nrun {no List and no Node} for 3\nrun {no List} for 3", "permalink": "purity-never-affix-pogo", "time": "2023-12-10 19:39:14.849396", "cmd": 2} {"id": 9050, "parent": 9049, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\nfact {\n (no List and no Node)\n}\nrun {no List and no Node} for 3\nrun {List} for 3", "permalink": "ritzy-portal-attic-filing", "time": "2023-12-10 19:56:10.166221", "cmd": 2} {"id": 9051, "parent": 9050, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\nfact {\n (no List and no Node)\n}\nrun {no List and no Node} for 3\nrun {} for 3", "permalink": "void-video-apple-arson", "time": "2023-12-10 19:56:17.671412", "cmd": 2} {"id": 9057, "parent": 9056, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3\n\nrun {no Node} for 3 ", "permalink": "eaten-rake-drone-backer", "time": "2023-12-10 21:10:52.774080", "cmd": 2} {"id": 9091, "parent": null, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List and no List} for 3", "permalink": "levers-haste-entity-relax", "time": "2023-12-10 22:24:28.741969", "cmd": 1} {"id": 9102, "parent": 9101, "code": "module houses\n\nabstract sig House {\n major: one Major,\n color: one Color,\n}\n\none sig H1, H2, H3 extends House {}\n\nenum Major {\n Math, Phil, CS\n}\n\nenum Color {\n Blue, Red, White\n}\n\nfact {\n // all majors are in/linked by some house\n Major in House.major\n // all colors are on/used by some house\n Color in House.color\n \n // The philosophy major lives directly to the right of the red house.\n (H1.color = Red and H2.major = Phil) or ((H2.color = Red and H3.major = Phil))\n //The computer science major lives in the blue house.\n some h : House | h.color = Blue and h.major = CS\n //The math major lives in house 2.\n H2.major = Math \n}\n\nrun {one Math} for 3", "permalink": "blimp-tingle-angles-savor", "time": "2023-12-11 18:45:54.629624", "cmd": 1} {"id": 9103, "parent": null, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3", "permalink": "lusty-public-heap-matrix", "time": "2023-12-11 18:47:06.164095", "cmd": 1} {"id": 9104, "parent": 9103, "code": "sig List { \n header: lone Node } \nsig Node { \n link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3", "permalink": "anyhow-union-raisin-partly", "time": "2023-12-11 18:47:22.462604", "cmd": 1} {"id": 9106, "parent": 9105, "code": "sig List { \n header: lone Node } \nsig Node { \n link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {} for 3 but 3 Node", "permalink": "geiger-stingy-frown-film", "time": "2023-12-11 18:49:31.468812", "cmd": 1} {"id": 9108, "parent": 9107, "code": "one sig List { \n header: lone Node } \nsig Node { \n link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {} for 3 but 0 Node", "permalink": "unfair-naming-chest-goal", "time": "2023-12-11 18:50:01.881110", "cmd": 1} {"id": 9115, "parent": 9114, "code": "module houses\n\nabstract sig House {\n major: one Major,\n color: one Color,\n}\n\none sig H1, H2, H3 extends House {}\n\nenum Major {\n Math, Phil, CS\n}\n\nenum Color {\n Blue, Red, White\n}\n\nfact {\n // all majors are in/linked by some house\n Major in House.major\n // all colors are on/used by some house\n Color in House.color\n \n // The philosophy major lives directly to the right of the red house.\n (H1.color = Red and H2.major = Phil) or ((H2.color = Red and H3.major = Phil))\n //The computer science major lives in the blue house.\n some h : House | h.color = Blue and h.major = CS\n //The math major lives in house 2.\n H2.major = Math \n}\nrun{} for 3\nrun {one Math} for 3", "permalink": "bunion-kindly-delay-shine", "time": "2023-12-11 19:50:30.635928", "cmd": 2} {"id": 9119, "parent": 9118, "code": "module houses\n\nabstract sig House {\n major: one Major,\n color: one Color,\n}\n\none sig H1, H2, H3 extends House {}\n\nenum Major {\n Math, Phil, CS\n}\n\nenum Color {\n Blue, Red, White\n}\n\nfact {\n // all majors are in/linked by some house\n Major in House.major\n // all colors are on/used by some house\n Color in House.color\n \n // The philosophy major lives directly to the right of the red house.\n (H1.color = Red and H2.major = Phil) or ((H2.color = Red and H3.major = Phil))\n //The computer science major lives in the blue house.\n some h : House | h.color = Blue and h.major = CS\n //The math major lives in house 2.\n H2.major = Math \n}\nrun{} for 3 but exactly 0 Math\nrun {no Math} for 3", "permalink": "chaste-stout-yarn-polo", "time": "2023-12-11 19:51:25.678003", "cmd": 1} {"id": 8983, "parent": 8982, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\n-- predicates\n\n-- 1: all players get award\npred AllPlayersGetAward {\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\n-- 2: no team wins\npred NoTeamWins {\n all r: Result, t: Team |\n t not in r.winner\n}\n\nrun AllPlayersGetAward\nrun NoTeamWins for 5", "permalink": "data-laurel-other-askew", "time": "2023-12-09 22:47:17.199847", "cmd": 2} {"id": 8988, "parent": 8987, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: at least two teams\n some Team and (one Team)\n\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\nfact {\n all disj t: Team |\n some f: Fixture | t in f.team1 or t in f.team2\n}\n\nfact {\n all disj f: Fixture |\n some r: Result | f in r.related_fixture\n}\n\n-- predicates\n\n-- 1: all players get award\npred AllPlayersGetAward {\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\n-- 2: no team wins\npred NoTeamWins {\n all r: Result, t: Team |\n t not in r.winner\n}\n\nrun AllPlayersGetAward\nrun NoTeamWins", "permalink": "chair-early-giving-curry", "time": "2023-12-09 22:52:58.733981", "cmd": 2} {"id": 8991, "parent": 8990, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: at least two teams\n some Team and (one Team)\n\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\nfact {\n all disj t: Team |\n some f: Fixture | t in f.team1 or t in f.team2\n}\n\nfact {\n all disj f: Fixture |\n some r: Result | f in r.related_fixture\n}\n\n-- predicates\n\n-- 1: all players get award\npred AllPlayersGetAward {\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\n-- 2: no team wins\npred NoTeamWins {\n all r: Result, t: Team |\n t not in r.winner\n}\n\nrun AllPlayersGetAward\nrun NoTeamWins\n\nrun{}", "permalink": "taste-expand-left-revise", "time": "2023-12-09 22:53:15.518881", "cmd": 3} {"id": 8993, "parent": 8992, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\nfact {\n all disj t: Team |\n some f: Fixture | t in f.team1 or t in f.team2\n}\n\nfact {\n all disj f: Fixture |\n some r: Result | f in r.related_fixture\n}\n\n-- predicates\n\n-- 1: all players get award\npred AllPlayersGetAward {\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\n-- 2: no team wins\npred NoTeamWins {\n all r: Result, t: Team |\n t not in r.winner\n}\n\nrun AllPlayersGetAward\nrun NoTeamWins\n\nrun{}", "permalink": "spider-sleek-sublet-cringe", "time": "2023-12-09 22:53:48.211448", "cmd": 1} {"id": 8999, "parent": 8998, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsome sig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\nfact {\n all disj t: Team |\n some f: Fixture | t in f.team1 or t in f.team2\n}\n\nfact {\n all disj f: Fixture |\n some r: Result | f in r.related_fixture\n}\n\n-- predicates\n\n-- 1: all players get award\npred AllPlayersGetAward {\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\n-- 2: no team wins\npred NoTeamWins {\n all r: Result, t: Team |\n t not in r.winner\n}\n\nrun AllPlayersGetAward\nrun NoTeamWins for 5\n\nrun{}", "permalink": "reason-docile-region-helium", "time": "2023-12-09 22:56:06.906603", "cmd": 2} {"id": 9013, "parent": 9012, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player extends Person {}\n\nsome sig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\nfact {\n all disj t: Team |\n some f: Fixture | t in f.team1 or t in f.team2\n}\n\nfact {\n all disj f: Fixture |\n some r: Result | f in r.related_fixture\n}\n\n-- predicates\n\n-- 1: all players get award\npred AllPlayersGetAward {\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\n-- 2: no team wins\npred NoTeamWins {\n all r: Result, t: Team |\n t not in r.winner\n}\n\nrun NoTeamWins\nrun AllPlayersGetAward\nrun {}", "permalink": "cone-pang-dried-used", "time": "2023-12-09 23:05:24.027119", "cmd": 2} {"id": 9016, "parent": 9015, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player in Person {}\n\nsome sig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\nfact {\n all disj t: Team |\n some f: Fixture | t in f.team1 or t in f.team2\n}\n\nfact {\n all disj f: Fixture |\n some r: Result | f in r.related_fixture\n}\n\n-- predicates\n\n-- 1: all players get award\npred AllPlayersGetAward {\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\n-- 2: no team wins\npred NoTeamWins {\n all r: Result, t: Team |\n t not in r.winner\n}\n\nrun NoTeamWins\nrun AllPlayersGetAward\nrun {}", "permalink": "supper-delay-curvy-basket", "time": "2023-12-09 23:05:46.662799", "cmd": 3} {"id": 9017, "parent": 9016, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player in Person {}\n\nsome sig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\nfact {\n all disj t: Team |\n some f: Fixture | t in f.team1 or t in f.team2\n}\n\nfact {\n all disj f: Fixture |\n some r: Result | f in r.related_fixture\n}\n\n-- predicates\n\n-- 1: all players get award\npred AllPlayersGetAward {\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\n-- 2: no team wins\npred NoTeamWins {\n all r: Result, t: Team |\n t not in r.winner\n}\n\nrun NoTeamWins\nrun AllPlayersGetAward", "permalink": "croon-candle-cavity-gecko", "time": "2023-12-09 23:06:05.866356", "cmd": 1} {"id": 9022, "parent": null, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3", "permalink": "zippy-stuffy-mouse-affix", "time": "2023-12-10 12:21:43.293666", "cmd": 1} {"id": 9026, "parent": 9025, "code": "// sig List { header: lone Node } \n// sig Node { link: lone Node }\n// run {no List and no Node} for 3\n\nsig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3", "permalink": "pester-dealer-humvee-caddie", "time": "2023-12-10 15:42:40.322507", "cmd": 1} {"id": 9028, "parent": 9027, "code": "abstract sig Color {}\none sig Red, Yellow, Green extends Color {}\nfun colorSequence: Color -> Color {\n Color <: iden + Red -> Green + Green -> Yellow + Yellow -> Red\n}\n\nrun{}", "permalink": "voyage-willed-boots-throng", "time": "2023-12-10 16:34:12.222674", "cmd": 1} {"id": 9032, "parent": 9031, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\nfact {\n no(no List and no Node)\n}\n// run {no List and no Node} for 3\nrun {} for 3", "permalink": "flatly-septum-quirk-envoy", "time": "2023-12-10 19:26:52.874379", "cmd": 1} {"id": 9033, "parent": 9032, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\nfact {\n !(no List and no Node)\n}\n// run {no List and no Node} for 3\nrun {} for 3", "permalink": "thud-neuron-strep-ditzy", "time": "2023-12-10 19:27:00.614616", "cmd": 1} {"id": 9035, "parent": 9034, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\nfact {\n !(no List and no Node)\n}\nrun {no List and no Node} for 3\n// run {} for 3", "permalink": "mumble-catchy-padded-tartly", "time": "2023-12-10 19:32:33.012802", "cmd": 2} {"id": 9036, "parent": 9035, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\nfact {\n !(no List and no Node)\n}\nrun {no List and no Node} for 3\nrun {} for 3", "permalink": "small-ditch-proved-gusto", "time": "2023-12-10 19:32:37.290810", "cmd": 2} {"id": 9038, "parent": 9037, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\n// fact {\n// !(no List and no Node)\n// }\nrun {no List and no Node} for 3\nrun {no List} for 3", "permalink": "wing-accent-matter-walrus", "time": "2023-12-10 19:33:19.601922", "cmd": 2} {"id": 9044, "parent": 9043, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\n// fact {\n// !(no List and no Node)\n// }\nrun {no List and no Node} for 3\nrun {some Node} for 3", "permalink": "resend-bash-iron-frenzy", "time": "2023-12-10 19:38:12.923703", "cmd": 2} {"id": 9078, "parent": null, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "prissy-gear-jeep-dandy", "time": "2023-12-10 21:54:20.715807", "cmd": 1} {"id": 9093, "parent": 9092, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List and some Node} for 3", "permalink": "occupy-salon-squall-rinse", "time": "2023-12-10 22:27:12.503368", "cmd": 1} {"id": 9105, "parent": 9104, "code": "sig List { \n header: lone Node } \nsig Node { \n link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {} for 3 but 1 Node", "permalink": "cymbal-hurray-zodiac-prefix", "time": "2023-12-11 18:48:46.431424", "cmd": 1} {"id": 9117, "parent": 9116, "code": "module houses\n\nabstract sig House {\n major: one Major,\n color: one Color,\n}\n\none sig H1, H2, H3 extends House {}\n\nenum Major {\n Math, Phil, CS\n}\n\nenum Color {\n Blue, Red, White\n}\n\nfact {\n // all majors are in/linked by some house\n Major in House.major\n // all colors are on/used by some house\n Color in House.color\n \n // The philosophy major lives directly to the right of the red house.\n (H1.color = Red and H2.major = Phil) or ((H2.color = Red and H3.major = Phil))\n //The computer science major lives in the blue house.\n some h : House | h.color = Blue and h.major = CS\n //The math major lives in house 2.\n H2.major = Math \n}\nrun{} for 3 but exactly 0 Math\nrun {no Math} for 3", "permalink": "poet-compel-dust-slit", "time": "2023-12-11 19:50:54.104913", "cmd": 1} {"id": 9118, "parent": 9117, "code": "module houses\n\nabstract sig House {\n major: one Major,\n color: one Color,\n}\n\none sig H1, H2, H3 extends House {}\n\nenum Major {\n Math, Phil, CS\n}\n\nenum Color {\n Blue, Red, White\n}\n\nfact {\n // all majors are in/linked by some house\n Major in House.major\n // all colors are on/used by some house\n Color in House.color\n \n // The philosophy major lives directly to the right of the red house.\n (H1.color = Red and H2.major = Phil) or ((H2.color = Red and H3.major = Phil))\n //The computer science major lives in the blue house.\n some h : House | h.color = Blue and h.major = CS\n //The math major lives in house 2.\n H2.major = Math \n}\nrun{} for 3 but exactly 0 Math\nrun {no Math} for 3", "permalink": "choosy-cancel-wolf-froth", "time": "2023-12-11 19:51:24.197851", "cmd": 2} {"id": 9235, "parent": 9234, "code": "// A Person can be either a Student or a Professor.\nsig User {}\n\n\nrun {} for 2", "permalink": "defile-wager-gap-scope", "time": "2023-12-15 21:57:21.026017", "cmd": 1} {"id": 9239, "parent": 9238, "code": "// A Person can be either a Student or a Professor.\nsig User {\n friends: set User\n}\n\n\nrun {} for 4", "permalink": "cough-yahoo-random-rewrap", "time": "2023-12-15 22:00:04.281101", "cmd": 1} {"id": 9248, "parent": null, "code": "sig A{}\n\npred testpredic()\n\nrun {}", "permalink": "faucet-mummy-floss-ground", "time": "2023-12-16 16:21:10.344014", "cmd": 1} {"id": 9251, "parent": 9250, "code": "sig A{}\n\npred testpredic{}\n\nrun testpredic for 2", "permalink": "worst-thigh-grief-deem", "time": "2023-12-16 16:21:46.668111", "cmd": 1} {"id": 9252, "parent": 9251, "code": "sig A{}\n\npred testpredic{\n #A > 0 \n}\n\nrun testpredic for 2", "permalink": "pagan-tile-chevy-random", "time": "2023-12-16 16:22:10.723899", "cmd": 1} {"id": 9258, "parent": 9257, "code": "// University Model\n\n// Signatures\nabstract sig Person { name: String, age: Int }\n\nsig Student extends Person { studentID: Int, major: String, enrolledCourses: set Course }\n\nsig Professor extends Person { staffID: Int, department: String, teaches: set Course }\n\nsig Course { courseCode: String, credits: Int }\n\nsig Classroom { roomNumber: Int, capacity: Int }\n\n// Inheritance\n// fact StudentsArePeople { all s: Student | s in Person }\nfact professorArePerson { all p: Professor | p in Person }\n\n// Facts\nfact CoursesHaveUniqueCodes { all disj c1, c2: Course | c1.courseCode != c2.courseCode }\n\n// Predicates\npred TeachingCapacity[p: Professor, c: Course, r: Classroom] {\n some room: r | room.capacity > 30 \n}\n\n\n\npred EnrolledStudents {\n all c: Course | some s: Student | s.major = \"Computer Science\" and c in s.enrolledCourses\n}\n\n // This run command is unsatisfiable\nrun {\n\n some p: Professor | no c: Course | c in p.teaches\n} for 5 \n\n// This run command is satisfiable\nrun {\n some s: Student, c: Course, p: Professor, r: Classroom \n s.major = \"Computer Science\" and c in s.enrolledCourses and TeachingCapacity[p, c, r] and EnrolledStudents\n} for 5 but exactly 2 Student, 2 Course, 2 Professor, 2 Classroom\n\n// run{}", "permalink": "myth-diaper-rover-untidy", "time": "2023-12-16 17:00:45.535197", "cmd": 2} {"id": 9260, "parent": 9259, "code": "// University Model\n\n// Signatures\nabstract sig Person { name: String, age: Int }\n\nsig Student extends Person { studentID: Int, major: String, enrolledCourses: set Course }\n\nsig Professor extends Person { staffID: Int, department: String, teaches: set Course }\n\nsig Course { courseCode: String, credits: Int }\n\nsig Classroom { roomNumber: Int, capacity: Int }\n\n// Inheritance\n// fact StudentsArePeople { all s: Student | s in Person }\nfact professorArePerson { all p: Professor | p in Person }\n\n// Facts\nfact CoursesHaveUniqueCodes { all disj c1, c2: Course | c1.courseCode != c2.courseCode }\n\n// Predicates\npred TeachingCapacity[p: Professor, c: Course, r: Classroom] {\n some room: r | room.capacity > 30 \n}\n\n\n\npred EnrolledStudents {\n all c: Course | some s: Student | s.major = \"Computer Science\" and c in s.enrolledCourses\n}\n\n // This run command is unsatisfiable\nrun {\n\n some p: Professor | no c: Course | c in p.teaches\n} for 5 \n\n// This run command is satisfiable\nrun {\n some s: Student, c: Course, p: Professor, r: Classroom s.major = \"Computer Science\" and c in s.enrolledCourses and TeachingCapacity[p, c, r] and EnrolledStudents\n} for 5 but exactly 2 Student, 2 Course, 2 Professor, 2 Classroom\n \n// run{}", "permalink": "shrimp-theme-wafer-sloped", "time": "2023-12-16 17:01:05.359788", "cmd": 2} {"id": 9452, "parent": 9447, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n one Puppy or one Doll and one PS5 or one Xbox\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n one Puppy implies one DogBasket and one Ball\n // If I get the doll, I want dresses for the doll and the PS5 Barbie game.\n one Doll implies one Dresses and one BarbieGame\n\n // If I get the puppy, I don’t want the PS5 since only the Xbox has the dog game I want in that case.\n one Puppy and one Xbox implies no PS5\n\n // Only if I get the doll, I want a dollhouse.\n one Doll implies one DollHouse\n\n}\n\nrun wishes for 1", "permalink": "silo-census-nervy-stole", "time": "2023-12-19 08:55:59.914693", "cmd": 1} {"id": 8985, "parent": 8984, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\nfact {\n all disj t: Team |\n some f: Fixture | t in f.team1 or t in f.team2\n}\n\nfact {\n all disj f: Fixture |\n some r: Result | f in r.related_fixture\n}\n\n-- predicates\n\n-- 1: all players get award\npred AllPlayersGetAward {\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\n-- 2: no team wins\npred NoTeamWins {\n all r: Result, t: Team |\n t not in r.winner\n}\n\nrun AllPlayersGetAward\nrun NoTeamWins for 5", "permalink": "bobcat-sheep-deck-lunacy", "time": "2023-12-09 22:51:21.765391", "cmd": 2} {"id": 8987, "parent": 8986, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: at least two teams\n some Team and (one Team)\n\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\nfact {\n all disj t: Team |\n some f: Fixture | t in f.team1 or t in f.team2\n}\n\nfact {\n all disj f: Fixture |\n some r: Result | f in r.related_fixture\n}\n\n-- predicates\n\n-- 1: all players get award\npred AllPlayersGetAward {\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\n-- 2: no team wins\npred NoTeamWins {\n all r: Result, t: Team |\n t not in r.winner\n}\n\nrun AllPlayersGetAward\nrun NoTeamWins for 5", "permalink": "gore-fiber-drew-curse", "time": "2023-12-09 22:52:47.542548", "cmd": 1} {"id": 8989, "parent": 8988, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: at least two teams\n some Team and (one Team)\n\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\nfact {\n all disj t: Team |\n some f: Fixture | t in f.team1 or t in f.team2\n}\n\nfact {\n all disj f: Fixture |\n some r: Result | f in r.related_fixture\n}\n\n-- predicates\n\n-- 1: all players get award\npred AllPlayersGetAward {\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\n-- 2: no team wins\npred NoTeamWins {\n all r: Result, t: Team |\n t not in r.winner\n}\n\nrun AllPlayersGetAward\nrun NoTeamWins\n\nrun {}", "permalink": "folic-reborn-jumbo-shelf", "time": "2023-12-09 22:53:04.010498", "cmd": 2} {"id": 8995, "parent": 8994, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\nfact {\n all disj t: Team |\n some f: Fixture | t in f.team1 or t in f.team2\n}\n\nfact {\n all disj f: Fixture |\n some r: Result | f in r.related_fixture\n}\n\n-- predicates\n\n-- 1: all players get award\npred AllPlayersGetAward {\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\n-- 2: no team wins\npred NoTeamWins {\n all r: Result, t: Team |\n t not in r.winner\n}\n\nrun AllPlayersGetAward\nrun NoTeamWins for 3\n\nrun{}", "permalink": "igloo-eleven-motor-exes", "time": "2023-12-09 22:54:53.354274", "cmd": 2} {"id": 8996, "parent": 8995, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\nfact {\n all disj t: Team |\n some f: Fixture | t in f.team1 or t in f.team2\n}\n\nfact {\n all disj f: Fixture |\n some r: Result | f in r.related_fixture\n}\n\n-- predicates\n\n-- 1: all players get award\npred AllPlayersGetAward {\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\n-- 2: no team wins\npred NoTeamWins {\n all r: Result, t: Team |\n t not in r.winner\n}\n\nrun AllPlayersGetAward\nrun NoTeamWins for 5\n\nrun{}", "permalink": "disarm-quill-humbly-cocoa", "time": "2023-12-09 22:55:02.596061", "cmd": 2} {"id": 9003, "parent": 9002, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsome sig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\nfact {\n all disj t: Team |\n some f: Fixture | t in f.team1 or t in f.team2\n}\n\nfact {\n all disj f: Fixture |\n some r: Result | f in r.related_fixture\n}\n\n-- predicates\n\n-- 1: all players get award\npred AllPlayersGetAward {\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\n-- 2: no team wins\npred NoTeamWins {\n all r: Result, t: Team |\n t not in r.winner\n}\n\nrun AllPlayersGetAward\nrun NoTeamWins", "permalink": "urging-tried-jumble-spoils", "time": "2023-12-09 22:58:54.748111", "cmd": 2} {"id": 9004, "parent": 9003, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsome sig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\nfact {\n all disj t: Team |\n some f: Fixture | t in f.team1 or t in f.team2\n}\n\nfact {\n all disj f: Fixture |\n some r: Result | f in r.related_fixture\n}\n\n-- predicates\n\n-- 1: all players get award\npred AllPlayersGetAward {\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\n-- 2: no team wins\npred NoTeamWins {\n all r: Result, t: Team |\n t not in r.winner\n}\n\nrun AllPlayersGetAward\nrun NoTeamWins", "permalink": "rented-region-sleek-java", "time": "2023-12-09 22:59:04.420355", "cmd": 1} {"id": 9008, "parent": 9007, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player extends Person {}\n\nsome sig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\nfact {\n all disj t: Team |\n some f: Fixture | t in f.team1 or t in f.team2\n}\n\nfact {\n all disj f: Fixture |\n some r: Result | f in r.related_fixture\n}\n\n-- predicates\n\n-- 1: all players get award\npred AllPlayersGetAward {\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\n-- 2: no team wins\npred NoTeamWins {\n all r: Result, t: Team |\n t not in r.winner\n}\n\nrun NoTeamWins\nrun AllPlayersGetAward", "permalink": "canyon-sedate-amino-hefty", "time": "2023-12-09 23:04:15.256047", "cmd": 2} {"id": 9010, "parent": 9009, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player extends Person {}\n\nsome sig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\nfact {\n all disj t: Team |\n some f: Fixture | t in f.team1 or t in f.team2\n}\n\nfact {\n all disj f: Fixture |\n some r: Result | f in r.related_fixture\n}\n\n-- predicates\n\n-- 1: all players get award\npred AllPlayersGetAward {\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\n-- 2: no team wins\npred NoTeamWins {\n all r: Result, t: Team |\n t not in r.winner\n}\n\nrun NoTeamWins\nrun AllPlayersGetAward", "permalink": "shrunk-fling-crazed-hungry", "time": "2023-12-09 23:04:35.097038", "cmd": 2} {"id": 9011, "parent": 9010, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player extends Person {}\n\nsome sig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\nfact {\n all disj t: Team |\n some f: Fixture | t in f.team1 or t in f.team2\n}\n\nfact {\n all disj f: Fixture |\n some r: Result | f in r.related_fixture\n}\n\n-- predicates\n\n-- 1: all players get award\npred AllPlayersGetAward {\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\n-- 2: no team wins\npred NoTeamWins {\n all r: Result, t: Team |\n t not in r.winner\n}\n\nrun NoTeamWins\nrun AllPlayersGetAward\nrun {}", "permalink": "worry-ripple-script-resend", "time": "2023-12-09 23:05:17.648889", "cmd": 1} {"id": 9012, "parent": 9011, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player extends Person {}\n\nsome sig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\nfact {\n all disj t: Team |\n some f: Fixture | t in f.team1 or t in f.team2\n}\n\nfact {\n all disj f: Fixture |\n some r: Result | f in r.related_fixture\n}\n\n-- predicates\n\n-- 1: all players get award\npred AllPlayersGetAward {\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\n-- 2: no team wins\npred NoTeamWins {\n all r: Result, t: Team |\n t not in r.winner\n}\n\nrun NoTeamWins\nrun AllPlayersGetAward\nrun {}", "permalink": "bulge-argue-rubble-ovary", "time": "2023-12-09 23:05:20.715846", "cmd": 3} {"id": 9023, "parent": 9022, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3", "permalink": "grower-same-map-flirt", "time": "2023-12-10 12:23:00.873426", "cmd": 1} {"id": 9024, "parent": 9023, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3", "permalink": "zombie-stomp-thee-runny", "time": "2023-12-10 12:23:15.106512", "cmd": 1} {"id": 9027, "parent": null, "code": "abstract sig Color {}\none sig Red, Yellow, Green extends Color {}\nfun colorSequence: Color -> Color {\nColor <: iden + Red -> Green + Green -> Yellow + Yellow -> Red\n}\n\nrun{}", "permalink": "pueblo-legged-motor-shrank", "time": "2023-12-10 16:32:22.712146", "cmd": 1} {"id": 9030, "parent": null, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\nrun {no List and no Node} for 3", "permalink": "harsh-plod-outfit-ladle", "time": "2023-12-10 19:25:22.960976", "cmd": 1} {"id": 9031, "parent": 9030, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\nfact {\n no List and no Node\n}\n// run {no List and no Node} for 3\nrun {} for 3", "permalink": "unzip-feed-spiral-dugout", "time": "2023-12-10 19:26:37.141107", "cmd": 1} {"id": 9034, "parent": 9033, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\nfact {\n !(no List and no Node)\n}\nrun {no List and no Node} for 3\n// run {} for 3", "permalink": "urging-boxing-sled-acid", "time": "2023-12-10 19:32:29.286652", "cmd": 1} {"id": 9040, "parent": 9039, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\n// fact {\n// !(no List and no Node)\n// }\nrun {no List and no Node} for 3\nrun {} for 3", "permalink": "cross-pounce-sudden-repose", "time": "2023-12-10 19:34:02.581491", "cmd": 1} {"id": 9046, "parent": 9045, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\nfact {\n (no List and no Node)\n}\nrun {no List and no Node} for 3\nrun {no Node} for 3", "permalink": "uneasy-mammal-muster-swept", "time": "2023-12-10 19:38:37.680818", "cmd": 2} {"id": 9052, "parent": 9029, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\n\nfact {\n no List\n}\nrun {no List} for 3", "permalink": "early-asleep-vacate-cyclic", "time": "2023-12-10 20:29:26.263635", "cmd": 1} {"id": 9053, "parent": 9052, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\n\nfact {\n no List\n}\nrun {no List} for 3\n\nrun {no Node}", "permalink": "porous-cartel-skewed-roster", "time": "2023-12-10 20:29:44.489692", "cmd": 2} {"id": 9056, "parent": 9055, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3\n\nrun {no Node} for 3", "permalink": "bronze-ozone-crate-filler", "time": "2023-12-10 20:48:52.138540", "cmd": 2} {"id": 9058, "parent": 9057, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3\n\nrun {no List} for 3 ", "permalink": "shone-recoil-gooey-plot", "time": "2023-12-10 21:16:44.582916", "cmd": 2} {"id": 9092, "parent": 9091, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List and no Node} for 3", "permalink": "motive-sprite-neuter-hacked", "time": "2023-12-10 22:24:36.044018", "cmd": 1} {"id": 9094, "parent": 9093, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List and some List} for 3", "permalink": "snuff-script-stash-blog", "time": "2023-12-10 22:27:20.733713", "cmd": 1} {"id": 9113, "parent": 9112, "code": "module houses\n\nabstract sig House {\n major: one Major,\n color: one Color,\n}\n\none sig H1, H2, H3 extends House {}\n\nenum Major {\n Math, Phil, CS\n}\n\nenum Color {\n Blue, Red, White\n}\n\nfact {\n // all majors are in/linked by some house\n Major in House.major\n // all colors are on/used by some house\n Color in House.color\n \n // The philosophy major lives directly to the right of the red house.\n (H1.color = Red and H2.major = Phil) or ((H2.color = Red and H3.major = Phil))\n //The computer science major lives in the blue house.\n some h : House | h.color = Blue and h.major = CS\n //The math major lives in house 2.\n H2.major = Math \n}\nrun{} for 3\nrun {one Math} for 3", "permalink": "subtly-swore-fame-graph", "time": "2023-12-11 19:50:14.645213", "cmd": 2} {"id": 9114, "parent": 9113, "code": "module houses\n\nabstract sig House {\n major: one Major,\n color: one Color,\n}\n\none sig H1, H2, H3 extends House {}\n\nenum Major {\n Math, Phil, CS\n}\n\nenum Color {\n Blue, Red, White\n}\n\nfact {\n // all majors are in/linked by some house\n Major in House.major\n // all colors are on/used by some house\n Color in House.color\n \n // The philosophy major lives directly to the right of the red house.\n (H1.color = Red and H2.major = Phil) or ((H2.color = Red and H3.major = Phil))\n //The computer science major lives in the blue house.\n some h : House | h.color = Blue and h.major = CS\n //The math major lives in house 2.\n H2.major = Math \n}\nrun{} for 3\nrun {one Math} for 3", "permalink": "humbly-whoops-viewer-runner", "time": "2023-12-11 19:50:28.788220", "cmd": 1} {"id": 9220, "parent": 9219, "code": "one sig List {\n header: lone Node \n} \nsig Node {\n link: lone Node \n}\nfact noDanglingNodes {\n Node in List.header.*link\n}\n\nrun { one n : List.header.*link | some n.link } for 3", "permalink": "canopy-eating-patrol-veal", "time": "2023-12-13 16:46:56.783371", "cmd": 1} {"id": 9221, "parent": 9220, "code": "one sig List {\n header: lone Node \n} \nsig Node {\n link: lone Node \n}\nfact noDanglingNodes {\n Node in List.header.*link\n}\n\nrun { one n : List.header.*link | no n.link } for 3", "permalink": "valid-bulb-swoop-kooky", "time": "2023-12-13 16:47:06.476396", "cmd": 1} {"id": 8986, "parent": 8985, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: at least two teams\n some Team and (one Team)\n\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\nfact {\n all disj t: Team |\n some f: Fixture | t in f.team1 or t in f.team2\n}\n\nfact {\n all disj f: Fixture |\n some r: Result | f in r.related_fixture\n}\n\n-- predicates\n\n-- 1: all players get award\npred AllPlayersGetAward {\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\n-- 2: no team wins\npred NoTeamWins {\n all r: Result, t: Team |\n t not in r.winner\n}\n\nrun AllPlayersGetAward\nrun NoTeamWins for 5", "permalink": "panic-veggie-derby-pelt", "time": "2023-12-09 22:52:37.821980", "cmd": 2} {"id": 8994, "parent": 8993, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\nfact {\n all disj t: Team |\n some f: Fixture | t in f.team1 or t in f.team2\n}\n\nfact {\n all disj f: Fixture |\n some r: Result | f in r.related_fixture\n}\n\n-- predicates\n\n-- 1: all players get award\npred AllPlayersGetAward {\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\n-- 2: no team wins\npred NoTeamWins {\n all r: Result, t: Team |\n t not in r.winner\n}\n\nrun AllPlayersGetAward\nrun NoTeamWins\n\nrun{}", "permalink": "booth-front-crease-raven", "time": "2023-12-09 22:53:57.622918", "cmd": 2} {"id": 9007, "parent": 9006, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player {}\n\nsome sig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\nfact {\n all disj t: Team |\n some f: Fixture | t in f.team1 or t in f.team2\n}\n\nfact {\n all disj f: Fixture |\n some r: Result | f in r.related_fixture\n}\n\n-- predicates\n\n-- 1: all players get award\npred AllPlayersGetAward {\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\n-- 2: no team wins\npred NoTeamWins {\n all r: Result, t: Team |\n t not in r.winner\n}\n\nrun NoTeamWins\nrun AllPlayersGetAward", "permalink": "litter-humvee-motion-take", "time": "2023-12-09 23:03:43.044029", "cmd": 2} {"id": 9015, "parent": 9014, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n-- signatures\n\nabstract sig Person {}\nsig Coach, Player in Person {}\n\nsome sig Team {\n coach: one Coach,\n players: some Player\n}\n\nsig Fixture {\n team1: one Team,\n team2: one Team,\n}\n\nsig Result {\n related_fixture: one Fixture,\n winner: one Team,\n}\n\nsig Award {\n -- each result provides an award to a player\n related_result: one Result,\n player_awarded: one Player,\n}\n\n-- facts\n\nfact {\n -- Team: two teams cannot have the same coach\n all disj t1, t2: Team | \n \tt1.coach != t2.coach\n}\nfact { \n -- Team: two teams cannot have same player in squad\n all disj t1, t2: Team, p: Player \n | not ((p in t1.players) && (p in t2.players))\n}\nfact {\n -- Fixture: both teams cant be same\n all disj f: Fixture \n | f.team1 != f.team2\n}\nfact {\n -- two fixtures cant be same\n all disj f1, f2: Fixture \n | not \n ((f1.team1 = f2.team1 and f1.team2 = f2.team2) \n or (f1.team1 = f2.team2 and f1.team2 = f2.team1))\n}\nfact {\n -- Result: two results cant have same fixture\n all disj r1, r2: Result\n | r1.related_fixture != r2.related_fixture\n}\nfact {\n -- winner must be from teams in rel fixture\n all disj r: Result \n | r.winner = r.related_fixture.team1 \n or r.winner = r.related_fixture.team2 \n}\nfact { \n -- Award: two awards cannot relate to same result \n all disj a1, a2: Award \n | a1.related_result != a2.related_result\n}\n\nfact {\n -- Award: only player from winning team gets award\n all disj a: Award\n | a.player_awarded in a.related_result.winner.players\n}\n\nfact {\n all disj t: Team |\n some f: Fixture | t in f.team1 or t in f.team2\n}\n\nfact {\n all disj f: Fixture |\n some r: Result | f in r.related_fixture\n}\n\n-- predicates\n\n-- 1: all players get award\npred AllPlayersGetAward {\n all p: Player |\n some a: Award | p in a.player_awarded\n}\n\n-- 2: no team wins\npred NoTeamWins {\n all r: Result, t: Team |\n t not in r.winner\n}\n\nrun NoTeamWins\nrun AllPlayersGetAward\nrun {}", "permalink": "waltz-rebate-shanty-debunk", "time": "2023-12-09 23:05:44.061361", "cmd": 1} {"id": 9018, "parent": 6959, "code": "one sig List { \n header: lone Node,\n size : Int\n} \n\nsig Node {\n link: lone Node \n}\n\nfact sizeOk {\n List.size = #List.header.*link \n}\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3", "permalink": "fetal-dimmed-music-patio", "time": "2023-12-10 09:58:08.667576", "cmd": 1} {"id": 9019, "parent": 6959, "code": "one sig List { \n header: lone Node,\n size : Int\n} \n\nsig Node {\n link: lone Node \n}\n\nfact sizeOk {\n List.size = #List.header.*link \n}\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3", "permalink": "boat-ooze-kept-deity", "time": "2023-12-10 10:46:09.790134", "cmd": 1} {"id": 9020, "parent": 6965, "code": "one sig List { \n header: lone Node,\n} \n\nsig Node {\n link: lone Node,\n elem : Int\n}\n\nfact ordered {\n all n : Node | \n some n.link implies \n n.elem < n.link.elem\n}\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3", "permalink": "tutu-prude-flight-drier", "time": "2023-12-10 11:09:54.212352", "cmd": 1} {"id": 9025, "parent": null, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\nrun {no List and no Node} for 3", "permalink": "gulp-gigolo-debunk-snooze", "time": "2023-12-10 15:41:30.173786", "cmd": 1} {"id": 9041, "parent": 9040, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\n// fact {\n// !(no List and no Node)\n// }\nrun {no List and no Node} for 3\nrun {} for 3", "permalink": "shrimp-drippy-aide-deluge", "time": "2023-12-10 19:34:11.045416", "cmd": 2} {"id": 9042, "parent": 9041, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\n// fact {\n// !(no List and no Node)\n// }\nrun {no List and no Node} for 3\nrun {no List} for 3", "permalink": "quill-quiet-scary-remix", "time": "2023-12-10 19:35:46.844485", "cmd": 2} {"id": 9047, "parent": 9046, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\nfact {\n (no List and no Node)\n}\nrun {no List and no Node} for 3\nrun {no List} for 3", "permalink": "shimmy-pushy-rented-amiss", "time": "2023-12-10 19:39:01.123441", "cmd": 2} {"id": 9048, "parent": 9047, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\nfact {\n (no List and no Node)\n}\nrun {no List and no Node} for 3\nrun {no List} for 3", "permalink": "yeah-breeze-zebra-scored", "time": "2023-12-10 19:39:09.090298", "cmd": 1} {"id": 9054, "parent": 9053, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\n\nfact {\n no List\n}\nrun {no List} for 3\n\nrun {no List}", "permalink": "bogus-baffle-rumble-petal", "time": "2023-12-10 20:29:53.996561", "cmd": 2} {"id": 9055, "parent": 9051, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3\n", "permalink": "quench-shrimp-xbox-padded", "time": "2023-12-10 20:48:28.786163", "cmd": 1} {"id": 9079, "parent": 9078, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3\n\nrun{ no Node}", "permalink": "turret-stray-delete-goon", "time": "2023-12-10 21:54:40.134698", "cmd": 2} {"id": 9095, "parent": 6741, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n\nrun {}", "permalink": "perm-folic-trench-mom", "time": "2023-12-11 12:40:55.914206", "cmd": 1} {"id": 9101, "parent": null, "code": "module houses\n\nabstract sig House {\n major: one Major,\n color: one Color,\n}\n\none sig H1, H2, H3 extends House {}\n\nenum Major {\n Math, Phil, CS\n}\n\nenum Color {\n Blue, Red, White\n}\n\nfact {\n // all majors are in/linked by some house\n Major in House.major\n // all colors are on/used by some house\n Color in House.color\n \n // The philosophy major lives directly to the right of the red house.\n (H1.color = Red and H2.major = Phil) or ((H2.color = Red and H3.major = Phil))\n //The computer science major lives in the blue house.\n some h : House | h.color = Blue and h.major = CS\n //The math major lives in house 2.\n H2.major = Math \n}\n\nrun {no Math} for 3", "permalink": "sacred-acorn-filled-buckle", "time": "2023-12-11 18:45:47.172859", "cmd": 1} {"id": 9107, "parent": 9106, "code": "sig List { \n header: lone Node } \nsig Node { \n link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {} for 3 but 0 Node", "permalink": "dinghy-rash-pointy-bouncy", "time": "2023-12-11 18:49:47.046626", "cmd": 1} {"id": 9109, "parent": 9108, "code": "one sig List { \n header: lone Node } \nsig Node { \n link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {} for 3 but 2 Node", "permalink": "utter-rise-doily-nuzzle", "time": "2023-12-11 18:50:12.526755", "cmd": 1} {"id": 9110, "parent": 9109, "code": "one sig List { \n header: lone Node } \nsig Node { \n link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {} for 3 but 0 List", "permalink": "cosmic-salary-fable-pull", "time": "2023-12-11 18:50:27.476491", "cmd": 1} {"id": 9111, "parent": 9110, "code": "one sig List { \n header: lone Node } \nsig Node { \n link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {} for 3 but 1 List", "permalink": "rush-slam-amigo-guise", "time": "2023-12-11 18:50:34.347884", "cmd": 1} {"id": 9112, "parent": 9102, "code": "module houses\n\nabstract sig House {\n major: one Major,\n color: one Color,\n}\n\none sig H1, H2, H3 extends House {}\n\nenum Major {\n Math, Phil, CS\n}\n\nenum Color {\n Blue, Red, White\n}\n\nfact {\n // all majors are in/linked by some house\n Major in House.major\n // all colors are on/used by some house\n Color in House.color\n \n // The philosophy major lives directly to the right of the red house.\n (H1.color = Red and H2.major = Phil) or ((H2.color = Red and H3.major = Phil))\n //The computer science major lives in the blue house.\n some h : House | h.color = Blue and h.major = CS\n //The math major lives in house 2.\n H2.major = Math \n}\nrun for 3\nrun {one Math} for 3", "permalink": "syrup-zone-barber-possum", "time": "2023-12-11 19:50:09.970185", "cmd": 1} {"id": 9116, "parent": 9115, "code": "module houses\n\nabstract sig House {\n major: one Major,\n color: one Color,\n}\n\none sig H1, H2, H3 extends House {}\n\nenum Major {\n Math, Phil, CS\n}\n\nenum Color {\n Blue, Red, White\n}\n\nfact {\n // all majors are in/linked by some house\n Major in House.major\n // all colors are on/used by some house\n Color in House.color\n \n // The philosophy major lives directly to the right of the red house.\n (H1.color = Red and H2.major = Phil) or ((H2.color = Red and H3.major = Phil))\n //The computer science major lives in the blue house.\n some h : House | h.color = Blue and h.major = CS\n //The math major lives in house 2.\n H2.major = Math \n}\nrun{} for 3\nrun {no Math} for 3", "permalink": "puma-rascal-refold-huff", "time": "2023-12-11 19:50:38.718220", "cmd": 2} {"id": 9233, "parent": 6741, "code": "// A Person can be either a Student or a Professor.\nsig User {}\n\n\nrun {}", "permalink": "clasp-repair-trio-mushy", "time": "2023-12-15 21:56:56.743343", "cmd": 1} {"id": 9219, "parent": 6981, "code": "one sig List {\n header: lone Node \n} \nsig Node {\n link: lone Node \n}\nfact noDanglingNodes {\n Node in List.header.*link\n}\n\nrun { one n : List.header.*link | no n.link } for 3", "permalink": "canned-sulk-pout-exodus", "time": "2023-12-13 16:46:44.565351", "cmd": 1} {"id": 9223, "parent": null, "code": "sig MailTemplate {}\n\nsig Mailset {\n contains: set MailTemplate\n}\n\nrun {}", "permalink": "nearly-iodize-front-bride", "time": "2023-12-14 04:37:47.935416", "cmd": 1} {"id": 9237, "parent": 9236, "code": "// A Person can be either a Student or a Professor.\nsig User {\n friends: one User\n}\n\n\nrun {} for 4", "permalink": "chest-pang-ebay-slogan", "time": "2023-12-15 21:58:18.811501", "cmd": 1} {"id": 9238, "parent": 9237, "code": "// A Person can be either a Student or a Professor.\nsig User {\n friends: some User\n}\n\n\nrun {} for 4", "permalink": "runway-resize-apple-scorer", "time": "2023-12-15 21:59:11.977203", "cmd": 1} {"id": 9253, "parent": 8591, "code": "// University Model\n\n// Signatures\nabstract sig Person { name: String, age: Int }\n\nsig Student extends Person { studentID: Int, major: String, enrolledCourses: set Course }\n\nsig Professor extends Person { staffID: Int, department: String, teaches: set Course }\n\nsig Course { courseCode: String, credits: Int }\n\nsig Classroom { roomNumber: Int, capacity: Int }\n\n// Inheritance\nfact StudentsArePeople { all s: Student | s in Person }\n\n// Facts\nfact CoursesHaveUniqueCodes { all disj c1, c2: Course | c1.courseCode != c2.courseCode }\n\n// Predicates\npred TeachingCapacity[p: Professor, c: Course, r: Classroom] {\n some room: r | room.capacity > 30 \n}\n\npred EnrolledStudents {\n all c: Course | some s: Student | s.major = \"Computer Science\" and c in s.enrolledCourses\n}\n\n // This run command is unsatisfiable\nrun {\n\n some p: Professor | no c: Course | c in p.teaches\n} for 5 \n\n// This run command is satisfiable\nrun {\n some s: Student, c: Course, p: Professor, r: Classroom | s.major = \"Computer Science\" and c in s.enrolledCourses and TeachingCapacity[p, c, r] and EnrolledStudents\n} for 5 but exactly 2 Student, 2 Course, 2 Professor, 2 Classroom", "permalink": "grunt-banjo-motive-umpire", "time": "2023-12-16 16:40:11.990994", "cmd": 1} {"id": 9256, "parent": 9255, "code": "// University Model\n\n// Signatures\nabstract sig Person { name: String, age: Int }\n\nsig Student extends Person { studentID: Int, major: String, enrolledCourses: set Course }\n\nsig Professor extends Person { staffID: Int, department: String, teaches: set Course }\n\nsig Course { courseCode: String, credits: Int }\n\nsig Classroom { roomNumber: Int, capacity: Int }\n\n// Inheritance\n// fact StudentsArePeople { all s: Student | s in Person }\nfact professorArePerson { all p: Professor | p in Person }\n\n// Facts\nfact CoursesHaveUniqueCodes { all disj c1, c2: Course | c1.courseCode != c2.courseCode }\n\n// Predicates\npred TeachingCapacity[p: Professor, c: Course, r: Classroom] {\n some room: r | room.capacity > 30 \n}\n\n\n\npred EnrolledStudents {\n all c: Course | some s: Student | s.major = \"Computer Science\" and c in s.enrolledCourses\n}\n\n // This run command is unsatisfiable\nrun {\n\n some p: Professor | no c: Course | c in p.teaches\n} for 5 \n\n// This run command is satisfiable\n// run {\n// some s: Student, c: Course, p: Professor, r: Classroom s.major = \"Computer Science\" and c in s.enrolledCourses and TeachingCapacity[p, c, r] and EnrolledStudents\n// } for 5 but exactly 2 Student, 2 Course, 2 Professor, 2 Classroom\n\nrun{}", "permalink": "dander-taking-enrich-washer", "time": "2023-12-16 16:58:22.275517", "cmd": 1} {"id": 9259, "parent": 9258, "code": "// University Model\n\n// Signatures\nabstract sig Person { name: String, age: Int }\n\nsig Student extends Person { studentID: Int, major: String, enrolledCourses: set Course }\n\nsig Professor extends Person { staffID: Int, department: String, teaches: set Course }\n\nsig Course { courseCode: String, credits: Int }\n\nsig Classroom { roomNumber: Int, capacity: Int }\n\n// Inheritance\n// fact StudentsArePeople { all s: Student | s in Person }\nfact professorArePerson { all p: Professor | p in Person }\n\n// Facts\nfact CoursesHaveUniqueCodes { all disj c1, c2: Course | c1.courseCode != c2.courseCode }\n\n// Predicates\npred TeachingCapacity[p: Professor, c: Course, r: Classroom] {\n some room: r | room.capacity > 30 \n}\n\n\n\npred EnrolledStudents {\n all c: Course | some s: Student | s.major = \"Computer Science\" and c in s.enrolledCourses\n}\n\n // This run command is unsatisfiable\nrun {\n\n some p: Professor | no c: Course | c in p.teaches\n} for 5 \n\n// This run command is satisfiable\nrun {\n some s: Student, c: Course, p: Professor, r: Classroom \n s.major = \"Computer Science\" and c in s.enrolledCourses and TeachingCapacity[p, c, r] and EnrolledStudents\n} for 5 but exactly 2 Student, 2 Course, 2 Professor, 2 Classroom\n \n// run{}", "permalink": "sandy-whiny-boil-stinky", "time": "2023-12-16 17:00:54.172947", "cmd": 2} {"id": 9262, "parent": 9261, "code": "// University Model\n\n// Signatures\nabstract sig Person { name: String, age: Int }\n\nsig Student extends Person { studentID: Int, major: String, enrolledCourses: set Course }\n\nsig Professor extends Person { staffID: Int, department: String, teaches: set Course }\n\nsig Course { courseCode: String, credits: Int }\n\nsig Classroom { roomNumber: Int, capacity: Int }\n\n// Inheritance\n// fact StudentsArePeople { all s: Student | s in Person }\nfact professorArePerson { all p: Professor | p in Person }\n\n// Facts\nfact CoursesHaveUniqueCodes { all disj c1, c2: Course | c1.courseCode != c2.courseCode }\n\n// Predicates\npred TeachingCapacity[p: Professor, c: Course, r: Classroom] {\n some room: r | room.capacity > 30 \n}\n\n\n\npred EnrolledStudents {\n all c: Course | some s: Student | s.major = \"Computer Science\" and c in s.enrolledCourses\n}\n\n // This run command is unsatisfiable\nrun {\n\n some p: Professor | no c: Course | c in p.teaches\n} for 5 \n\n// This run command is satisfiable\nrun {\n some s: Student, c: Course, p: Professor, r: Classroom s.major = \"Computer Science\" and c in s.enrolledCourses and TeachingCapacity[p, c, r] and EnrolledStudents\n} for 5 but exactly 2 Student, 2 Course, 2 Professor, 2 Classroom\n \n// run{}", "permalink": "wages-tiptop-hasty-harsh", "time": "2023-12-16 17:01:20.855410", "cmd": 2} {"id": 9263, "parent": 9262, "code": "// University Model\n\n// Signatures\nabstract sig Person { name: String, age: Int }\n\nsig Student extends Person { studentID: Int, major: String, enrolledCourses: set Course }\n\nsig Professor extends Person { staffID: Int, department: String, teaches: set Course }\n\nsig Course { courseCode: String, credits: Int }\n\nsig Classroom { roomNumber: Int, capacity: Int }\n\n// Inheritance\nfact StudentsArePeople { all s: Student | s in Person }\n// fact professorArePerson { all p: Professor | p in Person }\n\n// Facts\nfact CoursesHaveUniqueCodes { all disj c1, c2: Course | c1.courseCode != c2.courseCode }\n\n// Predicates\npred TeachingCapacity[p: Professor, c: Course, r: Classroom] {\n some room: r | room.capacity > 30 \n}\n\n\n\npred EnrolledStudents {\n all c: Course | some s: Student | s.major = \"Computer Science\" and c in s.enrolledCourses\n}\n\n // This run command is unsatisfiable\nrun {\n\n some p: Professor | no c: Course | c in p.teaches\n} for 5 \n\n// This run command is satisfiable\nrun {\n some s: Student, c: Course, p: Professor, r: Classroom s.major = \"Computer Science\" and c in s.enrolledCourses and TeachingCapacity[p, c, r] and EnrolledStudents\n} for 5 but exactly 2 Student, 2 Course, 2 Professor, 2 Classroom\n \n// run{}", "permalink": "embody-sake-jumble-kosher", "time": "2023-12-16 17:01:29.450370", "cmd": 2} {"id": 9264, "parent": 9263, "code": "// University Model\n\n// Signatures\nabstract sig Person { name: String, age: Int }\n\nsig Student extends Person { studentID: Int, major: String, enrolledCourses: set Course }\n\nsig Professor extends Person { staffID: Int, department: String, teaches: set Course }\n\nsig Course { courseCode: String, credits: Int }\n\nsig Classroom { roomNumber: Int, capacity: Int }\n\n// Inheritance\n// fact StudentsArePeople { all s: Student | s in Person }\nfact professorArePerson { all p: Professor | p in Person }\n// Facts\nfact CoursesHaveUniqueCodes { all disj c1, c2: Course | c1.courseCode != c2.courseCode }\n\n// Predicates\npred TeachingCapacity[p: Professor, c: Course, r: Classroom] {\n some room: r | room.capacity > 30 \n}\n\npred EnrolledStudents {\n all c: Course | some s: Student | s.major = \"Computer Science\" and c in s.enrolledCourses\n}\n\n // This run command is unsatisfiable\nrun {\n\n some p: Professor | no c: Course | c in p.teaches\n} for 5 \n\n// This run command is satisfiable\nrun {\n some s: Student, c: Course, p: Professor, r: Classroom | s.major = \"Computer Science\" and c in s.enrolledCourses and TeachingCapacity[p, c, r] and EnrolledStudents\n} for 5 but exactly 2 Student, 2 Course, 2 Professor, 2 Classroom", "permalink": "reason-bush-liquid-rind", "time": "2023-12-16 17:01:48.592472", "cmd": 1} {"id": 9271, "parent": 9269, "code": "// A Person can be either a Student or a Professor.\nsig User {\n friends: some User\n}\n\nfact friendsAreSymmetric {\n u: User | v: User | u.friends = v.friends\n}\n\n\nrun {} for 2", "permalink": "embody-fling-recopy-smudgy", "time": "2023-12-16 17:05:27.925061", "cmd": 1} {"id": 9272, "parent": 9271, "code": "// A Person can be either a Student or a Professor.\nsig User {\n friends: some User\n}\n\nfact friendsAreSymmetric {\n u: User | v: u.friends | u.friends = v\n}\n\n\nrun {} for 2", "permalink": "grass-porous-tug-name", "time": "2023-12-16 17:06:10.437083", "cmd": 1} {"id": 9288, "parent": 9287, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash \n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n not Protected in Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n// all u: File-Protected | u in Trash\nall u: Protected | not u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File , l: f.link | no l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | no f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n all f: File | (no f.link) or (lone f.link and no f.link.link)\n\n}\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\n}\nrun inv10", "permalink": "client-verse-dense-urging", "time": "2023-12-16 17:39:38.581643", "cmd": 7} {"id": 9293, "parent": 9292, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash \n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n not Protected in Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n// all u: File-Protected | u in Trash\nall u: Protected | not u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File , l: f.link | not l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | no f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // all f: File | (no f.link) or (lone f.link and no f.link.link)\n all f: File, l: f.link | not l in f.link\n \n}\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n// all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\nall f: File , l: f.link | l in Trash implies f in Trash\n}\nrun inv10", "permalink": "tasty-gladly-brunch-ocelot", "time": "2023-12-16 17:47:10.533380", "cmd": 10} {"id": 9299, "parent": 9298, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash \n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected , Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n// all u: File-Protected | u in Trash\nall u: Protected | not u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File , l: f.link | not l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | no f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // all f: File | (no f.link) or (lone f.link and no f.link.link)\n all f: File, l: f.link | not l in f.link\n \n}\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n// all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\nall f: File | f.link in Trash implies f in Trash\n}\nrun inv10", "permalink": "atlas-ogle-nanny-cocoa", "time": "2023-12-16 18:06:33.133965", "cmd": 4} {"id": 9304, "parent": 9303, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash \n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n// all u: File-Protected | u in Trash\nall u: unProtected | u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n// no f: File, l: f.link | l in Trash\n f: File , l: f.link | no l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | no f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // all f: File | (no f.link) or (lone f.link and no f.link.link)\n all f: File, l: f.link | not l in f.link\n \n}\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n// all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\nall f: File | f.link in Trash implies f in Trash\n}\nrun inv10", "permalink": "stress-dad-flaky-gaffe", "time": "2023-12-16 18:20:52.618071", "cmd": 5} {"id": 9308, "parent": 9307, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash \n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n// all u: File-Protected | u in Trash\nall u: File-Protected | u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n// no f: File, l: f.link | l in Trash\n no f: File , l: f.link | l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | no f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // all f: File | (no f.link) or (lone f.link and no f.link.link)\n all f: File, l: f.link | not l in f.link\n \n}\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n// all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\nall f: File | f.link in Trash implies f in Trash\n}\nrun inv10", "permalink": "lining-tiara-stark-slacks", "time": "2023-12-16 18:21:32.176937", "cmd": 5} {"id": 9311, "parent": 9310, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash \n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n// all u: File-Protected | u in Trash\nall u: File-Protected | u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n// no f: File, l: f.link | l in Trash\n no f: File , l: f.link | l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n// no f: File | some f.link\n no f: File | some f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // all f: File | (no f.link) or (lone f.link and no f.link.link)\n all f: File, l: f.link | lone l in f.link\n}\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n// all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\n all f: File | f.link in Trash implies f in Trash and f in Trash implies f.link in trash\n}\nrun inv10", "permalink": "sugar-hazy-many-volley", "time": "2023-12-16 18:30:30.130233", "cmd": 10} {"id": 9316, "parent": 9315, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash \n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n// all u: File-Protected | u in Trash\nall u: File-Protected | u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n// no f: File, l: f.link | l in Trash\n no f: File , l: f.link | l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n// no f: File | some f.link\n no f: File | some f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // all f: File | (no f.link) or (lone f.link and no f.link.link)\n all f: File | lone f.flink in f.link.link\n}\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n// all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\n all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in trash)\n}\nrun inv10", "permalink": "cymbal-elixir-snore-gothic", "time": "2023-12-16 18:32:45.388323", "cmd": 9} {"id": 9321, "parent": 9320, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash \n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n// all u: File-Protected | u in Trash\nall u: File-Protected | u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n// no f: File, l: f.link | l in Trash\n no f: File , l: f.link | l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n// no f: File | some f.link\n no f: File | some f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // all f: File | (no f.link) or (lone f.link and no f.link.link)\n all f: File | lone f.link and no f.link.link\n} \nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n// all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\n all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\n}\nrun inv10", "permalink": "napped-jogger-bulk-prefix", "time": "2023-12-16 18:33:58.898100", "cmd": 9} {"id": 9331, "parent": 9330, "code": "abstract sig A {}\nsig B {}\none sig A1 extends A {}\none sig A2 extends A {}\nA { f: B lone->lone B }\nA { g: B }\npred someG { some g } \npred atMostThree[x:univ, y:univ] { #(x+y) >= 3 }\nrun { some A && atMostThree[B,B] } for 3 but 3 int, 3 seq\nrun { some f && SomeG[] } for 3 but 2 int, 1 seq, 5 A, exactly \n", "permalink": "unread-rage-hyphen-zesty", "time": "2023-12-17 18:39:08.564715", "cmd": 1} {"id": 9379, "parent": null, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n\n // Only if I get the doll, I want a dollhouse.\n\n}\n\nrun wishes for 1", "permalink": "print-bucked-owl-stony", "time": "2023-12-18 22:10:53.974383", "cmd": 1} {"id": 9385, "parent": 9379, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n Puppy or Doll or PS5 or Xbox\n\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n Puppy.implies(DogBasket and Ball)\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n Doll.implies(Dresses and BarbieGame)\n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n Puppy.implies(no(PS5) and Xbox)\n\n // Only if I get the doll, I want a dollhouse.\n Doll.implies(DollHouse)\n}\n\nrun wishes for 1", "permalink": "niece-rust-lunar-shifty", "time": "2023-12-19 08:40:26.766709", "cmd": 1} {"id": 9386, "parent": 9379, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n all p: Puppy | all d: Doll | all ps5: PS5 | all xbox: Xbox | (p or d) and (ps5 or xbox)\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n\n // Only if I get the doll, I want a dollhouse.\n\n}\n\nrun wishes for 1", "permalink": "unglue-laurel-armory-user", "time": "2023-12-19 08:41:14.548941", "cmd": 1} {"id": 9387, "parent": 9385, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n Puppy or Doll or PS5 or Xbox\n\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n Puppy.implies(DogBasket and Ball)\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n Doll.implies(Dresses and BarbieGame)\n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n Puppy.implies(no(PS5) and Xbox)\n\n // Only if I get the doll, I want a dollhouse.\n Doll.implies(DollHouse)\n}\n\nrun wishes for 1", "permalink": "share-lyrics-fondly-onto", "time": "2023-12-19 08:41:17.595507", "cmd": 1} {"id": 9398, "parent": 9396, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n fact oneTrue {\n Puppy or Doll or PS5 or Xbox\n }\n\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n Puppy implies DogBasket and Ball\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n Doll implies Dresses and BarbieGame\n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n Puppy implies no(PS5) and Xbox\n\n // Only if I get the doll, I want a dollhouse.\n Doll implies DollHouse\n}\n\nrun wishes for 1", "permalink": "galley-exact-coral-gently", "time": "2023-12-19 08:45:21.775412", "cmd": 1} {"id": 9403, "parent": 9397, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n one p: Puppy | one d: Doll | (p or d)\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n \n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n\n // Only if I get the doll, I want a dollhouse.\n\n}\n\nrun wishes for 1", "permalink": "july-thumb-thinly-aptly", "time": "2023-12-19 08:46:42.256684", "cmd": 1} {"id": 9407, "parent": 9405, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n lone p: Puppy | lone d: Doll | (p or d)\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n \n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n\n // Only if I get the doll, I want a dollhouse.\n\n}\n\nrun wishes for 1", "permalink": "prune-even-croon-iodize", "time": "2023-12-19 08:47:14.517199", "cmd": 1} {"id": 9416, "parent": 9414, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n one Puppy or one Doll and one PS5 or one Xbox\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n one Puppy implies one DogBasket and one Ball\n // If I get the doll, I want dresses for the doll and the PS5 Barbie game.\n one Doll implies one Dresses and one BarbieGame\n\n // If I get the puppy, I don’t want the PS5 since only the Xbox has the dog game I want in that case.\n one Puppy and one Xbox implies no PS5\n\n // Only if I get the doll, I want a dollhouse.\n one Doll implies some DollHouse\n\n}\n\nrun wishes for 1", "permalink": "sheet-caress-wolf-jam", "time": "2023-12-19 08:47:49.530210", "cmd": 1} {"id": 9417, "parent": 9413, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n lone Puppy + Doll \n lone PS5 + Xbox\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n one Puppy => (DogBasket + Ball)\n\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n one Doll => (Dresses + BarbieGame)\n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n one Puppy => no PS5\n\n // Only if I get the doll, I want a dollhouse.\n one Doll => DollHouse\n\n}\n\nrun wishes for 1", "permalink": "judo-unsnap-gusty-cherub", "time": "2023-12-19 08:48:28.863411", "cmd": 1} {"id": 9420, "parent": 9419, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n lone p: Puppy or lone d: Doll or (p or d)\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n \n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n\n // Only if I get the doll, I want a dollhouse.\n\n}\n\nrun wishes for 1", "permalink": "mop-agent-value-vanity", "time": "2023-12-19 08:49:06.765867", "cmd": 1} {"id": 9441, "parent": 9424, "code": "module wishList\n\nsig Puppy, Doll, PS5, Xbox, DogBasket, Ball, Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n one BarbieGame implies one PS5\n one DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox.\n (some Puppy or some Doll) and (some PS5 or some Xbox)\n\n // If you get me a puppy, I also want a dog basket and a ball.\n Puppy implies (some DogBasket and some Ball)\n\n // If I get the doll, I want dresses for the doll and the PS5 Barbie game.\n Doll implies (some Dresses and some BarbieGame)\n\n // If I get the puppy, I don’t want the PS5 since only the Xbox has the dog game I want in that case.\n Puppy implies not PS5\n\n // Only if I get the doll, I want a dollhouse.\n Doll implies some DollHouse\n}\n\nrun wishes for 1", "permalink": "drudge-flaky-ferris-sneeze", "time": "2023-12-19 08:53:23.905907", "cmd": 1} {"id": 9444, "parent": 9379, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n (one Puppy or one Doll) and (one PS5 or one Xbox)\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n one Puppy implies (DogBasket or Ball) \n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n \n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n\n // Only if I get the doll, I want a dollhouse.\n\n}\n\nrun wishes for 1", "permalink": "smudge-pleat-unfair-grime", "time": "2023-12-19 08:54:06.624547", "cmd": 1} {"id": 9447, "parent": 9436, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n one Puppy or one Doll and one PS5 or one Xbox\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n one Puppy implies one DogBasket and one Ball\n // If I get the doll, I want dresses for the doll and the PS5 Barbie game.\n one Doll implies one Dresses and one BarbieGame\n\n // If I get the puppy, I don’t want the PS5 since only the Xbox has the dog game I want in that case.\n one Puppy and one Xbox implies no PS5\n\n // Only if I get the doll, I want a dollhouse.\n one Doll implies one DollHouse\n\n}\n\nrun wishes for 1", "permalink": "moving-smoked-gong-yahoo", "time": "2023-12-19 08:54:31.249649", "cmd": 1} {"id": 9448, "parent": 9437, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n (one Puppy or one Doll) and (one PS5 or one Xbox)\n // some (PS5 + Xbox)\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n one Puppy => one (DogBasket + Ball)\n\n// // If I get the doll, I want dresses for the doll and \n// // the PS5 Barbie game. \n one Doll => one (Dresses + BarbieGame)\n\n// // If I get the puppy, I don’t want the PS5 since only\n// // the Xbox has the dog game I want in that case.\n one Puppy => no PS5\n\n// // Only if I get the doll, I want a dollhouse.\n one Doll => one DollHouse\n\n}\n\nrun wishes for 1", "permalink": "racing-device-header-hull", "time": "2023-12-19 08:54:59.238715", "cmd": 1} {"id": 9449, "parent": 9442, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n (one Puppy or one Doll) and (one PS5 or one Xbox)\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n (one Puppy) implies (one DogBasket and one Ball)\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n\n // Only if I get the doll, I want a dollhouse.\n\n}\n\nrun wishes for 1", "permalink": "mayday-blush-judo-nappy", "time": "2023-12-19 08:55:03.353933", "cmd": 1} {"id": 9450, "parent": 9446, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n (one Puppy or one Doll) and (one PS5 or one Xbox)\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n one Puppy implies (one DogBasket and one Ball) \n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n \n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n\n // Only if I get the doll, I want a dollhouse.\n\n}\n\nrun wishes for 1", "permalink": "squeak-crux-snazzy-ranch", "time": "2023-12-19 08:55:09.501558", "cmd": 1} {"id": 9451, "parent": 9449, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n (one Puppy or one Doll) and (one PS5 or one Xbox)\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n (one Puppy) implies (one DogBasket and one Ball)\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n\n // Only if I get the doll, I want a dollhouse.\n one Puppy\n}\n\nrun wishes for 1", "permalink": "nappy-grass-giant-video", "time": "2023-12-19 08:55:32.301237", "cmd": 1} {"id": 9234, "parent": 9233, "code": "// A Person can be either a Student or a Professor.\nsig User {}\n\n\nrun {} for 3", "permalink": "silver-eatery-attain-muppet", "time": "2023-12-15 21:57:13.818808", "cmd": 1} {"id": 9242, "parent": null, "code": "sig A{Node}\nrun {}", "permalink": "ramrod-dime-uptake-baffle", "time": "2023-12-16 08:42:12.628447", "cmd": 1} {"id": 9244, "parent": 9243, "code": "sig A{Node}\nrun {A} for 1", "permalink": "romp-purple-drum-reveal", "time": "2023-12-16 08:42:32.426729", "cmd": 1} {"id": 9245, "parent": 8591, "code": "// University Model\n\n// Signatures\nabstract sig Person { name: String, age: Int }\n\nsig Student extends Person { studentID: Int, major: String, enrolledCourses: set Course }\n\nsig Professor extends Person { staffID: Int, department: String, teaches: set Course }\n\nsig Course { courseCode: String, credits: Int }\n\nsig Classroom { roomNumber: Int, capacity: Int }\n\n// Inheritance\nfact StudentsArePeople { all s: Student | s in Person }\n\n// Facts\nfact CoursesHaveUniqueCodes { all disj c1, c2: Course | c1.courseCode != c2.courseCode }\n\n// Predicates\npred TeachingCapacity[p: Professor, c: Course, r: Classroom] {\n some room: r | room.capacity > 30 \n}\n\npred EnrolledStudents {\n all c: Course | some s: Student | s.major = \"Computer Science\" and c in s.enrolledCourses\n}\n\n // This run command is unsatisfiable\nrun {\n\n some p: Professor | no c: Course | c in p.teaches\n} for 5 \n\n// This run command is satisfiable\nrun {\n some s: Student, c: Course, p: Professor, r: Classroom | s.major = \"Computer Science\" and c in s.enrolledCourses and TeachingCapacity[p, c, r] and EnrolledStudents\n} for 5 but exactly 2 Student, 2 Course, 2 Professor, 2 Classroom", "permalink": "java-drone-septic-sloped", "time": "2023-12-16 15:47:38.205457", "cmd": 1} {"id": 9249, "parent": 9248, "code": "sig A{}\n\npred testpredic()\n\nrun testpredic", "permalink": "trump-jacket-math-huff", "time": "2023-12-16 16:21:16.590932", "cmd": 1} {"id": 9254, "parent": 8537, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n\n //Formula 1\n some x: Person | x in Agatha.killed\n\n //Formula 2\n all x, y: Person |\n (x in y.killed implies x in y.hates and not x in y.richer)\n\n //Formula 3\n all x: Person | \n (Agatha in x.hates implies not Charles in x.hates)\n\n //Formula 4\n Agatha in Agatha.hates and Agatha in Charles.hates\n\n //Formula 5\n all x: Person | \n (not x in Agatha.richer implies Butler in x.hates)\n\n //Formula 6\n all x: Person | \n (Agatha in x.hates implies Butler in x.hates)\n\n //Formula 7\n all x: Person | some y: Person | not (x in y.hates)\n}\nrun puzzle", "permalink": "oozy-cornea-purely-retool", "time": "2023-12-16 16:54:40.459076", "cmd": 1} {"id": 9255, "parent": 9253, "code": "// University Model\n\n// Signatures\nabstract sig Person { name: String, age: Int }\n\nsig Student extends Person { studentID: Int, major: String, enrolledCourses: set Course }\n\nsig Professor extends Person { staffID: Int, department: String, teaches: set Course }\n\nsig Course { courseCode: String, credits: Int }\n\nsig Classroom { roomNumber: Int, capacity: Int }\n\n// Inheritance\n// fact StudentsArePeople { all s: Student | s in Person }\nfact professorArePerson { all p: Professor | p in Person }\n// Facts\nfact CoursesHaveUniqueCodes { all disj c1, c2: Course | c1.courseCode != c2.courseCode }\n\n// Predicates\npred TeachingCapacity[p: Professor, c: Course, r: Classroom] {\n some room: r | room.capacity > 30 \n}\n\npred EnrolledStudents {\n all c: Course | some s: Student | s.major = \"Computer Science\" and c in s.enrolledCourses\n}\n\n // This run command is unsatisfiable\nrun {\n\n some p: Professor | no c: Course | c in p.teaches\n} for 5 \n\n// This run command is satisfiable\nrun {\n some s: Student, c: Course, p: Professor, r: Classroom | s.major = \"Computer Science\" and c in s.enrolledCourses and TeachingCapacity[p, c, r] and EnrolledStudents\n} for 5 but exactly 2 Student, 2 Course, 2 Professor, 2 Classroom", "permalink": "maker-alone-detest-thrill", "time": "2023-12-16 16:56:23.394611", "cmd": 2} {"id": 9261, "parent": 9260, "code": "// University Model\n\n// Signatures\nabstract sig Person { name: String, age: Int }\n\nsig Student extends Person { studentID: Int, major: String, enrolledCourses: set Course }\n\nsig Professor extends Person { staffID: Int, department: String, teaches: set Course }\n\nsig Course { courseCode: String, credits: Int }\n\nsig Classroom { roomNumber: Int, capacity: Int }\n\n// Inheritance\n// fact StudentsArePeople { all s: Student | s in Person }\nfact professorArePerson { all p: Professor | p in Person }\n\n// Facts\nfact CoursesHaveUniqueCodes { all disj c1, c2: Course | c1.courseCode != c2.courseCode }\n\n// Predicates\npred TeachingCapacity[p: Professor, c: Course, r: Classroom] {\n some room: r | room.capacity > 30 \n}\n\n\n\npred EnrolledStudents {\n all c: Course | some s: Student | s.major = \"Computer Science\" and c in s.enrolledCourses\n}\n\n // This run command is unsatisfiable\nrun {\n\n some p: Professor | no c: Course | c in p.teaches\n} for 5 \n\n// This run command is satisfiable\nrun {\n some s: Student, c: Course, p: Professor, r: Classroom s.major = \"Computer Science\" and c in s.enrolledCourses and TeachingCapacity[p, c, r] and EnrolledStudents\n} for 5 but exactly 2 Student, 2 Course, 2 Professor, 2 Classroom\n\n// run{}", "permalink": "dotted-mayday-evade-dinner", "time": "2023-12-16 17:01:15.508742", "cmd": 2} {"id": 9265, "parent": 9264, "code": "// University Model\n\n// Signatures\nabstract sig Person { name: String, age: Int }\n\nsig Student extends Person { studentID: Int, major: String, enrolledCourses: set Course }\n\nsig Professor extends Person { staffID: Int, department: String, teaches: set Course }\n\nsig Course { courseCode: String, credits: Int }\n\nsig Classroom { roomNumber: Int, capacity: Int }\n\n// Inheritance\n// fact StudentsArePeople { all s: Student | s in Person }\nfact professorArePerson { all p: Professor | p in Person }\n// Facts\nfact CoursesHaveUniqueCodes { all disj c1, c2: Course | c1.courseCode != c2.courseCode }\n\n// Predicates\npred TeachingCapacity[p: Professor, c: Course, r: Classroom] {\n some room: r | room.capacity > 30 \n}\n\npred EnrolledStudents {\n all c: Course | some s: Student | s.major = \"Computer Science\" and c in s.enrolledCourses\n}\n\n // This run command is unsatisfiable\nrun {\n\n some p: Professor | no c: Course | c in p.teaches\n} for 5 \n\n// This run command is satisfiable\nrun {\n some s: Student, c: Course, p: Professor, r: Classroom | s.major = \"Computer Science\" and c in s.enrolledCourses and TeachingCapacity[p, c, r] and EnrolledStudents\n} for 5 but exactly 2 Student, 2 Course, 2 Professor, 2 Classroom", "permalink": "sprang-duffel-aspect-graves", "time": "2023-12-16 17:01:51.704732", "cmd": 2} {"id": 9269, "parent": 9241, "code": "// A Person can be either a Student or a Professor.\nsig User {\n friends: some User\n}\n\nfact friendsAreSymmetric {\n u: User | v: User | u.friends = v\n}\n\n\nrun {} for 2", "permalink": "ground-sly-gonad-clench", "time": "2023-12-16 17:04:27.649169", "cmd": 1} {"id": 9270, "parent": 9268, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash \n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n all f: File | (no f.link) or (lone f.link and no f.link.link)\n\n}\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\n}\nrun inv10", "permalink": "move-chant-quarry-grit", "time": "2023-12-16 17:04:44.643051", "cmd": 1} {"id": 9273, "parent": 9272, "code": "// A Person can be either a Student or a Professor.\nsig User {\n friends: some User\n}\n\nfact friendsAreSymmetric {\n u: User | v: u.friends | v.friends = u\n}\n\n\nrun {} for 2", "permalink": "cacti-rudder-await-these", "time": "2023-12-16 17:06:27.648366", "cmd": 1} {"id": 9275, "parent": 9274, "code": "// A Person can be either a Student or a Professor.\nsig User {\n friends: some User\n}\n\nfact friendsAreSymmetric {\n all u: User | all v: u.friends | v.friends = u\n}\n\nfact no2friendsAreSame {\n all u: User | u.friends != u\n}\n\n\nrun {} for 2", "permalink": "essay-fang-attach-gave", "time": "2023-12-16 17:07:43.688721", "cmd": 1} {"id": 9277, "parent": 9275, "code": "// A Person can be either a Student or a Professor.\nsig User {\n friends: some User\n}\n\nfact friendsAreSymmetric {\n all u: User | all v: u.friends | v.friends = u\n}\n\nfact no2friendsAreSame {\n all u: User | u.friends != u\n}\n\n\nrun {} for 3", "permalink": "levers-acid-pull-owl", "time": "2023-12-16 17:08:34.126314", "cmd": 1} {"id": 9279, "parent": 9278, "code": "// A Person can be either a Student or a Professor.\nsig User {\n friends: some User\n}\n\nfact friendsAreSymmetric {\n all u: User | all v: u.friends | v.friends = u\n}\n\nfact no2friendsAreSame {\n all u: User | u.friends != u\n}\nrun {} for 4", "permalink": "rocket-shone-dating-lining", "time": "2023-12-16 17:12:04.917006", "cmd": 1} {"id": 9280, "parent": 9276, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash \n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n not Protected in Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n all f: File | (no f.link) or (lone f.link and no f.link.link)\n\n}\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\n}\nrun inv10", "permalink": "whiff-rust-prune-rabid", "time": "2023-12-16 17:20:00.495522", "cmd": 4} {"id": 9281, "parent": 9280, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash \n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected in Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n all f: File | (no f.link) or (lone f.link and no f.link.link)\n\n}\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\n}\nrun inv10", "permalink": "sugar-rug-anemic-puma", "time": "2023-12-16 17:20:07.845420", "cmd": 4} {"id": 9284, "parent": 9283, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash \n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n not Protected in Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n// all u: File-Protected | u in Trash\nall u: Protected | not u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n all f: File | (no f.link) or (lone f.link and no f.link.link)\n\n}\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\n}\nrun inv10", "permalink": "recede-bash-strep-rubber", "time": "2023-12-16 17:23:42.095165", "cmd": 5} {"id": 9285, "parent": 9284, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash \n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n not Protected in Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n// all u: File-Protected | u in Trash\nall u: Protected | not u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File | l: f.link | l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n all f: File | (no f.link) or (lone f.link and no f.link.link)\n\n}\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\n}\nrun inv10", "permalink": "sloped-native-evil-skier", "time": "2023-12-16 17:33:31.242309", "cmd": 7} {"id": 9290, "parent": 9289, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash \n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n not Protected in Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n// all u: File-Protected | u in Trash\nall u: Protected | not u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File , l: f.link | not l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | no f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // all f: File | (no f.link) or (lone f.link and no f.link.link)\n all f: File, l: f.link | no l in f.link\n // | (no f.link) or (lone f.link and no f.link.link)\n}\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\n}\nrun inv10", "permalink": "sullen-tipped-gurgle-cough", "time": "2023-12-16 17:42:41.941896", "cmd": 9} {"id": 9291, "parent": 9290, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash \n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n not Protected in Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n// all u: File-Protected | u in Trash\nall u: Protected | not u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File , l: f.link | not l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | no f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // all f: File | (no f.link) or (lone f.link and no f.link.link)\n all f: File, l: f.link | not l in f.link\n // | (no f.link) or (lone f.link and no f.link.link)\n}\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\n}\nrun inv10", "permalink": "anthem-result-henna-tutu", "time": "2023-12-16 17:42:52.567423", "cmd": 9} {"id": 9292, "parent": 9291, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash \n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n not Protected in Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n// all u: File-Protected | u in Trash\nall u: Protected | not u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File , l: f.link | not l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | no f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // all f: File | (no f.link) or (lone f.link and no f.link.link)\n all f: File, l: f.link | not l in f.link\n \n}\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n// all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\nall f: File , l: f.link | f.link in Trash implies f in Trash\n}\nrun inv10", "permalink": "frays-oak-sadly-boss", "time": "2023-12-16 17:44:50.987718", "cmd": 10} {"id": 9294, "parent": 9293, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash \n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n not Protected in Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n// all u: File-Protected | u in Trash\nall u: Protected | not u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File , l: f.link | not l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | no f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // all f: File | (no f.link) or (lone f.link and no f.link.link)\n all f: File, l: f.link | not l in f.link\n \n}\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n// all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\nall f: File | f.link in Trash implies f in Trash\n}\nrun inv10", "permalink": "ferry-paging-willow-coping", "time": "2023-12-16 17:47:26.196746", "cmd": 10} {"id": 9296, "parent": 9294, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n all f: File | (no f.link) or (lone f.link and no f.link.link)\n\n}\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\n}\nrun inv10", "permalink": "gusty-duller-cut-fetal", "time": "2023-12-16 18:04:21.929764", "cmd": 10} {"id": 9297, "parent": 9295, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash \n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected in Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n// all u: File-Protected | u in Trash\nall u: Protected | not u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File , l: f.link | not l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | no f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // all f: File | (no f.link) or (lone f.link and no f.link.link)\n all f: File, l: f.link | not l in f.link\n \n}\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n// all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\nall f: File | f.link in Trash implies f in Trash\n}\nrun inv10", "permalink": "theft-hazard-stays-rehab", "time": "2023-12-16 18:05:56.889219", "cmd": 4} {"id": 9300, "parent": 9299, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash \n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected | no Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n// all u: File-Protected | u in Trash\nall u: Protected | not u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File , l: f.link | not l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | no f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // all f: File | (no f.link) or (lone f.link and no f.link.link)\n all f: File, l: f.link | not l in f.link\n \n}\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n// all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\nall f: File | f.link in Trash implies f in Trash\n}\nrun inv10", "permalink": "lived-relic-regain-hamlet", "time": "2023-12-16 18:06:43.787657", "cmd": 4} {"id": 9301, "parent": 9300, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash \n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected , no Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n// all u: File-Protected | u in Trash\nall u: Protected | not u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File , l: f.link | not l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | no f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // all f: File | (no f.link) or (lone f.link and no f.link.link)\n all f: File, l: f.link | not l in f.link\n \n}\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n// all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\nall f: File | f.link in Trash implies f in Trash\n}\nrun inv10", "permalink": "copied-wise-crust-ember", "time": "2023-12-16 18:06:47.697477", "cmd": 4} {"id": 9303, "parent": 9302, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash \n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n// all u: File-Protected | u in Trash\nall u: unProtected | u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n// no f: File, l: f.link | l in Trash\n f: File , l: f.link | no l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | no f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // all f: File | (no f.link) or (lone f.link and no f.link.link)\n all f: File, l: f.link | not l in f.link\n \n}\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n// all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\nall f: File | f.link in Trash implies f in Trash\n}\nrun inv10", "permalink": "talon-hassle-romp-lusty", "time": "2023-12-16 18:20:44.963011", "cmd": 7} {"id": 9306, "parent": 9305, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash \n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n// all u: File-Protected | u in Trash\nall u: unProtected | u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n// no f: File, l: f.link | l in Trash\n f: File , l: f.link | no l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | no f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // all f: File | (no f.link) or (lone f.link and no f.link.link)\n all f: File, l: f.link | not l in f.link\n \n}\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n// all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\nall f: File | f.link in Trash implies f in Trash\n}\nrun inv10", "permalink": "buffed-syrup-smudgy-spry", "time": "2023-12-16 18:21:07.016775", "cmd": 5} {"id": 9310, "parent": 9309, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash \n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n// all u: File-Protected | u in Trash\nall u: File-Protected | u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n// no f: File, l: f.link | l in Trash\n no f: File , l: f.link | l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n// no f: File | some f.link\n no f: File | some f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // all f: File | (no f.link) or (lone f.link and no f.link.link)\n all f: File, l: f.link | not l in f.link\n}\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n// all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\nall f: File | f.link in Trash implies f in Trash\n}\nrun inv10", "permalink": "baggy-wanted-john-muzzle", "time": "2023-12-16 18:26:57.833479", "cmd": 4} {"id": 9318, "parent": 9317, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash \n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n// all u: File-Protected | u in Trash\nall u: File-Protected | u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n// no f: File, l: f.link | l in Trash\n no f: File , l: f.link | l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n// no f: File | some f.link\n no f: File | some f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // all f: File | (no f.link) or (lone f.link and no f.link.link)\n all f: File | lone f.link and no f.link.link\n}\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n// all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\n all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in trash)\n}\nrun inv10", "permalink": "pectin-brink-sulfur-zero", "time": "2023-12-16 18:33:21.625393", "cmd": 9} {"id": 9329, "parent": 9328, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "wince-upload-deny-cymbal", "time": "2023-12-17 17:52:03.478073", "cmd": 1} {"id": 9330, "parent": 9329, "code": "abstract sig A {}\nsig B {}\none sig A1 extends A {}\none sig A2 extends A {}\nA { f: B lone->lone B }\nA { g: B }\npred someG { some g }\npred atMostThree[x:univ, y:univ] { #(x+y) >= 3 }\nrun { some A && atMostThree[B,B] } for 3 but 3 int, 3 seq\nrun { some f && SomeG[] } for 3 but 2 int, 1 seq, 5 A, exactly \n", "permalink": "crepe-taco-marlin-upwind", "time": "2023-12-17 18:38:52.750300", "cmd": 1} {"id": 9334, "parent": 9333, "code": "abstract sig A {}\nsig B {}\none sig A1 extends A {}\none sig A2 extends A {}\nA { f: set (lone->lone B) }\n// f:set (B lone->lone B) \nA { g: B }\npred someG { some g } \npred atMostThree[x:univ, y:univ] { #(x+y) >= 3 }\nrun { some A && atMostThree[B,B] } for 3 but 3 int, 3 seq\nrun { some f && SomeG[] } for 3 but 2 int, 1 seq, 5 A, exactly \n", "permalink": "pencil-video-trance-pluck", "time": "2023-12-17 18:40:49.578341", "cmd": 1} {"id": 9380, "parent": null, "code": "module SecretSanta\n\nsig Employee {\n officePartners : set Employee,\n isSecretSantaFor : one Employee\n}\nsig Intern extends Employee { \n supervisor : one Employee \n}\n\npred santaRules {\n // Everyone has a Secret Santa, and nobody is their \n // own Secret Santa.\n \n // Nobody should get a person assigned that they \n // share an office with.\n \n // No intern should have to buy a present for their \n // supervisor.\n\n}\n\nrun santaRules for 3", "permalink": "reggae-chill-replay-spore", "time": "2023-12-18 22:12:59.792241", "cmd": 1} {"id": 9396, "parent": 9394, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n fact {\n Puppy or Doll or PS5 or Xbox\n }\n\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n Puppy implies DogBasket and Ball\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n Doll implies Dresses and BarbieGame\n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n Puppy implies no(PS5) and Xbox\n\n // Only if I get the doll, I want a dollhouse.\n Doll implies DollHouse\n}\n\nrun wishes for 1", "permalink": "await-take-factor-spout", "time": "2023-12-19 08:45:14.141933", "cmd": 1} {"id": 9397, "parent": 9389, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n all p: Puppy | all d: Doll | (p or d)\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n\n // Only if I get the doll, I want a dollhouse.\n\n}\n\nrun wishes for 1", "permalink": "campus-dude-crowd-elbow", "time": "2023-12-19 08:45:19.543385", "cmd": 1} {"id": 9400, "parent": 9398, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n Puppy or Doll or PS5 or Xbox\n\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n Puppy implies DogBasket and Ball\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n Doll implies Dresses and BarbieGame\n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n Puppy implies no(PS5) and Xbox\n\n // Only if I get the doll, I want a dollhouse.\n Doll implies DollHouse\n}\n\nrun wishes for 1", "permalink": "rocket-twins-luster-wife", "time": "2023-12-19 08:45:52.005553", "cmd": 1} {"id": 9404, "parent": 9401, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n one Puppy or one Doll and one PS5 or one Xbox\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n Puppy implies some DogBasket and some Ball\n // If I get the doll, I want dresses for the doll and the PS5 Barbie game.\n Doll implies some Dresses and some BarbieGame\n\n // If I get the puppy, I don’t want the PS5 since only the Xbox has the dog game I want in that case.\n Puppy and Xbox implies no PS5\n\n // Only if I get the doll, I want a dollhouse.\n Doll implies some DollHouse\n\n}\n\nrun wishes for 1", "permalink": "empty-casket-yonder-onyx", "time": "2023-12-19 08:46:45.875960", "cmd": 1} {"id": 9414, "parent": 9410, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n one Puppy or one Doll and one PS5 or one Xbox\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n one Puppy implies one DogBasket and one Ball\n // If I get the doll, I want dresses for the doll and the PS5 Barbie game.\n one Doll implies one Dresses and one BarbieGame\n\n // If I get the puppy, I don’t want the PS5 since only the Xbox has the dog game I want in that case.\n one Puppy and one Xbox implies no PS5\n\n // Only if I get the doll, I want a dollhouse.\n Doll implies some DollHouse\n\n}\n\nrun wishes for 1", "permalink": "roping-sheath-womb-wobbly", "time": "2023-12-19 08:47:42.849351", "cmd": 1} {"id": 9415, "parent": 9412, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n one Puppy or one Doll or one PS5 or one Xbox\n\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n one Puppy implies one DogBasket and one Ball\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n one Doll implies one Dresses and one BarbieGame\n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n one Puppy implies not one PS5 and one Xbox\n\n // Only if I get the doll, I want a dollhouse.\n one Doll implies one DollHouse\n}\n\nrun wishes for 1", "permalink": "denim-attic-shock-grape", "time": "2023-12-19 08:47:44.957500", "cmd": 1} {"id": 9418, "parent": 9417, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n lone Puppy + Doll \n lone PS5 + Xbox\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n// one Puppy => (DogBasket + Ball)\n\n\n// // If I get the doll, I want dresses for the doll and \n// // the PS5 Barbie game. \n// one Doll => (Dresses + BarbieGame)\n\n// // If I get the puppy, I don’t want the PS5 since only\n// // the Xbox has the dog game I want in that case.\n// one Puppy => no PS5\n\n// // Only if I get the doll, I want a dollhouse.\n// one Doll => DollHouse\n\n}\n\nrun wishes for 1", "permalink": "gnarly-baked-verse-nail", "time": "2023-12-19 08:48:57.335792", "cmd": 1} {"id": 9419, "parent": 9407, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n lone p: Puppy or lone d: Doll | (p or d)\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n \n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n\n // Only if I get the doll, I want a dollhouse.\n\n}\n\nrun wishes for 1", "permalink": "ramrod-viewer-cactus-deploy", "time": "2023-12-19 08:48:59.328978", "cmd": 1} {"id": 9423, "parent": 9420, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n lone p: Puppy or lone d: Doll \n // If you get me a puppy, I also want a dog basket and \n // a ball.\n \n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n\n // Only if I get the doll, I want a dollhouse.\n\n}\n\nrun wishes for 1", "permalink": "duly-helium-ajar-pants", "time": "2023-12-19 08:49:33.425695", "cmd": 1} {"id": 9425, "parent": 9421, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n some Puppy + Doll and PS5 + Xbox\n // some PS5 + Xbox\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n// one Puppy => (DogBasket + Ball)\n\n\n// // If I get the doll, I want dresses for the doll and \n// // the PS5 Barbie game. \n// one Doll => (Dresses + BarbieGame)\n\n// // If I get the puppy, I don’t want the PS5 since only\n// // the Xbox has the dog game I want in that case.\n// one Puppy => no PS5\n\n// // Only if I get the doll, I want a dollhouse.\n// one Doll => DollHouse\n\n}\n\nrun wishes for 1", "permalink": "curdle-valid-path-math", "time": "2023-12-19 08:49:49.017394", "cmd": 1} {"id": 9426, "parent": 9425, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n lone (Puppy + Doll) \n some PS5 + Xbox\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n// one Puppy => (DogBasket + Ball)\n\n\n// // If I get the doll, I want dresses for the doll and \n// // the PS5 Barbie game. \n// one Doll => (Dresses + BarbieGame)\n\n// // If I get the puppy, I don’t want the PS5 since only\n// // the Xbox has the dog game I want in that case.\n// one Puppy => no PS5\n\n// // Only if I get the doll, I want a dollhouse.\n// one Doll => DollHouse\n\n}\n\nrun wishes for 1", "permalink": "elixir-donor-blazer-gloomy", "time": "2023-12-19 08:50:46.017804", "cmd": 1} {"id": 9429, "parent": 9416, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n one Puppy or one Doll and one PS5 or one Xbox\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n one Puppy implies one DogBasket and one Ball\n // If I get the doll, I want dresses for the doll and the PS5 Barbie game.\n one Doll implies one Dresses and one BarbieGame\n\n // If I get the puppy, I don’t want the PS5 since only the Xbox has the dog game I want in that case.\n one Puppy and one Xbox implies no PS5\n\n // Only if I get the doll, I want a dollhouse.\n one Doll implies some DollHouse\n\n}\n\nrun wishes for 1", "permalink": "stole-nappy-hash-boring", "time": "2023-12-19 08:51:06.409771", "cmd": 1} {"id": 9430, "parent": 9426, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n lone (Puppy + Doll) \n lone (PS5 + Xbox)\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n// one Puppy => (DogBasket + Ball)\n\n\n// // If I get the doll, I want dresses for the doll and \n// // the PS5 Barbie game. \n// one Doll => (Dresses + BarbieGame)\n\n// // If I get the puppy, I don’t want the PS5 since only\n// // the Xbox has the dog game I want in that case.\n// one Puppy => no PS5\n\n// // Only if I get the doll, I want a dollhouse.\n// one Doll => DollHouse\n\n}\n\nrun wishes for 1", "permalink": "kisser-gutter-luxury-okay", "time": "2023-12-19 08:51:16.245734", "cmd": 1} {"id": 9431, "parent": 9427, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n one (Puppy doll)\n one (PS5 Xbox)\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n\n // Only if I get the doll, I want a dollhouse.\n\n}\n\nrun wishes for 1", "permalink": "washed-try-shady-image", "time": "2023-12-19 08:51:23.078146", "cmd": 1} {"id": 9433, "parent": 9431, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n one Puppy | one doll\n one PS5 Xbox\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n\n // Only if I get the doll, I want a dollhouse.\n\n}\n\nrun wishes for 1", "permalink": "freely-goes-flick-nibble", "time": "2023-12-19 08:51:47.023958", "cmd": 1} {"id": 9434, "parent": 9432, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n lone (Puppy + Doll) \n lone (PS5 + Xbox)\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n one Puppy => one (DogBasket + Ball)\n\n\n// // If I get the doll, I want dresses for the doll and \n// // the PS5 Barbie game. \n// one Doll => (Dresses + BarbieGame)\n\n// // If I get the puppy, I don’t want the PS5 since only\n// // the Xbox has the dog game I want in that case.\n// one Puppy => no PS5\n\n// // Only if I get the doll, I want a dollhouse.\n// one Doll => DollHouse\n\n}\n\nrun wishes for 1", "permalink": "mom-basics-degree-rarity", "time": "2023-12-19 08:51:47.729609", "cmd": 1} {"id": 9435, "parent": 9434, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n some (Puppy + Doll) \n some (PS5 + Xbox)\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n one Puppy => one (DogBasket + Ball)\n\n\n// // If I get the doll, I want dresses for the doll and \n// // the PS5 Barbie game. \n// one Doll => (Dresses + BarbieGame)\n\n// // If I get the puppy, I don’t want the PS5 since only\n// // the Xbox has the dog game I want in that case.\n// one Puppy => no PS5\n\n// // Only if I get the doll, I want a dollhouse.\n// one Doll => DollHouse\n\n}\n\nrun wishes for 1", "permalink": "famine-juror-pacify-mantra", "time": "2023-12-19 08:51:56.113767", "cmd": 1} {"id": 9236, "parent": 9235, "code": "// A Person can be either a Student or a Professor.\nsig User {\n friends: one User\n}\n\n\nrun {} for 2", "permalink": "chaps-alias-theft-chest", "time": "2023-12-15 21:57:42.787066", "cmd": 1} {"id": 9240, "parent": 9239, "code": "// A Person can be either a Student or a Professor.\nsig User {\n friends: set User\n}\n\n\nrun {} for 2", "permalink": "tying-dose-gents-starch", "time": "2023-12-15 22:00:27.305269", "cmd": 1} {"id": 9241, "parent": 9240, "code": "// A Person can be either a Student or a Professor.\nsig User {\n friends: some User\n}\n\n\nrun {} for 2", "permalink": "cash-many-draw-train", "time": "2023-12-15 22:00:38.013528", "cmd": 1} {"id": 9243, "parent": 9242, "code": "sig A{Node}\nrun {A}", "permalink": "tipper-flip-veto-acorn", "time": "2023-12-16 08:42:25.735615", "cmd": 1} {"id": 9246, "parent": 9245, "code": "// University Model\n\n// Signatures\nabstract sig Person { name: String, age: Int }\n\nsig Student extends Person { studentID: Int, major: String, enrolledCourses: set Course }\n\nsig Professor extends Person { staffID: Int, department: String, teaches: set Course }\n\nsig Course { courseCode: String, credits: Int }\n\nsig Classroom { roomNumber: Int, capacity: Int }\n\n// Inheritance\nfact StudentsArePeople { all s: Student | s in Person }\n\n// Facts\nfact CoursesHaveUniqueCodes { all disj c1, c2: Course | c1.courseCode != c2.courseCode }\n\n// Predicates\npred TeachingCapacity[p: Professor, c: Course, r: Classroom] {\n some room: r | room.capacity > 30 \n}\n\npred EnrolledStudents {\n all c: Course | some s: Student | s.major = \"Computer Science\" and c in s.enrolledCourses\n}\n\n // This run command is unsatisfiable\nrun {\n\n some p: Professor | no c: Course | c in p.teaches\n} for 5 \n\n// This run command is satisfiable\nrun {\n some s: Student, c: Course, p: Professor, r: Classroom | s.major = \"Computer Science\" and c in s.enrolledCourses and TeachingCapacity[p, c, r] and EnrolledStudents\n} for 5 but exactly 2 Student, 2 Course, 2 Professor, 2 Classroom", "permalink": "earful-ride-mousy-sacred", "time": "2023-12-16 15:47:42.778090", "cmd": 2} {"id": 9247, "parent": 9246, "code": "\n// Signatures\nabstract sig Person { name: String, age: Int }\n\nsig Student extends Person { studentID: Int, major: String, enrolledCourses: set Course }\n\nsig Professor extends Person { staffID: Int, department: String, teaches: set Course }\n\nsig Course { courseCode: String, credits: Int }\n\nsig Classroom { roomNumber: Int, capacity: Int }\n\n// Inheritance\nfact StudentsArePeople { all s: Student | s in Person }\n\n// Facts\nfact CoursesHaveUniqueCodes { all disj c1, c2: Course | c1.courseCode != c2.courseCode }\n\n// Predicates\npred TeachingCapacity[p: Professor, c: Course, r: Classroom] {\n some room: r | room.capacity > 30 \n}\n\npred EnrolledStudents {\n all c: Course | some s: Student | s.major = \"Computer Science\" and c in s.enrolledCourses\n}\n\n // This run command is unsatisfiable\nrun {\n\n some p: Professor | no c: Course | c in p.teaches\n} for 5 \n\n// This run command is satisfiable\nrun {\n some s: Student, c: Course, p: Professor, r: Classroom | s.major = \"Computer Science\" and c in s.enrolledCourses and TeachingCapacity[p, c, r] and EnrolledStudents\n} for 5 but exactly 2 Student, 2 Course, 2 Professor, 2 Classroom", "permalink": "tartar-buddy-aging-cling", "time": "2023-12-16 15:48:20.212111", "cmd": 2} {"id": 9250, "parent": 9249, "code": "sig A{}\n\npred testpredic{}\n\nrun testpredic", "permalink": "delay-quilt-boss-garlic", "time": "2023-12-16 16:21:33.938196", "cmd": 1} {"id": 9257, "parent": 9256, "code": "// University Model\n\n// Signatures\nabstract sig Person { name: String, age: Int }\n\nsig Student extends Person { studentID: Int, major: String, enrolledCourses: set Course }\n\nsig Professor extends Person { staffID: Int, department: String, teaches: set Course }\n\nsig Course { courseCode: String, credits: Int }\n\nsig Classroom { roomNumber: Int, capacity: Int }\n\n// Inheritance\n// fact StudentsArePeople { all s: Student | s in Person }\nfact professorArePerson { all p: Professor | p in Person }\n\n// Facts\nfact CoursesHaveUniqueCodes { all disj c1, c2: Course | c1.courseCode != c2.courseCode }\n\n// Predicates\npred TeachingCapacity[p: Professor, c: Course, r: Classroom] {\n some room: r | room.capacity > 30 \n}\n\n\n\npred EnrolledStudents {\n all c: Course | some s: Student | s.major = \"Computer Science\" and c in s.enrolledCourses\n}\n\n // This run command is unsatisfiable\nrun {\n\n some p: Professor | no c: Course | c in p.teaches\n} for 5 \n\n// This run command is satisfiable\n// run {\n// some s: Student, c: Course, p: Professor, r: Classroom s.major = \"Computer Science\" and c in s.enrolledCourses and TeachingCapacity[p, c, r] and EnrolledStudents\n// } for 5 but exactly 2 Student, 2 Course, 2 Professor, 2 Classroom\n\nrun{}", "permalink": "colt-angles-otter-cotton", "time": "2023-12-16 16:58:25.501185", "cmd": 2} {"id": 9266, "parent": 9265, "code": "// University Model\n\n// Signatures\nabstract sig Person { name: String, age: Int }\n\nsig Student extends Person { studentID: Int, major: String, enrolledCourses: set Course }\n\nsig Professor extends Person { staffID: Int, department: String, teaches: set Course }\n\nsig Course { courseCode: String, credits: Int }\n\nsig Classroom { roomNumber: Int, capacity: Int }\n\n// Inheritance\n// fact StudentsArePeople { all s: Student | s in Person }\nfact professorArePerson { all p: Professor | p in Person }\n// Facts\nfact CoursesHaveUniqueCodes { all disj c1, c2: Course | c1.courseCode != c2.courseCode }\n\n// Predicates\npred TeachingCapacity[p: Professor, c: Course, r: Classroom] {\n some room: r | room.capacity > 30 \n}\n\npred EnrolledStudents {\n all c: Course | some s: Student | s.major = \"Computer Science\" and c in s.enrolledCourses\n}\n\n // This run command is unsatisfiable\nrun {\n\n some p: Professor | no c: Course | c in p.teaches\n} for 5 \n\n// This run command is satisfiable\nrun {\n some s: Student, c: Course, p: Professor, r: Classroom \n | s.major = \"Computer Science\" and c in s.enrolledCourses and TeachingCapacity[p, c, r] and EnrolledStudents\n} for 5 but exactly 2 Student, 2 Course, 2 Professor, 2 Classroom", "permalink": "citric-fax-harbor-repose", "time": "2023-12-16 17:02:11.281359", "cmd": 2} {"id": 9278, "parent": 9277, "code": "// A Person can be either a Student or a Professor.\nsig User {\n friends: some User\n}\n\nfact friendsAreSymmetric {\n all u: User | all v: u.friends | v.friends = u\n}\n\nfact no2friendsAreSame {\n all u: User | u.friends != u\n}\nrun {} for 3", "permalink": "duvet-snarl-purple-poppy", "time": "2023-12-16 17:08:40.720091", "cmd": 1} {"id": 9282, "parent": 9281, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash \n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n not Protected in Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n all f: File | (no f.link) or (lone f.link and no f.link.link)\n\n}\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\n}\nrun inv10", "permalink": "snuff-cyclic-groom-zone", "time": "2023-12-16 17:20:13.186375", "cmd": 4} {"id": 9283, "parent": 9282, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash \n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n not Protected in Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n// all u: File-Protected | u in Trash\nall u: Protected | not u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n all f: File | (no f.link) or (lone f.link and no f.link.link)\n\n}\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\n}\nrun inv10", "permalink": "thesis-lather-watch-revert", "time": "2023-12-16 17:23:38.057995", "cmd": 4} {"id": 9286, "parent": 9285, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash \n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n not Protected in Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n// all u: File-Protected | u in Trash\nall u: Protected | not u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File , l: f.link | l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n all f: File | (no f.link) or (lone f.link and no f.link.link)\n\n}\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\n}\nrun inv10", "permalink": "casket-spur-sudden-jab", "time": "2023-12-16 17:33:36.517688", "cmd": 7} {"id": 9287, "parent": 9286, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash \n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n not Protected in Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n// all u: File-Protected | u in Trash\nall u: Protected | not u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File , l: f.link | l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | no f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n all f: File | (no f.link) or (lone f.link and no f.link.link)\n\n}\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\n}\nrun inv10", "permalink": "posing-garter-food-banish", "time": "2023-12-16 17:39:05.391145", "cmd": 8} {"id": 9302, "parent": 9301, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash \n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n// all u: File-Protected | u in Trash\nall u: Protected | not u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File , l: f.link | not l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | no f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // all f: File | (no f.link) or (lone f.link and no f.link.link)\n all f: File, l: f.link | not l in f.link\n \n}\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n// all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\nall f: File | f.link in Trash implies f in Trash\n}\nrun inv10", "permalink": "remake-wake-outwit-tamer", "time": "2023-12-16 18:06:54.639418", "cmd": 4} {"id": 9307, "parent": 9306, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash \n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n// all u: File-Protected | u in Trash\nall u: unProtected | u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n// no f: File, l: f.link | l in Trash\n no f: File , l: f.link | l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | no f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // all f: File | (no f.link) or (lone f.link and no f.link.link)\n all f: File, l: f.link | not l in f.link\n \n}\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n// all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\nall f: File | f.link in Trash implies f in Trash\n}\nrun inv10", "permalink": "preset-snarl-candle-wafer", "time": "2023-12-16 18:21:18.760964", "cmd": 5} {"id": 9309, "parent": 9308, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash \n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected and Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n// all u: File-Protected | u in Trash\nall u: File-Protected | u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n// no f: File, l: f.link | l in Trash\n no f: File , l: f.link | l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n// no f: File | some f.link\n no f: File | some f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // all f: File | (no f.link) or (lone f.link and no f.link.link)\n all f: File, l: f.link | not l in f.link\n}\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n// all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\nall f: File | f.link in Trash implies f in Trash\n}\nrun inv10", "permalink": "mower-carton-said-gothic", "time": "2023-12-16 18:26:53.613098", "cmd": 4} {"id": 9312, "parent": 9311, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash \n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n// all u: File-Protected | u in Trash\nall u: File-Protected | u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n// no f: File, l: f.link | l in Trash\n no f: File , l: f.link | l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n// no f: File | some f.link\n no f: File | some f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // all f: File | (no f.link) or (lone f.link and no f.link.link)\n all f: File, l: f.link | lone l in f.link\n}\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n// all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\n all f: File | (f.link in Trash implies f in Trash) (and f in Trash implies f.link in trash)\n}\nrun inv10", "permalink": "cherub-paddle-swirl-thus", "time": "2023-12-16 18:30:48.248377", "cmd": 10} {"id": 9317, "parent": 9316, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash \n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n// all u: File-Protected | u in Trash\nall u: File-Protected | u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n// no f: File, l: f.link | l in Trash\n no f: File , l: f.link | l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n// no f: File | some f.link\n no f: File | some f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // all f: File | (no f.link) or (lone f.link and no f.link.link)\n all f: File | lone f.link in f.link.link\n}\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n// all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\n all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in trash)\n}\nrun inv10", "permalink": "spruce-jet-polka-attest", "time": "2023-12-16 18:32:50.635076", "cmd": 9} {"id": 9319, "parent": 9318, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash \n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n// all u: File-Protected | u in Trash\nall u: File-Protected | u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n// no f: File, l: f.link | l in Trash\n no f: File , l: f.link | l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n// no f: File | some f.link\n no f: File | some f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // all f: File | (no f.link) or (lone f.link and no f.link.link)\n all f: File | lone f.link and no f.link.link\n} \nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n// all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\n all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in trash)\n}\nrun inv10", "permalink": "astute-elated-remedy-swept", "time": "2023-12-16 18:33:28.451881", "cmd": 9} {"id": 9320, "parent": 9319, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash \n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n// all u: File-Protected | u in Trash\nall u: File-Protected | u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n// no f: File, l: f.link | l in Trash\n no f: File , l: f.link | l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n// no f: File | some f.link\n no f: File | some f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // all f: File | (no f.link) or (lone f.link and no f.link.link)\n all f: File | lone f.link and no f.link.link\n} \nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n// all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\n all f: File | f.link in Trash implies f in Trash and f in Trash implies f.link in Trash\n}\nrun inv10", "permalink": "zippy-relay-entail-boney", "time": "2023-12-16 18:33:51.847439", "cmd": 9} {"id": 9322, "parent": 9321, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash \n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n// all u: File-Protected | u in Trash\nall u: File-Protected | u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n// no f: File, l: f.link | l in Trash\n no f: File , l: f.link | l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n// no f: File | some f.link\n no f: File | some f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // all f: File | (no f.link) or (lone f.link and no f.link.link)\n all f: File | lone f.link and no f.link.link\n} \nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n// all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\n all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\n}\nrun inv10", "permalink": "sturdy-hardy-skirt-art", "time": "2023-12-16 18:34:01.510600", "cmd": 10} {"id": 9326, "parent": 9324, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\npred quantEncoding {\n some x : Person | Agatha in x.killed\n all x, y : Person | y in x.killed implies (y in x.hates and y not in x.richer)\n all x : Person | x in Agatha.hates implies x not in Charles.hates\n Agatha in Agatha.hates and Charles in Agatha.hates\n all x : Person | Agatha not in x.richer implies x in Butler.hates\n all x : Person | x in Agatha.hates implies x in Butler.hates\n all x : Person | some y : Person | y not in x.hates\n}\n\nrun quantEncoding for 3", "permalink": "giggly-uphold-deface-creed", "time": "2023-12-17 17:20:57.945304", "cmd": 1} {"id": 9328, "parent": 9327, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\nrun {no List and no Node} for 3", "permalink": "aptly-stark-okay-imply", "time": "2023-12-17 17:49:40.044083", "cmd": 1} {"id": 9332, "parent": 9331, "code": "abstract sig A {}\nsig B {}\none sig A1 extends A {}\none sig A2 extends A {}\n// A { f: B lone->lone B }\nf:set (B lone->lone B)\nA { g: B }\npred someG { some g } \npred atMostThree[x:univ, y:univ] { #(x+y) >= 3 }\nrun { some A && atMostThree[B,B] } for 3 but 3 int, 3 seq\nrun { some f && SomeG[] } for 3 but 2 int, 1 seq, 5 A, exactly \n", "permalink": "path-ovary-grub-scouts", "time": "2023-12-17 18:39:46.294669", "cmd": 1} {"id": 9335, "parent": 9334, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "swoop-stress-pleat-barrel", "time": "2023-12-17 19:33:56.086203", "cmd": 1} {"id": 9336, "parent": null, "code": "sig A{ }\nrun {}", "permalink": "stoke-rehire-clump-posing", "time": "2023-12-17 21:40:42.292118", "cmd": 1} {"id": 9345, "parent": 8169, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n// University Library Management System\n// Signatures\n\n// Person\nabstract sig Person{\n memberOfDepartment: set Department,\n id : Int\n}\n\n// Inheritance: Student extends Person\nsig Student extends Person{\n hasMembership: lone Membership,\n borrowedBooks: set Book\n}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book,\n supervises: set Student \n}\n\n// Book\nsig Book {\n inLibrary : one Library,\n checkOutBy: set Student\n}\n\n// Department\nsig Department {\n associatedStudents: set Student,\n departmentLibrarian: one Librarian\n}\n\n//Library\nsig Library{\n contains :some Book,\n incharge: some Librarian\n}\n\n// Membership\nsig Membership{\n belongsTo: set Student,\n validTill : one Date\n}\n\n//Date\nsig Date{\n day: Int,\n month: Int,\n Year: Int\n}\n\n// Facts\n// fact: A student without membership cannot borrow books\nfact studentWithoutMembershipCanNotBorrowBooks{\n all student: Student | no student.hasMembership implies no student.borrowedBooks\n}\n\n// fact: Each book can be checked out by at most one student at a time\nfact bookCheckedOutByAtMostOneStudent {\n all book: Book | #book.checkOutBy <= 1\n}\n\n// fact: There is only one Library instance\nfact onlyOneLibrary {\n #Library = 1\n}\n\n//Predicates\n// Check if someone has borrowed a book or not\npred someoneHasBorrowedABook {\n some student: Student | some student.borrowedBooks\n}\n\n// check if atleast one librarian exists\npred atLeastOneLibrarianExists {\n some Librarian\n}\n\n// The first run command should be unsatisfiable\n// Without membership, one can not borrow books\nrun someoneHasBorrowedABook for 5 but 0 Membership\n\n// The second run command should be satisfiable and return at least 2 instances.\nrun atLeastOneLibrarianExists", "permalink": "image-cling-humvee-motive", "time": "2023-12-18 12:13:16.785211", "cmd": 2} {"id": 9381, "parent": null, "code": "module trees\n\nsig Tree {\n x : Int,\n y : Int\n} {\n x >= 0 and x <= 7\n y >= 0 and y <= 7\n}\n\npred placement {\n // no shared row, column, or diagonal\n \n}\n\nrun placement for 3 but exactly 8 Tree, 5 Int", "permalink": "spooky-waged-duvet-come", "time": "2023-12-18 22:14:22.520348", "cmd": 1} {"id": 9382, "parent": 9381, "code": "module trees\n\nsig Tree {\n x : Int,\n y : Int\n} {\n x >= 0 and x <= 7\n y >= 0 and y <= 7\n}\n\npred placement {\n // no shared row, column, or diagonal\n all disj t1, t2 : Tree |\n (t1.x != t2.x and t1.y != t2.y) and\n (minus[t1.x, t1.y] != minus[t2.x, t2.y]) and\n (plus[t1.x, t1.y] != plus[t2.x, t2.y])\n \n}\n\nrun placement for 3 but exactly 8 Tree, 5 Int", "permalink": "virus-limit-tumble-sandy", "time": "2023-12-18 22:35:01.707500", "cmd": 1} {"id": 9383, "parent": 9380, "code": "module SecretSanta\n\nsig Employee {\n officePartners : set Employee,\n isSecretSantaFor : one Employee\n}\nsig Intern extends Employee { \n supervisor : one Employee \n}\n\npred santaRules {\n // Everyone has a Secret Santa, and nobody is their \n // own Secret Santa.\n Employee in Employee.isSecretSantaFor\n no isSecretSantaFor & iden\n // Nobody should get a person assigned that they \n // share an office with.\n no isSecretSantaFor & officePartners\n // No intern should have to buy a present for their \n // supervisor.\n no isSecretSantaFor & supervisor\n}\n\nrun santaRules for 3", "permalink": "turkey-entomb-chrome-trifle", "time": "2023-12-18 22:37:26.243557", "cmd": 1} {"id": 9384, "parent": 9379, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n(one Puppy or one Doll) and (one PS5 or one Xbox)\n // If you get me a puppy, I also want a dog basket and \n // a ball.\none Puppy implies (one DogBasket and one Ball)\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \none Doll implies (one Dresses and one BarbieGame)\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\none Puppy implies no PS5 and one DogGame\n // Only if I get the doll, I want a dollhouse.\none Doll iff one DollHouse\n}\n\nrun wishes for 1", "permalink": "bagged-maimed-second-header", "time": "2023-12-18 22:40:06.116601", "cmd": 1} {"id": 9399, "parent": 9395, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n (some Puppy or some Doll) and (some PS5 or some Xbox)\n // If you get me a puppy, I also want a dog basket and \n // a ball.\nPuppy implies some DogBasket and some Ball\n // If I get the doll, I want dresses for the doll and the PS5 Barbie game.\n Doll implies some Dresses and some BarbieGame\n\n // If I get the puppy, I don’t want the PS5 since only the Xbox has the dog game I want in that case.\n Puppy and Xbox implies no PS5\n\n // Only if I get the doll, I want a dollhouse.\n Doll implies some DollHouse\n\n}\n\nrun wishes for 1", "permalink": "drippy-around-trench-party", "time": "2023-12-19 08:45:42.039453", "cmd": 1} {"id": 9401, "parent": 9399, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n some Puppy or some Doll and some PS5 or some Xbox\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n Puppy implies some DogBasket and some Ball\n // If I get the doll, I want dresses for the doll and the PS5 Barbie game.\n Doll implies some Dresses and some BarbieGame\n\n // If I get the puppy, I don’t want the PS5 since only the Xbox has the dog game I want in that case.\n Puppy and Xbox implies no PS5\n\n // Only if I get the doll, I want a dollhouse.\n Doll implies some DollHouse\n\n}\n\nrun wishes for 1", "permalink": "eldest-lego-gizmo-strode", "time": "2023-12-19 08:46:02.578083", "cmd": 1} {"id": 9410, "parent": 9409, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n one Puppy or one Doll and one PS5 or one Xbox\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n one Puppy implies one DogBasket and one Ball\n // If I get the doll, I want dresses for the doll and the PS5 Barbie game.\n one Doll implies one Dresses and one BarbieGame\n\n // If I get the puppy, I don’t want the PS5 since only the Xbox has the dog game I want in that case.\n one Puppy and Xbox implies no PS5\n\n // Only if I get the doll, I want a dollhouse.\n Doll implies some DollHouse\n\n}\n\nrun wishes for 1", "permalink": "dill-untie-blade-crazy", "time": "2023-12-19 08:47:28.775686", "cmd": 1} {"id": 9413, "parent": 9411, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n some Puppy + Doll \n some PS5 + Xbox\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n one Puppy => (DogBasket + Ball)\n\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n one Doll => (Dresses + BarbieGame)\n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n one Puppy => no PS5\n\n // Only if I get the doll, I want a dollhouse.\n one Doll => DollHouse\n\n}\n\nrun wishes for 1", "permalink": "grass-stilt-bony-barrel", "time": "2023-12-19 08:47:39.975385", "cmd": 1} {"id": 9432, "parent": 9430, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n lone (Puppy + Doll) \n lone (PS5 + Xbox)\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n one Puppy => (DogBasket + Ball)\n\n\n// // If I get the doll, I want dresses for the doll and \n// // the PS5 Barbie game. \n// one Doll => (Dresses + BarbieGame)\n\n// // If I get the puppy, I don’t want the PS5 since only\n// // the Xbox has the dog game I want in that case.\n// one Puppy => no PS5\n\n// // Only if I get the doll, I want a dollhouse.\n// one Doll => DollHouse\n\n}\n\nrun wishes for 1", "permalink": "shaded-zippy-zips-spotty", "time": "2023-12-19 08:51:36.670231", "cmd": 1} {"id": 9437, "parent": 9435, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n some (Puppy + Doll) \n some (PS5 + Xbox)\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n one Puppy => one (DogBasket + Ball)\n\n// // If I get the doll, I want dresses for the doll and \n// // the PS5 Barbie game. \n one Doll => one (Dresses + BarbieGame)\n\n// // If I get the puppy, I don’t want the PS5 since only\n// // the Xbox has the dog game I want in that case.\n one Puppy => no PS5\n\n// // Only if I get the doll, I want a dollhouse.\n one Doll => one DollHouse\n\n}\n\nrun wishes for 1", "permalink": "cursor-amid-joyous-cosmos", "time": "2023-12-19 08:52:46.351950", "cmd": 1} {"id": 9440, "parent": 9439, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n one (Puppy or Doll)\n one (PS5 or Xbox)\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n\n // Only if I get the doll, I want a dollhouse.\n\n}\n\nrun wishes for 1", "permalink": "deluxe-errant-silt-museum", "time": "2023-12-19 08:53:10.472786", "cmd": 1} {"id": 9442, "parent": 9379, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n (one Puppy or one Doll) and (one PS5 or one Xbox)\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n\n // Only if I get the doll, I want a dollhouse.\n\n}\n\nrun wishes for 1", "permalink": "rename-subpar-smog-rack", "time": "2023-12-19 08:54:01.048308", "cmd": 1} {"id": 9457, "parent": 9428, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n \n \n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n (one Puppy or one Doll) and (one PS5 or one Xbox)\n\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n (one Puppy) implies (one DogBasket and one Ball)\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n one Doll implies (one Dresses and one BarbieGame and one PS5) \n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n one Puppy implies (no PS5 and one Xbox and one DogGame)\n\n // Only if I get the doll, I want a dollhouse.\n no Doll implies no DollHouse\n\n}\n\nrun wishes for 1", "permalink": "cusp-nervy-okay-crease", "time": "2023-12-19 08:57:53.410368", "cmd": 1} {"id": 9461, "parent": 9460, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n \n \n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n (one Puppy or one Doll) and (one PS5 or one Xbox)\n\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n (one Puppy) implies (one DogBasket and one Ball)\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n one Doll implies (one Dresses and one BarbieGame and one PS5) \n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n one Puppy implies (no PS5 and one Xbox and one DogGame)\n\n // Only if I get the doll, I want a dollhouse.\n no Doll implies no DollHouse\n\n one DollHouse\n no Doll\n}\n\nrun wishes for 1", "permalink": "acting-vista-riches-affix", "time": "2023-12-19 08:58:22.617362", "cmd": 1} {"id": 9462, "parent": 9461, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n \n \n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n (one Puppy or one Doll) and (one PS5 or one Xbox)\n\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n (one Puppy) implies (one DogBasket and one Ball)\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n one Doll implies (one Dresses and one BarbieGame and one PS5) \n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n one Puppy implies (no PS5 and one Xbox and one DogGame)\n\n // Only if I get the doll, I want a dollhouse.\n no Doll implies no DollHouse\n}\n\nrun wishes for 1", "permalink": "groom-spoken-sift-exile", "time": "2023-12-19 08:58:28.104990", "cmd": 1} {"id": 9463, "parent": 9451, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n (one Puppy or one Doll) and (one PS5 or one Xbox)\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n (one Puppy) implies (one DogBasket and one Ball)\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n\n // Only if I get the doll, I want a dollhouse.\n one Puppy\n}\n\nrun wishes for 1", "permalink": "avatar-coping-baggy-sermon", "time": "2023-12-19 08:59:27.879412", "cmd": 1} {"id": 9464, "parent": 9450, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n (one Puppy or one Doll) and (one PS5 or one Xbox)\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n (one Puppy) implies (one DogBasket and one Ball) \n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n (one Doll) implies (one Dresses and one BarbieGame )\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n one Puppy implies (no PS5 )\n // Only if I get the doll, I want a dollhouse.\n (one Doll) implies (one DollHouse) \n\n}\n\nrun wishes for 1", "permalink": "sanded-sift-heat-statue", "time": "2023-12-19 09:01:50.012748", "cmd": 1} {"id": 9468, "parent": 9467, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n (one Puppy or one Doll) and (one PS5 or one Xbox)\n // some (PS5 + Xbox)\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n one Puppy => (one DogBasket and one Ball)\n\n// // If I get the doll, I want dresses for the doll and \n// // the PS5 Barbie game. \n one Doll => (one Dresses and one BarbieGame)\n\n// // If I get the puppy, I don’t want the PS5 since only\n// // the Xbox has the dog game I want in that case.\n one Puppy => (no PS5 and DogGame)\n\n// // Only if I get the doll, I want a dollhouse.\n one Doll => one DollHouse\n\n}\n\nrun wishes for 1", "permalink": "gargle-gas-wilt-clump", "time": "2023-12-19 09:02:50.149519", "cmd": 1} {"id": 9469, "parent": 9468, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n (one Puppy or one Doll) and (one PS5 or one Xbox)\n // some (PS5 + Xbox)\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n one Puppy => (one DogBasket and one Ball)\n\n// // If I get the doll, I want dresses for the doll and \n// // the PS5 Barbie game. \n one Doll => (one Dresses and one BarbieGame)\n\n// // If I get the puppy, I don’t want the PS5 since only\n// // the Xbox has the dog game I want in that case.\n one Puppy => (no PS5 and one DogGame)\n\n// // Only if I get the doll, I want a dollhouse.\n one Doll => one DollHouse\n\n}\n\nrun wishes for 1", "permalink": "oops-sedan-dreamt-crept", "time": "2023-12-19 09:02:58.825738", "cmd": 1} {"id": 9475, "parent": 9472, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n (one Puppy or one Doll) and (one PS5 or one Xbox)\n \n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n (one Puppy) implies (one DogBasket and one Ball)\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n (one Doll) implies (some Dresses and one BarbieGame)\n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n (one Puppy) (implies (no PS5) & ((some Xbox) implies DogGame) implies (one PS5))\n // Only if I get the doll, I want a dollhouse.\n (one Doll) implies (one DollHouse)\n}\n\nrun wishes for 1", "permalink": "series-state-hassle-shifty", "time": "2023-12-19 09:05:41.899779", "cmd": 1} {"id": 9480, "parent": 9479, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n (one Puppy or one Doll) and (one PS5 or one Xbox)\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n one Puppy implies (one DogBasket and one Ball)\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n one Doll implies (one Dresses and one BarbieGame)\n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n one Puppy implies ((no PS5) and one Xbox)\n\n // Only if I get the doll, I want a dollhouse.\n one Doll iff one DollHouse\n}\n\nrun wishes for 1", "permalink": "aloe-scope-nearby-tidy", "time": "2023-12-19 09:08:52.232969", "cmd": 1} {"id": 9267, "parent": 9266, "code": "// University Model\n\n// Signatures\nabstract sig Person { name: String, age: Int }\n\nsig Student extends Person { studentID: Int, major: String, enrolledCourses: set Course }\n\nsig Professor extends Person { staffID: Int, department: String, teaches: set Course }\n\nsig Course { courseCode: String, credits: Int }\n\nsig Classroom { roomNumber: Int, capacity: Int }\n\n// Inheritance\n// fact StudentsArePeople { all s: Student | s in Person }\nfact professorArePerson { all p: Professor | p in Person }\n// Facts\nfact CoursesHaveUniqueCodes { all disj c1, c2: Course | c1.courseCode != c2.courseCode }\n\n// Predicates\npred TeachingCapacity[p: Professor, c: Course, r: Classroom] {\n some room: r | room.capacity > 30 \n}\n\npred EnrolledStudents {\n all c: Course | some s: Student | s.major = \"Computer Science\" and c in s.enrolledCourses\n}\n\n // This run command is unsatisfiable\nrun {\n\n some p: Professor | no c: Course | c in p.teaches\n} for 5 \n\n// This run command is satisfiable\nrun {\n some s: Student, c: Course, p: Professor, r: Classroom \n | s.major = \"Computer Science\"\n and c in s.enrolledCourses\n and TeachingCapacity[p, c, r] \n and EnrolledStudents\n} for 5 but exactly 2 Student, 2 Course, 2 Professor, 2 Classroom", "permalink": "frolic-wildly-ripple-shank", "time": "2023-12-16 17:02:32.930020", "cmd": 2} {"id": 9268, "parent": 8670, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash\n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n all f: File | (no f.link) or (lone f.link and no f.link.link)\n\n}\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\n}\nrun inv10", "permalink": "muzzle-given-worst-chest", "time": "2023-12-16 17:04:22.812263", "cmd": 1} {"id": 9274, "parent": 9273, "code": "// A Person can be either a Student or a Professor.\nsig User {\n friends: some User\n}\n\nfact friendsAreSymmetric {\n all u: User | all v: u.friends | v.friends = u\n}\n\n\nrun {} for 2", "permalink": "shove-lumber-gallon-falcon", "time": "2023-12-16 17:06:36.500253", "cmd": 1} {"id": 9276, "parent": 9270, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash \n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n all u: File-Protected | u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File, l: f.link | l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | some f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n all f: File | (no f.link) or (lone f.link and no f.link.link)\n\n}\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\n}\nrun inv10", "permalink": "thud-cursor-postal-winner", "time": "2023-12-16 17:08:01.526330", "cmd": 2} {"id": 9289, "parent": 9288, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash \n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n not Protected in Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n// all u: File-Protected | u in Trash\nall u: Protected | not u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File , l: f.link | not l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | no f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n all f: File | (no f.link) or (lone f.link and no f.link.link)\n\n}\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\n}\nrun inv10", "permalink": "bonus-sprawl-cloak-curing", "time": "2023-12-16 17:39:43.136656", "cmd": 7} {"id": 9295, "parent": null, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash \n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n not Protected in Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n// all u: File-Protected | u in Trash\nall u: Protected | not u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File , l: f.link | not l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | no f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // all f: File | (no f.link) or (lone f.link and no f.link.link)\n all f: File, l: f.link | not l in f.link\n \n}\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n// all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\nall f: File | f.link in Trash implies f in Trash\n}\nrun inv10", "permalink": "widen-sister-gills-flaky", "time": "2023-12-16 18:04:15.989525", "cmd": 1} {"id": 9298, "parent": 9297, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash \n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n// all u: File-Protected | u in Trash\nall u: Protected | not u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n no f: File , l: f.link | not l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | no f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // all f: File | (no f.link) or (lone f.link and no f.link.link)\n all f: File, l: f.link | not l in f.link\n \n}\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n// all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\nall f: File | f.link in Trash implies f in Trash\n}\nrun inv10", "permalink": "rift-mossy-shell-unread", "time": "2023-12-16 18:06:06.251424", "cmd": 4} {"id": 9305, "parent": 9304, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash \n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n// all u: File-Protected | u in Trash\nall u: File-Protected | u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n// no f: File, l: f.link | l in Trash\n f: File , l: f.link | no l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n no f: File | no f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // all f: File | (no f.link) or (lone f.link and no f.link.link)\n all f: File, l: f.link | not l in f.link\n \n}\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n// all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\nall f: File | f.link in Trash implies f in Trash\n}\nrun inv10", "permalink": "used-thorn-grudge-could", "time": "2023-12-16 18:20:59.726042", "cmd": 5} {"id": 9313, "parent": 9312, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash \n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n// all u: File-Protected | u in Trash\nall u: File-Protected | u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n// no f: File, l: f.link | l in Trash\n no f: File , l: f.link | l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n// no f: File | some f.link\n no f: File | some f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // all f: File | (no f.link) or (lone f.link and no f.link.link)\n all f: File, l: f.link | lone l in f.link\n}\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n// all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\n all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in trash)\n}\nrun inv10", "permalink": "drier-making-quake-ploy", "time": "2023-12-16 18:31:00.307339", "cmd": 10} {"id": 9314, "parent": 9313, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash \n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n// all u: File-Protected | u in Trash\nall u: File-Protected | u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n// no f: File, l: f.link | l in Trash\n no f: File , l: f.link | l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n// no f: File | some f.link\n no f: File | some f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // all f: File | (no f.link) or (lone f.link and no f.link.link)\n all f: File , l: f.link | lone l in f.link\n}\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n// all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\n all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in trash)\n}\nrun inv10", "permalink": "pox-flashy-sequel-dinner", "time": "2023-12-16 18:31:47.098367", "cmd": 9} {"id": 9315, "parent": 9314, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the following example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink: set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n no Trash \n}\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n all f: File | f in Trash \n}\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n some f: File | f in Trash\n}\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n no Protected & Trash\n}\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n// all u: File-Protected | u in Trash\nall u: File-Protected | u in Trash\n}\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n all f: File | lone f.link\n}\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n// no f: File, l: f.link | l in Trash\n no f: File , l: f.link | l in Trash\n}\nrun inv7\n\n/* There are no links. */\npred inv8 {\n// no f: File | some f.link\n no f: File | some f.link\n}\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // all f: File | (no f.link) or (lone f.link and no f.link.link)\n all f: File | l: f.link | lone l in f.link\n}\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n// all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in Trash)\n all f: File | (f.link in Trash implies f in Trash) and (f in Trash implies f.link in trash)\n}\nrun inv10", "permalink": "statue-bonus-emit-agony", "time": "2023-12-16 18:32:04.240958", "cmd": 9} {"id": 9324, "parent": 9279, "code": "module DreadburyQuant\n\nabstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\npred quantEncoding {\n some x : Person | Agatha in x.killed\n all x, y : Person | y in x.killed implies (y in x.hates and y not in x.richer)\n all x : Person | x in Agatha.hates implies x not in Charles.hates\n Agatha in Agatha.hates and Charles in Agatha.hates\n all x : Person | Agatha not in x.richer implies x in Butler.hates\n all x : Person | x in Agatha.hates implies x in Butler.hates\n all x : Person | some y : Person | y not in x.hates\n}\n\nrun quantEncoding for 3", "permalink": "width-bluff-comply-gnat", "time": "2023-12-16 19:22:30.377247", "cmd": 1} {"id": 9327, "parent": 9326, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3", "permalink": "pardon-repair-syrup-harbor", "time": "2023-12-17 17:49:02.423214", "cmd": 1} {"id": 9333, "parent": 9332, "code": "abstract sig A {}\nsig B {}\none sig A1 extends A {}\none sig A2 extends A {}\nA { f: set (lone->lone B) }\n// f:set (B lone->lone B)\nA { g: B }\npred someG { some g } \npred atMostThree[x:univ, y:univ] { #(x+y) >= 3 }\nrun { some A && atMostThree[B,B] } for 3 but 3 int, 3 seq\nrun { some f && SomeG[] } for 3 but 2 int, 1 seq, 5 A, exactly \n", "permalink": "dimple-popper-jawed-chummy", "time": "2023-12-17 18:40:34.342707", "cmd": 1} {"id": 9388, "parent": 9386, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n // all p: Puppy | all d: Doll | all ps5: PS5 | all xbox: Xbox | (p or d) and (ps5 or xbox)\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n\n // Only if I get the doll, I want a dollhouse.\n\n}\n\nrun wishes for 1", "permalink": "affirm-molar-vowel-palace", "time": "2023-12-19 08:41:25.749958", "cmd": 1} {"id": 9389, "parent": 9388, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n all p: Puppy | all d: Doll | all ps5: PS5 | all xbox: Xbox | (p or d) and (ps5 or xbox)\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n\n // Only if I get the doll, I want a dollhouse.\n\n}\n\nrun wishes for 1", "permalink": "attach-slider-yoga-tacky", "time": "2023-12-19 08:42:08.485741", "cmd": 1} {"id": 9390, "parent": 9387, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n Puppy or Doll or PS5 or Xbox\n\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n Puppy implies DogBasket and Ball\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n Doll implies Dresses and BarbieGame\n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n Puppy implies no(PS5) and Xbox\n\n // Only if I get the doll, I want a dollhouse.\n Doll implies DollHouse\n}\n\nrun wishes for 1", "permalink": "bootie-wizard-reply-banner", "time": "2023-12-19 08:42:24.903220", "cmd": 1} {"id": 9391, "parent": 9390, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n Puppy or Doll or PS5 or Xbox\n\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n Puppy implies DogBasket and Ball\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n Doll implies Dresses and BarbieGame\n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n Puppy implies no(PS5) and Xbox\n\n // Only if I get the doll, I want a dollhouse.\n Doll implies DollHouse\n}\n\nrun wishes for 1", "permalink": "cornea-mating-false-carrot", "time": "2023-12-19 08:42:41.447244", "cmd": 1} {"id": 9392, "parent": 9391, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n Puppy or Doll or PS5 or Xbox\n\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n Puppy implies DogBasket and Ball\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n Doll implies Dresses and BarbieGame\n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n Puppy implies no(PS5) and Xbox\n\n // Only if I get the doll, I want a dollhouse.\n Doll implies DollHouse\n}\n\nrun wishes for 1", "permalink": "mumble-derail-guts-yarn", "time": "2023-12-19 08:43:17.405224", "cmd": 1} {"id": 9393, "parent": 9379, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n (some Puppy or some Doll) and (some PS5 or some Xbox)\n // If you get me a puppy, I also want a dog basket and \n // a ball.\nPuppy => (some DogBasket and some Ball)\n // If I get the doll, I want dresses for the doll and the PS5 Barbie game.\n Doll => (some Dresses and some BarbieGame)\n\n // If I get the puppy, I don’t want the PS5 since only the Xbox has the dog game I want in that case.\n (Puppy and Xbox) => no PS5\n\n // Only if I get the doll, I want a dollhouse.\n Doll => some DollHouse\n\n}\n\nrun wishes for 1", "permalink": "cramp-chump-usage-reward", "time": "2023-12-19 08:44:48.941033", "cmd": 1} {"id": 9394, "parent": 9392, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n Puppy or Doll or PS5 or Xbox\n\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n Puppy implies DogBasket and Ball\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n Doll implies Dresses and BarbieGame\n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n Puppy implies no(PS5) and Xbox\n\n // Only if I get the doll, I want a dollhouse.\n Doll implies DollHouse\n}\n\nrun wishes for 1", "permalink": "speech-lesser-waking-cheer", "time": "2023-12-19 08:44:53.374916", "cmd": 1} {"id": 9395, "parent": 9393, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n (some Puppy or some Doll) and (some PS5 or some Xbox)\n // If you get me a puppy, I also want a dog basket and \n // a ball.\nPuppy => (some DogBasket and some Ball)\n // If I get the doll, I want dresses for the doll and the PS5 Barbie game.\n Doll => (some Dresses and some BarbieGame)\n\n // If I get the puppy, I don’t want the PS5 since only the Xbox has the dog game I want in that case.\n (Puppy and Xbox) => no PS5\n\n // Only if I get the doll, I want a dollhouse.\n Doll => some DollHouse\n\n}\n\nrun wishes for 1", "permalink": "shrill-city-such-chummy", "time": "2023-12-19 08:45:14.024235", "cmd": 1} {"id": 9402, "parent": 9400, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n one Puppy or one Doll or one PS5 or one Xbox\n\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n Puppy implies DogBasket and Ball\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n Doll implies Dresses and BarbieGame\n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n Puppy implies no(PS5) and Xbox\n\n // Only if I get the doll, I want a dollhouse.\n Doll implies DollHouse\n}\n\nrun wishes for 1", "permalink": "tiny-spoon-change-simile", "time": "2023-12-19 08:46:15.742727", "cmd": 1} {"id": 9405, "parent": 9403, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n p: Puppy | d: Doll | (p or d)\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n \n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n\n // Only if I get the doll, I want a dollhouse.\n\n}\n\nrun wishes for 1", "permalink": "roman-uncut-deploy-trance", "time": "2023-12-19 08:46:58.881581", "cmd": 1} {"id": 9406, "parent": 9404, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n one Puppy or one Doll and one PS5 or one Xbox\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n Puppy implies one DogBasket and one Ball\n // If I get the doll, I want dresses for the doll and the PS5 Barbie game.\n Doll implies one Dresses and one BarbieGame\n\n // If I get the puppy, I don’t want the PS5 since only the Xbox has the dog game I want in that case.\n Puppy and Xbox implies no PS5\n\n // Only if I get the doll, I want a dollhouse.\n Doll implies some DollHouse\n\n}\n\nrun wishes for 1", "permalink": "ending-balmy-hermit-stole", "time": "2023-12-19 08:47:06.579496", "cmd": 1} {"id": 9408, "parent": 9402, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n one Puppy or one Doll or one PS5 or one Xbox\n\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n one Puppy implies one DogBasket and one Ball\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n one Doll implies one Dresses and one BarbieGame\n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n one Puppy implies no(one PS5) and one Xbox\n\n // Only if I get the doll, I want a dollhouse.\n one Doll implies one DollHouse\n}\n\nrun wishes for 1", "permalink": "crayon-rocker-tank-nylon", "time": "2023-12-19 08:47:18.801508", "cmd": 1} {"id": 9409, "parent": 9406, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n one Puppy or one Doll and one PS5 or one Xbox\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n one Puppy implies one DogBasket and one Ball\n // If I get the doll, I want dresses for the doll and the PS5 Barbie game.\n one Doll implies one Dresses and one BarbieGame\n\n // If I get the puppy, I don’t want the PS5 since only the Xbox has the dog game I want in that case.\n Puppy and Xbox implies no PS5\n\n // Only if I get the doll, I want a dollhouse.\n Doll implies some DollHouse\n\n}\n\nrun wishes for 1", "permalink": "armory-headed-duvet-impose", "time": "2023-12-19 08:47:21.568050", "cmd": 1} {"id": 9411, "parent": 9379, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n some Puppy + Doll \n some PS5 + Xbox\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n one Puppy => (DogBasket + Ball)\n\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n one Doll => (Dresses + BarbieGame)\n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n one Puppy => no PS5\n\n // Only if I get the doll, I want a dollhouse.\n Doll => DollHouse\n\n}\n\nrun wishes for 1", "permalink": "margin-possum-pencil-glitch", "time": "2023-12-19 08:47:32.284829", "cmd": 1} {"id": 9412, "parent": 9408, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n one Puppy or one Doll or one PS5 or one Xbox\n\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n one Puppy implies one DogBasket and one Ball\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n one Doll implies one Dresses and one BarbieGame\n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n one Puppy implies no one PS5 and one Xbox\n\n // Only if I get the doll, I want a dollhouse.\n one Doll implies one DollHouse\n}\n\nrun wishes for 1", "permalink": "mouth-sinner-pluck-rework", "time": "2023-12-19 08:47:33.553874", "cmd": 1} {"id": 9421, "parent": 9418, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n some Puppy + Doll \n lone PS5 + Xbox\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n// one Puppy => (DogBasket + Ball)\n\n\n// // If I get the doll, I want dresses for the doll and \n// // the PS5 Barbie game. \n// one Doll => (Dresses + BarbieGame)\n\n// // If I get the puppy, I don’t want the PS5 since only\n// // the Xbox has the dog game I want in that case.\n// one Puppy => no PS5\n\n// // Only if I get the doll, I want a dollhouse.\n// one Doll => DollHouse\n\n}\n\nrun wishes for 1", "permalink": "clamp-pacify-ogle-matted", "time": "2023-12-19 08:49:06.886775", "cmd": 1} {"id": 9422, "parent": 9415, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n one Puppy or one Doll or one PS5 or one Xbox\n\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n one Puppy implies one DogBasket and one Ball\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n one Doll implies one Dresses and one BarbieGame\n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n one Puppy implies not one PS5 and one Xbox\n\n // Only if I get the doll, I want a dollhouse.\n one Doll implies one DollHouse\n not some Doll implies not some DollHouse\n}\n\nrun wishes for 1", "permalink": "frill-whacky-ignore-shiny", "time": "2023-12-19 08:49:22.150024", "cmd": 1} {"id": 9424, "parent": 9423, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n lone p: Puppy \n // If you get me a puppy, I also want a dog basket and \n // a ball.\n \n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n\n // Only if I get the doll, I want a dollhouse.\n\n}\n\nrun wishes for 1", "permalink": "sprint-onto-crafty-map", "time": "2023-12-19 08:49:46.512644", "cmd": 1} {"id": 9427, "parent": 9379, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n one (Puppy | doll)\n one (PS5 | Xbox)\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n\n // Only if I get the doll, I want a dollhouse.\n\n}\n\nrun wishes for 1", "permalink": "lining-why-frayed-kung", "time": "2023-12-19 08:50:51.868589", "cmd": 1} {"id": 9428, "parent": 9379, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n \n all x:\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n all p : Puppy | p implies one DogBasket and one Ball\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n\n // Only if I get the doll, I want a dollhouse.\n\n}\n\nrun wishes for 12", "permalink": "unsure-paper-froth-prism", "time": "2023-12-19 08:50:56.851333", "cmd": 1} {"id": 9443, "parent": 9440, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n one Puppy or one Doll\n one PS5 or one Xbox\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n\n // Only if I get the doll, I want a dollhouse.\n\n}\n\nrun wishes for 1", "permalink": "oppose-ocelot-turban-fool", "time": "2023-12-19 08:54:01.723060", "cmd": 1} {"id": 9446, "parent": 9444, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n (one Puppy or one Doll) and (one PS5 or one Xbox)\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n // one Puppy implies (DogBasket or Ball) \n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n \n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n\n // Only if I get the doll, I want a dollhouse.\n\n}\n\nrun wishes for 1", "permalink": "pacify-chewy-tamer-sprung", "time": "2023-12-19 08:54:13.482222", "cmd": 1} {"id": 9454, "parent": 9445, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n (one Puppy or one Doll) and (one PS5 or one Xbox)\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n one Puppy implies (one DogBasket and one Ball)\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n one Doll implies (one Dresses and one BarbieGame)\n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n one Puppy implies ((not one PS5) and one Xbox)\n\n // Only if I get the doll, I want a dollhouse.\n one Doll implies one DollHouse\n}\n\nrun wishes for 1", "permalink": "prelaw-squint-nanny-legged", "time": "2023-12-19 08:56:20.758769", "cmd": 1} {"id": 9456, "parent": 9380, "code": "module SecretSanta\n\nsig Employee {\n officePartners : set Employee,\n isSecretSantaFor : one Employee\n}\nsig Intern extends Employee { \n supervisor : one Employee \n}\n\npred santaRules {\n // Everyone has a Secret Santa, and nobody is their own Secret Santa.\n all e: Employee | e.isSecretSantaFor != e\n\n // Nobody should get a person assigned that they share an office with.\n all e: Employee | no e.isSecretSantaFor & e.officePartners\n\n // No intern should have to buy a present for their supervisor.\n all i: Intern | i.supervisor != i.isSecretSantaFor\n\n}\n\nrun santaRules for 3", "permalink": "afford-shrug-cider-faster", "time": "2023-12-19 08:57:45.010732", "cmd": 1} {"id": 9460, "parent": 9457, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n \n \n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n (one Puppy or one Doll) and (one PS5 or one Xbox)\n\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n (one Puppy) implies (one DogBasket and one Ball)\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n one Doll implies (one Dresses and one BarbieGame and one PS5) \n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n one Puppy implies (no PS5 and one Xbox and one DogGame)\n\n // Only if I get the doll, I want a dollhouse.\n no Doll implies no DollHouse\n\n one DollHouse\n}\n\nrun wishes for 1", "permalink": "cape-chewer-unwell-saline", "time": "2023-12-19 08:58:16.410004", "cmd": 1} {"id": 9466, "parent": 9451, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n (one Puppy or one Doll) and (one PS5 or one Xbox)\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n (one Puppy) implies (one DogBasket and one Ball)\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n\n // If I get the puppy, I dont want the PS5 since only\n // the Xbox has the dog game I want in that case.\n\n // Only if I get the doll, I want a dollhouse.\n \n}\n\nrun wishes for 1", "permalink": "blade-shanty-wheat-kilt", "time": "2023-12-19 09:02:24.323717", "cmd": 1} {"id": 9467, "parent": 9455, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n (one Puppy or one Doll) and (one PS5 or one Xbox)\n // some (PS5 + Xbox)\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n one Puppy => (one DogBasket and one Ball)\n\n// // If I get the doll, I want dresses for the doll and \n// // the PS5 Barbie game. \n one Doll => (one Dresses and one BarbieGame)\n\n// // If I get the puppy, I don’t want the PS5 since only\n// // the Xbox has the dog game I want in that case.\n one Puppy => no PS5 and DogGame\n\n// // Only if I get the doll, I want a dollhouse.\n one Doll => one DollHouse\n\n}\n\nrun wishes for 1", "permalink": "irate-jovial-haven-myth", "time": "2023-12-19 09:02:36.492220", "cmd": 1} {"id": 9470, "parent": 9380, "code": "module SecretSanta\n\nsig Employee {\n officePartners: set Employee,\n isSecretSantaFor: one Employee\n}\n\nsig Intern extends Employee { \n supervisor: one Employee \n}\n\npred santaRules {\n // Everyone has a Secret Santa, and nobody is their \n // own Secret Santa.\n all e: Employee | one e.isSecretSantaFor && e.isSecretSantaFor != e\n\n // Nobody should get a person assigned that they \n // share an office with.\n all e: Employee | e.isSecretSantaFor !in e.officePartners\n\n // No intern should have to buy a present for their \n // supervisor.\n all i: Intern | i.supervisor != i.isSecretSantaFor\n}\n\nrun santaRules for 3", "permalink": "pueblo-shawl-creme-delete", "time": "2023-12-19 09:03:02.804814", "cmd": 1} {"id": 9472, "parent": 9471, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n (one Puppy or one Doll) and (one PS5 or one Xbox)\n \n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n (one Puppy) implies (one DogBasket and one Ball)\n\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n (one Doll) implies (some Dresses and one BarbieGame)\n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n (one Puppy) (implies (no PS5) & ((some Xbox) implies DogGame) implies (one PS5))\n // Only if I get the doll, I want a dollhouse.\n (one Doll) implies (one DollHouse)\n}\n\nrun wishes for 1", "permalink": "gloss-rudder-specks-bacon", "time": "2023-12-19 09:04:37.535334", "cmd": 1} {"id": 9473, "parent": 9470, "code": "module SecretSanta\n\nsig Employee {\n officePartners: set Employee,\n isSecretSantaFor: one Employee\n}\n\nsig Intern extends Employee { \n supervisor: one Employee \n}\n\npred santaRules {\n // Everyone has a Secret Santa, and nobody is their \n // own Secret Santa.\n all e: Employee | one e.isSecretSantaFor && e.isSecretSantaFor != e\n\n // Nobody should get a person assigned that they \n // share an office with.\n all e: Employee | e.isSecretSantaFor !in e.officePartners\n\n // No intern should have to buy a present for their \n // supervisor.\n all i: Intern | i.supervisor != i.isSecretSantaFor\n}\n\nrun santaRules for 3", "permalink": "ozone-kennel-repair-doozy", "time": "2023-12-19 09:05:18.202036", "cmd": 1} {"id": 9474, "parent": 9469, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n (one Puppy or one Doll) and (one PS5 or one Xbox)\n \n // If you get me a puppy, I also want a dog basket and \n // a ball.\n one Puppy => (one DogBasket and one Ball)\n\n// // If I get the doll, I want dresses for the doll and \n// // the PS5 Barbie game. \n one Doll => (one Dresses and one BarbieGame)\n\n// // If I get the puppy, I don’t want the PS5 since only\n// // the Xbox has the dog game I want in that case.\n one Puppy => (no PS5 and one DogGame)\n\n// // Only if I get the doll, I want a dollhouse.\n one Doll => one DollHouse\n\n}\n\nrun wishes for 1", "permalink": "bulb-player-say-rewire", "time": "2023-12-19 09:05:25.722736", "cmd": 1} {"id": 9479, "parent": 9454, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n (one Puppy or one Doll) and (one PS5 or one Xbox)\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n one Puppy implies (one DogBasket and one Ball)\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n one Doll implies (one Dresses and one BarbieGame)\n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n one Puppy implies ((no PS5) and one Xbox)\n\n // Only if I get the doll, I want a dollhouse.\n one Doll implies one DollHouse\n}\n\nrun wishes for 1", "permalink": "amaze-image-squash-negate", "time": "2023-12-19 09:08:30.194246", "cmd": 1} {"id": 9481, "parent": 9478, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n (one Puppy or one Doll) and (one PS5 or one Xbox)\n\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n one Puppy implies one DogBasket and one Ball\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n one Doll implies one Dresses and one BarbieGame\n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n one Puppy implies no PS5 and one Xbox\n\n // Only if I get the doll, I want a dollhouse.\n one Doll iff one DollHouse\n}\n\nrun wishes for 1", "permalink": "lily-giver-exact-tissue", "time": "2023-12-19 09:09:11.653659", "cmd": 1} {"id": 9487, "parent": 9485, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n (one Puppy or one Doll) and (one PS5 or one Xbox)\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n (one Puppy) implies (one DogBasket and one Ball) \n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n (one Doll) implies (one Dresses and one BarbieGame )\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n (one Puppy) implies (no PS5 and DogGame)\n // Only if I get the doll, I want a dollhouse.\n (one Doll) iff (one DollHouse) \n}\n\nrun wishes for 1", "permalink": "skirt-racoon-john-oppose", "time": "2023-12-19 09:10:29.078505", "cmd": 1} {"id": 9490, "parent": 9489, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n (one Puppy or one Doll) and (one PS5 or one Xbox)\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n (one Puppy) implies (one DogBasket and one Ball) \n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n (one Doll) implies (one Dresses and one BarbieGame )\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n (one Puppy) implies (no PS5 and one DogGame)\n // Only if I get the doll, I want a dollhouse.\n (one Doll) iff (one DollHouse) \n}\n\nrun wishes for 1", "permalink": "violin-unread-petty-anyway", "time": "2023-12-19 09:12:11.488234", "cmd": 1} {"id": 9436, "parent": 9429, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n one Puppy or one Doll and one PS5 or one Xbox\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n one Puppy implies one DogBasket and one Ball\n // If I get the doll, I want dresses for the doll and the PS5 Barbie game.\n one Doll implies one Dresses and one BarbieGame\n\n // If I get the puppy, I don’t want the PS5 since only the Xbox has the dog game I want in that case.\n one Puppy and one Xbox implies no PS5\n\n // Only if I get the doll, I want a dollhouse.\n one Doll implies one DollHouse\n\n}\n\nrun wishes for 1", "permalink": "swivel-bash-update-husked", "time": "2023-12-19 08:52:33.776183", "cmd": 1} {"id": 9438, "parent": 9433, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n one Puppy or doll\n one PS5 or Xbox\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n\n // Only if I get the doll, I want a dollhouse.\n\n}\n\nrun wishes for 1", "permalink": "late-jester-folic-skinny", "time": "2023-12-19 08:52:47.194189", "cmd": 1} {"id": 9439, "parent": 9438, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n one Puppy or Doll\n one PS5 or Xbox\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n\n // Only if I get the doll, I want a dollhouse.\n\n}\n\nrun wishes for 1", "permalink": "galley-rental-humid-oops", "time": "2023-12-19 08:52:55.284583", "cmd": 1} {"id": 9445, "parent": 9424, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n (one Puppy or one Doll) and (one PS5 or one Xbox)\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n \n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n\n // Only if I get the doll, I want a dollhouse.\n\n}\n\nrun wishes for 1", "permalink": "shape-savior-kisser-armory", "time": "2023-12-19 08:54:10.818367", "cmd": 1} {"id": 9476, "parent": 9475, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n (one Puppy or one Doll) and (one PS5 or one Xbox)\n \n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n one Puppy implies (one DogBasket and one Ball)\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n one Doll implies (some Dresses and one BarbieGame)\n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n // one Puppy (implies (no PS5) & ((some Xbox) implies DogGame) implies (one PS5))\n // Only if I get the doll, I want a dollhouse.\n (one Doll) implies (one DollHouse)\n}\n\nrun wishes for 1", "permalink": "safely-elude-maybe-boss", "time": "2023-12-19 09:06:22.583449", "cmd": 1} {"id": 9486, "parent": 7812, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n \n \n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n (one Puppy or one Doll) and (one PS5 or one Xbox)\n\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n (one Puppy) implies (one DogBasket and one Ball)\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n one Doll implies (one Dresses and one BarbieGame) \n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n one Puppy implies (no PS5 and one DogGame)\n\n // Only if I get the doll, I want a dollhouse.\n (one Doll) iff (one DollHouse)\n}\n\nrun wishes for 1", "permalink": "raft-impale-return-arrive", "time": "2023-12-19 09:10:11.072596", "cmd": 1} {"id": 9488, "parent": 9480, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n (one Puppy or one Doll) and (one PS5 or one Xbox)\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n (one Puppy) implies (one DogBasket and one Ball)\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n (one Doll) implies (one Dresses and one BarbieGame)\n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n (one Puppy) implies ((no PS5) and one Xbox)\n\n // Only if I get the doll, I want a dollhouse.\n (one Doll) iff (one DollHouse)\n}\n\nrun wishes for 1", "permalink": "data-kiln-mayday-bling", "time": "2023-12-19 09:11:30.072274", "cmd": 1} {"id": 9491, "parent": 9477, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n (one Puppy or one Doll) and (one PS5 or one Xbox)\n \n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n one Puppy implies (one DogBasket and one Ball)\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n one Doll implies (one Dresses and one BarbieGame)\n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n one Puppy implies (no PS5 and one DogGame)\n // Only if I get the doll, I want a dollhouse.\n one Doll iff (one DollHouse)\n}\n\nrun wishes for 1", "permalink": "hamlet-boxer-elude-spouse", "time": "2023-12-19 09:12:58.407856", "cmd": 1} {"id": 9497, "parent": 9380, "code": "module SecretSanta\n\nsig Employee {\n officePartners : set Employee,\n isSecretSantaFor : one Employee\n}\nsig Intern extends Employee { \n supervisor : one Employee \n}\n\npred santaRules {\n // Everyone has a Secret Santa, and nobody is their \n // own Secret Santa.\n all e : Employee | e.isSecretSantaFor != e\n // Nobody should get a person assigned that they \n // share an office with.\n \n // No intern should have to buy a present for their \n // supervisor.\n\n}\n\nrun santaRules for 3", "permalink": "rage-lend-shack-starry", "time": "2023-12-19 09:18:09.817544", "cmd": 1} {"id": 9498, "parent": 9495, "code": "module SecretSanta\n\nsig Employee {\n officePartners : set Employee,\n isSecretSantaFor : one Employee\n}\nsig Intern extends Employee { \n supervisor : one Employee \n}\n\npred santaRules {\n // Everyone has a Secret Santa, and nobody is their \n // own Secret Santa.\n all e: Employee | one e.isSecretSantaFor\n all employee: Employee | employee.isSecretSantaFor != employee\n\n \n // Nobody should get a person assigned that they \n // share an office with.\n all employee: Employee | employee.isSecretSantaFor not in employee.officePartners\n \n // No intern should have to buy a present for their \n // supervisor.\n all intern: Intern | intern.isSecretSantaFor != intern.supervisor\n\n}\n\nrun santaRules for 3", "permalink": "pager-why-aloof-slip", "time": "2023-12-19 09:19:55.976962", "cmd": 1} {"id": 9502, "parent": 9380, "code": "module SecretSanta\n\nsig Employee {\n officePartners : set Employee,\n isSecretSantaFor : one Employee\n}\nsig Intern extends Employee { \n supervisor : one Employee \n}\n\npred santaRules {\n // Everyone has a Secret Santa, and nobody is their \n // own Secret Santa.\n all e: Employee | e.isSecretSantaFor != e\n all e: Employee | \n some s: Employee |\n s.isSecretSantaFor = e\n \n // Nobody should get a person assigned that they \n // share an office with.\n \n // No intern should have to buy a present for their \n // supervisor.\n\n}\n\nrun santaRules for 3", "permalink": "napkin-evolve-stinky-clang", "time": "2023-12-19 09:22:03.738902", "cmd": 1} {"id": 9503, "parent": 9496, "code": "module SecretSanta\n\nsig Employee {\n officePartners: set Employee,\n isSecretSantaFor: one Employee\n}\n\nsig Intern extends Employee { \n supervisor: one Employee \n}\n\npred santaRules {\n // Everyone has a Secret Santa, and nobody is their \n // own Secret Santa.\n all e: Employee | some s: Employee | e in s. isSecretSantaFor\n \n all e: Employee | e.isSecretSantaFor != e\n\n // Nobody should get a person assigned that they \n // share an office with.\n all e: Employee | e.isSecretSantaFor !in e.officePartners\n\n // No intern should have to buy a present for their \n // supervisor.\n all i: Intern | i.supervisor != i.isSecretSantaFor\n}\n\nrun santaRules for 3", "permalink": "morale-partly-cotton-amount", "time": "2023-12-19 09:22:12.400723", "cmd": 1} {"id": 9510, "parent": 9506, "code": "module SecretSanta\n\nsig Employee {\n officePartners : set Employee,\n isSecretSantaFor : one Employee\n}\nsig Intern extends Employee { \n supervisor : one Employee \n}\n\npred santaRules {\n // Everyone has a Secret Santa, and nobody is their \n // own Secret Santa.\n all e:Employee | \n some s: Employee | \n e in s.isSecretSantaFor\n all e:Employee | e.isSecretSantaFor != e\n \n // Nobody should get a person assigned that they \n // share an office with.\n \n // No intern should have to buy a present for their \n // supervisor.\n\n}\n\nrun santaRules for 3", "permalink": "wimp-helium-lemon-hungry", "time": "2023-12-19 09:26:23.403379", "cmd": 1} {"id": 9511, "parent": 9508, "code": "module trees\n\nsig Tree {\n x: Int,\n y: Int\n} {\n x >= 0 and x <= 7\n y >= 0 and y <= 7\n}\n\nfun absDiff[a, b: Int]: Int {\n result = (a - b).abs\n}\n\npred placement {\n // no shared row, column, or diagonal\n all t1, t2: Tree | t1 != t2 => {\n t1.x != t2.x and t1.y != t2.y // no shared row or column\n and absDiff[t1.x, t2.x] != absDiff[t1.y, t2.y] // no shared diagonal\n }\n\n // exactly 8 trees\n #Tree = 8\n}\n\nrun placement for 3 but exactly 8 Tree, 5 Int", "permalink": "unsold-oaf-reward-upper", "time": "2023-12-19 09:26:33.481444", "cmd": 1} {"id": 9513, "parent": 9499, "code": "module SecretSanta\n\nsig Employee {\n officePartners : set Employee,\n isSecretSantaFor : one Employee\n}\nsig Intern extends Employee { \n supervisor : one Employee \n}\n\npred santaRules {\n // Everyone has a Secret Santa, and nobody is their \n // own Secret Santa.\n Employee.isSecretSantaFor = Employee\n // all e: Employee | some s: Employee| e in s.isSecretSantaFor \n all employee: Employee | employee.isSecretSantaFor != employee\n\n \n // Nobody should get a person assigned that they \n // share an office with.\n all employee: Employee | employee.isSecretSantaFor not in employee.officePartners\n \n // No intern should have to buy a present for their \n // supervisor.\n all intern: Intern | intern.isSecretSantaFor != intern.supervisor\n\n}\n\nrun santaRules for 3", "permalink": "panama-talcum-ditto-stupor", "time": "2023-12-19 09:27:15.174468", "cmd": 1} {"id": 9514, "parent": 9509, "code": "module SecretSanta\n\nsig Employee {\n officePartners : set Employee,\n isSecretSantaFor : one Employee\n}\nsig Intern extends Employee { \n supervisor : one Employee \n}\n\npred santaRules {\n // Everyone has a Secret Santa, and nobody is their \n // own Secret Santa.\n all e: Employee | e.isSecretSantaFor != e\n all e: Employee | \n some s: Employee |\n s.isSecretSantaFor = e\n \n // Nobody should get a person assigned that they \n // share an office with.\n all emp: Employee | emp.isSecretSantaFor not in emp.officePartners\n \n // No intern should have to buy a present for their \n // supervisor.\n all int :Intern | int.isSecretSantaFor not in int.supervisor\n\n}\n\nrun santaRules for 3", "permalink": "helmet-briar-spongy-egging", "time": "2023-12-19 09:27:17.467920", "cmd": 1} {"id": 9515, "parent": 9510, "code": "module SecretSanta\n\nsig Employee {\n officePartners : set Employee,\n isSecretSantaFor : one Employee\n}\nsig Intern extends Employee { \n supervisor : one Employee \n}\n\npred santaRules {\n // Everyone has a Secret Santa, and nobody is their \n // own Secret Santa.\n all e:Employee | \n some s: Employee | \n e in s.isSecretSantaFor\n// Employee.isSecretSantaFor = Employee\n all e:Employee | e.isSecretSantaFor != e\n // Nobody should get a person assigned that they \n // share an office with.\n\n \n // No intern should have to buy a present for their \n // supervisor.\n\n}\n\nrun santaRules for 3", "permalink": "tying-these-boots-croak", "time": "2023-12-19 09:27:41.230351", "cmd": 1} {"id": 9538, "parent": 9381, "code": "module trees\n\nsig Tree {\n x : Int,\n y : Int\n} {\n x >= 0 and x <= 7\n y >= 0 and y <= 7\n}\n\npred placement {\n // no shared row, column, or diagonal\n plus[t1.x, t1,y]\n \n}\n\nrun placement for 3 but exactly 8 Tree, 5 Int", "permalink": "yo-yo-expand-sedate-shaky", "time": "2023-12-19 09:38:54.184260", "cmd": 1} {"id": 9547, "parent": 9543, "code": "module trees\n\nsig Tree {\n x: Int,\n y: Int\n} {\n x >= 0 and x <= 7\n y >= 0 and y <= 7\n}\n\npred placement {\n // no shared row, column, or diagonal\n all disj t1, t2: Tree | t1 != t2 => {\n t1.x != t2.x and t1.y != t2.y // no shared row or column\n and (t1.x - t1.y != t2.x - t2.y) // no shared anti-diagonal\n and (t1.x + t1.y != t2.x + t2.y) // no shared main diagonal\n }\n\n // exactly 8 trees\n #Tree = 8\n}\n\nrun placement for 8 Tree", "permalink": "reseal-resize-casing-slacks", "time": "2023-12-19 09:44:40.136853", "cmd": 1} {"id": 9549, "parent": 9547, "code": "module trees\n\nsig Tree {\n x: Int,\n y: Int\n} {\n x >= 0 and x <= 7\n y >= 0 and y <= 7\n}\n\npred placement {\n // no shared row, column, or diagonal\n all disj t1, t2: Tree | t1 != t2 => {\n t1.x != t2.x and t1.y != t2.y // no shared row or column\n and (t1.x - t1.y != t2.x - t2.y) // no shared anti-diagonal\n and (t1.x + t1.y != t2.x + t2.y) // no shared main diagonal\n }\n\n // exactly 8 trees\n #Tree = 8\n}\n\nrun placement for 8 Tree", "permalink": "idiocy-scrap-extras-poplar", "time": "2023-12-19 09:45:13.075090", "cmd": 1} {"id": 9550, "parent": 9546, "code": "module trees\n\nsig Tree {\n x : Int,\n y : Int\n} {\n x >= 0 and x <= 7\n y >= 0 and y <= 7\n}\n\npred placement {\n // no shared row, column, or diagonal\n all t1, t2: Tree | t1.x != t2.x and t1.x != plus \n all disj t1, t2: Tree | {\n t1.x != t2.x && t1.y != t2.y && \n abs[t1.x - t2.x] != abs[t1.y - t2.y]\n }\n}\n\nrun placement for 3 but exactly 8 Tree, 5 Int", "permalink": "defy-fender-upwind-fossil", "time": "2023-12-19 09:45:21.516883", "cmd": 1} {"id": 9551, "parent": 9550, "code": "module trees\n\nsig Tree {\n x : Int,\n y : Int\n} {\n x >= 0 and x <= 7\n y >= 0 and y <= 7\n}\n\npred placement {\n // no shared row, column, or diagonal\n all t1, t2: Tree | t1.x != t2.x and t1.x != plus \n all disj t1, t2: Tree | {\n t1.x != t2.x && t1.y != t2.y && \n minus[t1.x, t2.x] != minus[t1.y, t2.y]\n }\n}\n\nrun placement for 3 but exactly 8 Tree, 5 Int", "permalink": "region-dairy-skiing-uptown", "time": "2023-12-19 09:45:56.471952", "cmd": 1} {"id": 9573, "parent": 9572, "code": "module trees\n\nsig Tree {\n x : Int,\n y : Int\n} {\n x >= 0 and x <= 7\n y >= 0 and y <= 7\n}\n\npred placement {\n // no shared row, column, or diagonal\n all t1, t2: Tree | t1 != t2 implies (\n t1.x != t2.x and \n t1.y != t2.y and \n plus[t1.x, t1.y] != plus[t2.x, t2.y] and \n minus[t1.x, t1.y] != minus[t2.x, t2.y]\n )\n}\n\n\nrun placement for 3 but exactly 8 Tree, 5 Int", "permalink": "tartar-rental-camera-refold", "time": "2023-12-19 13:43:13.283472", "cmd": 1} {"id": 9453, "parent": 9422, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n (one Puppy or one Doll) and (one PS5 or one Xbox)\n\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n one Puppy implies one DogBasket and one Ball\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n one Doll implies one Dresses and one BarbieGame\n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n one Puppy implies not one PS5 and one Xbox\n\n // Only if I get the doll, I want a dollhouse.\n one Doll implies one DollHouse\n not some Doll implies not some DollHouse\n}\n\nrun wishes for 1", "permalink": "banter-curse-afar-frays", "time": "2023-12-19 08:56:19.362510", "cmd": 1} {"id": 9455, "parent": 9448, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n (one Puppy or one Doll) and (one PS5 or one Xbox)\n // some (PS5 + Xbox)\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n one Puppy => (one DogBasket and one Ball)\n\n// // If I get the doll, I want dresses for the doll and \n// // the PS5 Barbie game. \n one Doll => (one Dresses and one BarbieGame)\n\n// // If I get the puppy, I don’t want the PS5 since only\n// // the Xbox has the dog game I want in that case.\n one Puppy => no PS5\n\n// // Only if I get the doll, I want a dollhouse.\n one Doll => one DollHouse\n\n}\n\nrun wishes for 1", "permalink": "slain-rope-bubble-ranked", "time": "2023-12-19 08:56:23.061078", "cmd": 1} {"id": 9465, "parent": 9443, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n one Puppy or one Doll\n one PS5 or one Xbox\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n (one Puppy) implies (one DogBasket and one Ball)\n\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n (one Doll) implies (Dresses and BarbieGame)\n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n (one Puppy) (implies (no PS5) & ((some Xbox) implies DogGame) implies (one PS5))\n // Only if I get the doll, I want a dollhouse.\n (one Doll) implies (one DollHouse)\n}\n\nrun wishes for 1", "permalink": "ought-antsy-koala-perish", "time": "2023-12-19 09:02:22.260471", "cmd": 1} {"id": 9471, "parent": 9465, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n (one Puppy or one Doll) and (one PS5 or one Xbox)\n \n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n (one Puppy) implies (one DogBasket and one Ball)\n\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n (one Doll) implies (Dresses and BarbieGame)\n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n (one Puppy) (implies (no PS5) & ((some Xbox) implies DogGame) implies (one PS5))\n // Only if I get the doll, I want a dollhouse.\n (one Doll) implies (one DollHouse)\n}\n\nrun wishes for 1", "permalink": "powwow-wolf-mantis-share", "time": "2023-12-19 09:03:08.574258", "cmd": 1} {"id": 9477, "parent": 9476, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n (one Puppy or one Doll) and (one PS5 or one Xbox)\n \n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n one Puppy implies (one DogBasket and one Ball)\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n one Doll implies (some Dresses and one BarbieGame)\n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n one Puppy implies (no PS5 and one DogGame)\n // Only if I get the doll, I want a dollhouse.\n (one Doll) implies (one DollHouse)\n}\n\nrun wishes for 1", "permalink": "deface-prism-monday-appear", "time": "2023-12-19 09:07:17.699143", "cmd": 1} {"id": 9478, "parent": 9453, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n (one Puppy or one Doll) and (one PS5 or one Xbox)\n\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n one Puppy implies one DogBasket and one Ball\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n one Doll implies one Dresses and one BarbieGame\n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n one Puppy implies no PS5 and one Xbox\n\n // Only if I get the doll, I want a dollhouse.\n one Doll implies one DollHouse\n not some Doll implies not some DollHouse\n}\n\nrun wishes for 1", "permalink": "epic-speech-tutor-dental", "time": "2023-12-19 09:08:29.956518", "cmd": 1} {"id": 9483, "parent": 9466, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n (one Puppy or one Doll) and (one PS5 or one Xbox)\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n (one Puppy) implies (one DogBasket and one Ball)\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n (one Doll) implies (one Dresses and one BarbieGame)\n // If I get the puppy, I dont want the PS5 since only\n // the Xbox has the dog game I want in that case.\n (one Puppy) implies (no PS5 and one DogGame)\n // Only if I get the doll, I want a dollhouse.\n (one Doll) iff (one DollHouse)\n}\n\nrun wishes for 1", "permalink": "tiny-barley-kilt-quail", "time": "2023-12-19 09:09:14.949159", "cmd": 1} {"id": 9485, "parent": 9484, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n (one Puppy or one Doll) and (one PS5 or one Xbox)\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n (one Puppy) implies (one DogBasket and one Ball) \n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n (one Doll) implies (one Dresses and one BarbieGame )\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n (one Puppy) implies (no PS5 and DogGame)\n // Only if I get the doll, I want a dollhouse.\n (one Doll) iff (one DollHouse) \n\n}\n\nrun wishes for 1", "permalink": "zone-upheld-evict-romp", "time": "2023-12-19 09:09:35.227446", "cmd": 1} {"id": 9489, "parent": 9487, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n (one Puppy or one Doll) and (one PS5 or one Xbox)\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n (one Puppy) implies (one DogBasket and one Ball) \n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n (one Doll) implies (one Dresses and one BarbieGame )\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n (one Puppy) implies (no PS5 and DogGame)\n // Only if I get the doll, I want a dollhouse.\n (one Doll) iff (one DollHouse) \n}\n\nrun wishes for 1", "permalink": "plenty-turret-train-heat", "time": "2023-12-19 09:11:48.694330", "cmd": 1} {"id": 9494, "parent": 9493, "code": "module SecretSanta\n\nsig Employee {\n officePartners : set Employee,\n isSecretSantaFor : one Employee\n}\nsig Intern extends Employee { \n supervisor : one Employee \n}\n\npred santaRules {\n // Everyone has a Secret Santa, and nobody is their \n // own Secret Santa.\n all employee: Employee | employee.isSecretSantaFor != employee\n\n \n // Nobody should get a person assigned that they \n // share an office with.\n all e: Employee | e.isSecretSantaFor not in e.officePartners\n \n // No intern should have to buy a present for their \n // supervisor.\n all i: Intern | i.isSecretSantaFor != i.supervisor\n\n}\n\nrun santaRules for 3", "permalink": "rush-scorch-spool-alone", "time": "2023-12-19 09:15:40.360390", "cmd": 1} {"id": 9499, "parent": 9498, "code": "module SecretSanta\n\nsig Employee {\n officePartners : set Employee,\n isSecretSantaFor : one Employee\n}\nsig Intern extends Employee { \n supervisor : one Employee \n}\n\npred santaRules {\n // Everyone has a Secret Santa, and nobody is their \n // own Secret Santa.\n all e: Employee | some s: Employee| e in s.isSecretSantaFor \n all employee: Employee | employee.isSecretSantaFor != employee\n\n \n // Nobody should get a person assigned that they \n // share an office with.\n all employee: Employee | employee.isSecretSantaFor not in employee.officePartners\n \n // No intern should have to buy a present for their \n // supervisor.\n all intern: Intern | intern.isSecretSantaFor != intern.supervisor\n\n}\n\nrun santaRules for 3", "permalink": "ended-equal-glider-entomb", "time": "2023-12-19 09:21:36.963171", "cmd": 1} {"id": 9512, "parent": 9511, "code": "module trees\n\nsig Tree {\n x: Int,\n y: Int\n} {\n x >= 0 and x <= 7\n y >= 0 and y <= 7\n}\n\nfun absDiff[a, b: Int]: Int {\n (a - b).abs\n}\n\npred placement {\n // no shared row, column, or diagonal\n all t1, t2: Tree | t1 != t2 => {\n t1.x != t2.x and t1.y != t2.y // no shared row or column\n and absDiff[t1.x, t2.x] != absDiff[t1.y, t2.y] // no shared diagonal\n }\n\n // exactly 8 trees\n #Tree = 8\n}\n\nrun placement for 3 but exactly 8 Tree, 5 Int", "permalink": "step-impale-giving-living", "time": "2023-12-19 09:26:56.947842", "cmd": 1} {"id": 9518, "parent": 9515, "code": "module SecretSanta\n\nsig Employee {\n officePartners : set Employee,\n isSecretSantaFor : one Employee\n}\nsig Intern extends Employee { \n supervisor : one Employee \n}\n\npred santaRules {\n // Everyone has a Secret Santa, and nobody is their \n // own Secret Santa.\n// all e:Employee | \n// some s: Employee | \n// e in s.isSecretSantaFor\n Employee.isSecretSantaFor = Employee\n no isSecretSantaFor & iden\n// all e:Employee | e.isSecretSantaFor != e\n \n // Nobody should get a person assigned that they \n // share an office with.\n \n \n // No intern should have to buy a present for their \n // supervisor.\n\n}\n\nrun santaRules for 3", "permalink": "salute-aloof-unplug-agenda", "time": "2023-12-19 09:29:44.002295", "cmd": 1} {"id": 9519, "parent": 9516, "code": "module SecretSanta\n\nsig Employee {\n officePartners : set Employee,\n isSecretSantaFor : one Employee\n}\nsig Intern extends Employee { \n supervisor : one Employee \n}\n\npred santaRules {\n // Everyone has a Secret Santa, and nobody is their \n // own Secret Santa.\n all e: Employee | e.isSecretSantaFor != e\n all e: Employee | \n some s: Employee |\n s.isSecretSantaFor = e\n \n // Nobody should get a person assigned that they \n // share an office with.\n all emp: Employee | emp.isSecretSantaFor not in emp.officePartners\n \n // No intern should have to buy a present for their \n // supervisor.\n all int :Intern | int.isSecretSantaFor != int.supervisor\n\n}\n\nrun santaRules for 3", "permalink": "arrive-zips-mower-decree", "time": "2023-12-19 09:29:46.042050", "cmd": 1} {"id": 9527, "parent": 9526, "code": "module SecretSanta\n\nsig Employee {\n officePartners : set Employee,\n isSecretSantaFor : one Employee\n}\nsig Intern extends Employee { \n supervisor : one Employee \n}\n\npred santaRules {\n // Everyone has a Secret Santa, and nobody is their \n // own Secret Santa.\n// all e:Employee | \n// some s: Employee | \n// e in s.isSecretSantaFor\n Employee.isSecretSantaFor = Employee\n no isSecretSantaFor & iden\n// all e:Employee | e.isSecretSantaFor != e\n \n // Nobody should get a person assigned that they \n // share an office with.\n// & = intersection\n no officePartners & isSecretSantaFor\n \n // No intern should have to buy a present for their \n // supervisor.\n no supervisor & isSecretSantaFor\n\n}\n\nrun santaRules for 3", "permalink": "dweeb-ramrod-gooey-lanky", "time": "2023-12-19 09:31:39.189575", "cmd": 1} {"id": 9532, "parent": 9381, "code": "module trees\n\nsig Tree {\n x : Int,\n y : Int\n} {\n x >= 0 and x <= 7\n y >= 0 and y <= 7\n}\n\npred placement {\n // no shared row, column, or diagonal\n t1: Tree | t2: Tree | t1.x != t2.x\n}\n\nrun placement for 3 but exactly 8 Tree, 5 Int", "permalink": "anemia-rectal-bubble-perm", "time": "2023-12-19 09:35:33.820179", "cmd": 1} {"id": 9537, "parent": 9535, "code": "module trees\n\nsig Tree {\n x: Int,\n y: Int\n} {\n x >= 0 and x <= 7\n y >= 0 and y <= 7\n}\n\npred placement {\n // no shared row, column, or diagonal\n all t1, t2: Tree | t1 != t2 => {\n t1.x != t2.x and t1.y != t2.y \n and (t1.x + t1.y != t2.x + t2.y) \n and (t1.x - t1.y != t2.x - t2.y)\n }\n\n // exactly 8 trees\n #Tree = 8\n}\n\n\nrun placement for 3 but exactly 8 Tree, 5 Int", "permalink": "hatbox-banter-jet-giggly", "time": "2023-12-19 09:38:45.719581", "cmd": 1} {"id": 9539, "parent": 9381, "code": "module trees\n\nsig Tree {\n x : Int,\n y : Int\n} {\n x >= 0 and x <= 7\n y >= 0 and y <= 7\n}\n\npred placement {\n // no shared row, column, or diagonal\n all tree1: Tree, all tree2: Tree | tree1.x != tree2.y\n \n}\n\nrun placement for 3 but exactly 8 Tree, 5 Int", "permalink": "slaw-gusto-mosaic-wiry", "time": "2023-12-19 09:39:07.125143", "cmd": 1} {"id": 9544, "parent": 9542, "code": "module trees\n\nsig Tree {\n x : Int,\n y : Int\n} {\n x >= 0 and x <= 7\n y >= 0 and y <= 7\n}\n\npred placement {\n one t1: Tree\n // no shared row, column, or diagonal\n plus[Tree.x, Tree.y]\n\n}\n\nrun placement for 3 but exactly 8 Tree, 5 Int", "permalink": "whiff-sauna-peso-cage", "time": "2023-12-19 09:41:39.256651", "cmd": 1} {"id": 9482, "parent": 9474, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n (one Puppy or one Doll) and (one PS5 or one Xbox)\n\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n one Puppy => (one DogBasket and one Ball)\n\n// // If I get the doll, I want dresses for the doll and \n// // the PS5 Barbie game. \n one Doll => (one Dresses and one BarbieGame)\n\n// // If I get the puppy, I don’t want the PS5 since only\n// // the Xbox has the dog game I want in that case.\n one Puppy => (no PS5 and one DogGame)\n\n// // Only if I get the doll, I want a dollhouse.\n one Doll iff one DollHouse\n\n}\n\nrun wishes for 1", "permalink": "jacket-spill-crib-yam", "time": "2023-12-19 09:09:12.340454", "cmd": 1} {"id": 9484, "parent": 9464, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n (one Puppy or one Doll) and (one PS5 or one Xbox)\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n (one Puppy) implies (one DogBasket and one Ball) \n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n (one Doll) implies (one Dresses and one BarbieGame )\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n one Puppy implies (no PS5 and DogGame)\n // Only if I get the doll, I want a dollhouse.\n (one Doll) iff (one DollHouse) \n\n}\n\nrun wishes for 1", "permalink": "waged-motto-cozy-dash", "time": "2023-12-19 09:09:19.108266", "cmd": 1} {"id": 9492, "parent": 9380, "code": "module SecretSanta\n\nsig Employee {\n officePartners : set Employee,\n isSecretSantaFor : one Employee\n}\nsig Intern extends Employee { \n supervisor : one Employee \n}\n\npred santaRules {\n // Everyone has a Secret Santa, and nobody is their \n // own Secret Santa.\n all e: Employee | e.isSecretSantaFor != e\n\n \n // Nobody should get a person assigned that they \n // share an office with.\n all e: Employee | e.isSecretSantaFor not in e.officePartners\n \n // No intern should have to buy a present for their \n // supervisor.\n all i: Intern | i.isSecretSantaFor != i.supervisor\n\n}\n\nrun santaRules for 3", "permalink": "halves-causal-dinghy-mossy", "time": "2023-12-19 09:14:13.132055", "cmd": 1} {"id": 9493, "parent": 9492, "code": "module SecretSanta\n\nsig Employee {\n officePartners : set Employee,\n isSecretSantaFor : one Employee\n}\nsig Intern extends Employee { \n supervisor : one Employee \n}\n\npred santaRules {\n // Everyone has a Secret Santa, and nobody is their \n // own Secret Santa.\n all e: Employee | e.isSecretSantaFor != e\n\n \n // Nobody should get a person assigned that they \n // share an office with.\n all e: Employee | e.isSecretSantaFor not in e.officePartners\n \n // No intern should have to buy a present for their \n // supervisor.\n all i: Intern | i.isSecretSantaFor != i.supervisor\n\n}\n\nrun santaRules for 3", "permalink": "penny-stooge-cringe-shrine", "time": "2023-12-19 09:15:18.563629", "cmd": 1} {"id": 9500, "parent": 9497, "code": "module SecretSanta\n\nsig Employee {\n officePartners : set Employee,\n isSecretSantaFor : one Employee\n}\nsig Intern extends Employee { \n supervisor : one Employee \n}\n\npred santaRules {\n // Everyone has a Secret Santa, and nobody is their \n // own Secret Santa.\n all e : Employee | \n some s : Employee | \n s.isSecretSantaFor = e\n all e : Employee | e.isSecretSantaFor != e\n // Nobody should get a person assigned that they \n // share an office with.\n \n // No intern should have to buy a present for their \n // supervisor.\n\n}\n\nrun santaRules for 3", "permalink": "zebra-tiling-gamma-staff", "time": "2023-12-19 09:21:49.074028", "cmd": 1} {"id": 9501, "parent": 9456, "code": "module SecretSanta\n\nsig Employee {\n officePartners : set Employee,\n isSecretSantaFor : one Employee\n}\nsig Intern extends Employee { \n supervisor : one Employee \n}\n\npred santaRules {\n // Everyone has a Secret Santa, and nobody is their own Secret Santa.\n all e: Employee | some s : Employee | s.isSecretSantaFor =e\n all e: Employee | e.isSecretSantaFor != e\n\n // Nobody should get a person assigned that they share an office with.\n all e: Employee | no e.isSecretSantaFor & e.officePartners\n\n // No intern should have to buy a present for their supervisor.\n all i: Intern | i.supervisor != i.isSecretSantaFor\n\n}\n\nrun santaRules for 3", "permalink": "coke-appear-sprout-erupt", "time": "2023-12-19 09:22:03.719680", "cmd": 1} {"id": 9504, "parent": 9503, "code": "module SecretSanta\n\nsig Employee {\n officePartners: set Employee,\n isSecretSantaFor: one Employee\n}\n\nsig Intern extends Employee { \n supervisor: one Employee \n}\n\npred santaRules {\n // Everyone has a Secret Santa, and nobody is their \n // own Secret Santa.\n all e: Employee | some s: Employee | e in s. isSecretSantaFor\n all e: Employee | e.isSecretSantaFor != e\n\n // Nobody should get a person assigned that they \n // share an office with.\n all e: Employee | e.isSecretSantaFor !in e.officePartners\n\n // No intern should have to buy a present for their \n // supervisor.\n all i: Intern | i.supervisor != i.isSecretSantaFor\n}\n\nrun santaRules for 3", "permalink": "flyer-caress-poster-pectin", "time": "2023-12-19 09:22:25.906871", "cmd": 1} {"id": 9506, "parent": 9505, "code": "module SecretSanta\n\nsig Employee {\n officePartners : set Employee,\n isSecretSantaFor : one Employee\n}\nsig Intern extends Employee { \n supervisor : one Employee \n}\n\npred santaRules {\n // Everyone has a Secret Santa, and nobody is their \n // own Secret Santa.\n all e:Employee | \n some s: Employee | \n all e in s.isSecretSantaFor !=e\n all e:Employee | e.isSecretSantaFor != e\n \n // Nobody should get a person assigned that they \n // share an office with.\n \n // No intern should have to buy a present for their \n // supervisor.\n\n}\n\nrun santaRules for 3", "permalink": "public-unfair-lavish-gory", "time": "2023-12-19 09:23:00.437034", "cmd": 1} {"id": 9509, "parent": 9502, "code": "module SecretSanta\n\nsig Employee {\n officePartners : set Employee,\n isSecretSantaFor : one Employee\n}\nsig Intern extends Employee { \n supervisor : one Employee \n}\n\npred santaRules {\n // Everyone has a Secret Santa, and nobody is their \n // own Secret Santa.\n all e: Employee | e.isSecretSantaFor != e\n all e: Employee | \n some s: Employee |\n s.isSecretSantaFor = e\n \n // Nobody should get a person assigned that they \n // share an office with.\n all emp: Employee | emp.isSecretSantaFor not in emp.officePartners\n \n // No intern should have to buy a present for their \n // supervisor.\n\n}\n\nrun santaRules for 3", "permalink": "untidy-scuba-dinghy-cortex", "time": "2023-12-19 09:26:11.998687", "cmd": 1} {"id": 9516, "parent": 9514, "code": "module SecretSanta\n\nsig Employee {\n officePartners : set Employee,\n isSecretSantaFor : one Employee\n}\nsig Intern extends Employee { \n supervisor : one Employee \n}\n\npred santaRules {\n // Everyone has a Secret Santa, and nobody is their \n // own Secret Santa.\n all e: Employee | e.isSecretSantaFor != e\n all e: Employee | \n some s: Employee |\n s.isSecretSantaFor = e\n \n // Nobody should get a person assigned that they \n // share an office with.\n all emp: Employee | emp.isSecretSantaFor not in emp.officePartners\n \n // No intern should have to buy a present for their \n // supervisor.\n all int :Intern | int.supervisor not in int.isSecretSantaFor\n\n}\n\nrun santaRules for 3", "permalink": "fabric-retold-native-squirt", "time": "2023-12-19 09:27:49.073931", "cmd": 1} {"id": 9517, "parent": 9381, "code": "module trees\n\nsig Tree {\n x: Int,\n y: Int\n} {\n x >= 0 and x <= 7\n y >= 0 and y <= 7\n}\n\npred placement {\n // no shared row, column, or diagonal\n all t1, t2: Tree | t1 != t2 => {\n t1.x != t2.x and t1.y != t2.y // no shared row or column\n and (t1.x - t2.x) != (t1.y - t2.y) and (t1.x - t2.x) != (t2.y - t1.y) // no shared diagonal\n }\n\n // exactly 8 trees\n #Tree = 8\n}\n\nrun placement for 3 but exactly 8 Tree, 5 Int", "permalink": "squire-race-anger-grunt", "time": "2023-12-19 09:27:54.217248", "cmd": 1} {"id": 9520, "parent": 9519, "code": "module SecretSanta\n\nsig Employee {\n officePartners : set Employee,\n isSecretSantaFor : one Employee\n}\nsig Intern extends Employee { \n supervisor : one Employee \n}\n\npred santaRules {\n // Everyone has a Secret Santa, and nobody is their \n // own Secret Santa.\n all e: Employee | e.isSecretSantaFor != e\n all e: Employee | \n some s: Employee |\n s.isSecretSantaFor = e\n \n // Nobody should get a person assigned that they \n // share an office with.\n all emp: Employee | emp.isSecretSantaFor not in emp.officePartners\n \n // No intern should have to buy a present for their \n // supervisor.\n all inte :Intern | inte.isSecretSantaFor != inte.supervisor\n\n}\n\nrun santaRules for 3", "permalink": "ridden-dimple-precut-crazed", "time": "2023-12-19 09:30:00.864548", "cmd": 1} {"id": 9521, "parent": 9520, "code": "module SecretSanta\n\nsig Employee {\n officePartners : set Employee,\n isSecretSantaFor : one Employee\n}\nsig Intern extends Employee { \n supervisor : one Employee \n}\n\npred santaRules {\n // Everyone has a Secret Santa, and nobody is their \n // own Secret Santa.\n all e: Employee | e.isSecretSantaFor != e\n all e: Employee | \n some s: Employee |\n s.isSecretSantaFor = e\n \n // Nobody should get a person assigned that they \n // share an office with.\n all emp: Employee | emp.isSecretSantaFor not in emp.officePartners\n \n // No intern should have to buy a present for their \n // supervisor.\n all inte :Intern | inte.isSecretSantaFor not in inte.supervisor\n\n}\n\nrun santaRules for 3", "permalink": "clean-smell-curve-catty", "time": "2023-12-19 09:30:09.850060", "cmd": 1} {"id": 9522, "parent": 9518, "code": "module SecretSanta\n\nsig Employee {\n officePartners : set Employee,\n isSecretSantaFor : one Employee\n}\nsig Intern extends Employee { \n supervisor : one Employee \n}\n\npred santaRules {\n // Everyone has a Secret Santa, and nobody is their \n // own Secret Santa.\n// all e:Employee | \n// some s: Employee | \n// e in s.isSecretSantaFor\n Employee.isSecretSantaFor = Employee\n no isSecretSantaFor & iden\n// all e:Employee | e.isSecretSantaFor != e\n \n // Nobody should get a person assigned that they \n // share an office with.\n// & = intersection\n no officePartners & isSecretSantaFor\n \n // No intern should have to buy a present for their \n // supervisor.\n\n}\n\nrun santaRules for 3", "permalink": "dose-dig-gravy-grill", "time": "2023-12-19 09:30:21.900243", "cmd": 1} {"id": 9523, "parent": 9380, "code": "module SecretSanta\n\nsig Employee {\n officePartners : set Employee,\n isSecretSantaFor : one Employee\n}\nsig Intern extends Employee { \n supervisor : one Employee \n}\n\npred santaRules {\n // Everyone has a Secret Santa, and nobody is their \n // own Secret Santa.\n all e : Employee | e.\n all e : Employee | e.isSecretSantaFor !=e\n \n // Nobody should get a person assigned that they \n // share an office with.\n all e : Employee | e.isSecretSantaFor != e.officePartners\n \n // No intern should have to buy a present for their \n // supervisor.\n all i : Intern | i.isSecretSantaFor != i.supervisor\n}\n\nrun santaRules for 3", "permalink": "spider-hubcap-hubcap-sheath", "time": "2023-12-19 09:30:35.747437", "cmd": 1} {"id": 9524, "parent": 9517, "code": "module trees\n\nsig Tree {\n x: Int,\n y: Int\n} {\n x >= 0 and x <= 7\n y >= 0 and y <= 7\n}\n\npred placement {\n // no shared row, column, or diagonal\n all t1, t2: Tree | t1 != t2 => {\n t1.x != t2.x and t1.y != t2.y // no shared row or column\n and (t1.x + t1.y) != (t2.x + t2.y) // no shared main diagonal\n and (t1.x - t1.y) != (t2.x - t2.y) // no shared anti-diagonal\n }\n\n // exactly 8 trees\n #Tree = 8\n}\n\nrun placement for 3 but exactly 8 Tree, 5 Int", "permalink": "agenda-dipped-urging-those", "time": "2023-12-19 09:30:42.361215", "cmd": 1} {"id": 9525, "parent": 9513, "code": "module SecretSanta\n\nsig Employee {\n officePartners : set Employee,\n isSecretSantaFor : one Employee\n}\nsig Intern extends Employee { \n supervisor : one Employee \n}\n\npred santaRules {\n // Everyone has a Secret Santa, and nobody is their \n // own Secret Santa.\n Employee.isSecretSantaFor = Employee\n no isSecretSantaFor & iden\n // all e: Employee | some s: Employee| e in s.isSecretSantaFor \n // all employee: Employee | employee.isSecretSantaFor != employee\n\n \n // Nobody should get a person assigned that they \n // share an office with.\n // all employee: Employee | employee.isSecretSantaFor not in employee.officePartners\n no officePartners & isSecretSantaFor\n // No intern should have to buy a present for their \n // supervisor.\n // all intern: Intern | intern.isSecretSantaFor != intern.supervisor\n no supervisor & isSecretSantaFor\n}\n\nrun santaRules for 3", "permalink": "basics-niece-trio-cuddly", "time": "2023-12-19 09:31:26.621124", "cmd": 1} {"id": 9526, "parent": 9522, "code": "module SecretSanta\n\nsig Employee {\n officePartners : set Employee,\n isSecretSantaFor : one Employee\n}\nsig Intern extends Employee { \n supervisor : one Employee \n}\n\npred santaRules {\n // Everyone has a Secret Santa, and nobody is their \n // own Secret Santa.\n// all e:Employee | \n// some s: Employee | \n// e in s.isSecretSantaFor\n Employee.isSecretSantaFor = Employee\n no isSecretSantaFor & iden\n// all e:Employee | e.isSecretSantaFor != e\n \n // Nobody should get a person assigned that they \n // share an office with.\n// & = intersection\n no officePartners & isSecretSantaFor\n \n // No intern should have to buy a present for their \n // supervisor.\n no intern & isSecretSantaFor\n\n}\n\nrun santaRules for 3", "permalink": "bless-crouch-knoll-stony", "time": "2023-12-19 09:31:30.872740", "cmd": 1} {"id": 9528, "parent": 9499, "code": "module SecretSanta\n\nsig Employee {\n officePartners : set Employee,\n isSecretSantaFor : one Employee\n}\nsig Intern extends Employee { \n supervisor : one Employee \n}\n\npred santaRules {\n // Everyone has a Secret Santa, and nobody is their \n // own Secret Santa.\n Employee.isSecretSantaFor = Employee\n no isSecretSantaFor & iden\n \n // Nobody should get a person assigned that they \n // share an office with.\n no officePartners & isSecretSantaFor \n // No intern should have to buy a present for their \n // supervisor.\n no supervisor & isSecretSantaFor \n \n \n}\n\nrun santaRules for 3", "permalink": "curing-tipper-badly-gave", "time": "2023-12-19 09:31:40.241074", "cmd": 1} {"id": 9529, "parent": 9524, "code": "module trees\n\nsig Tree {\n x: Int,\n y: Int\n} {\n x >= 0 and x <= 7\n y >= 0 and y <= 7\n}\n\npred placement {\n // no shared row, column, or diagonal\n all t1, t2: Tree | t1 != t2 => {\n t1.x != t2.x and t1.y != t2.y // no shared row or column\n and abs[t1.x - t2.x] != abs[t1.y - t2.y] // no shared diagonal\n and abs[t1.x - t2.x] != abs[t2.y - t1.y] // no shared anti-diagonal\n }\n\n // exactly 8 trees\n #Tree = 8\n}\n\n\nrun placement for 3 but exactly 8 Tree, 5 Int", "permalink": "pry-street-mutual-banter", "time": "2023-12-19 09:34:33.260450", "cmd": 1} {"id": 9530, "parent": 9529, "code": "module trees\n\nsig Tree {\n x: Int,\n y: Int\n} {\n x >= 0 and x <= 7\n y >= 0 and y <= 7\n}\n\npred placement {\n // no shared row, column, or diagonal\n all t1, t2: Tree | t1 != t2 => {\n t1.x != t2.x and t1.y != t2.y // no shared row or column\n and (t1.x + t1.y) != (t2.x + t2.y) // no shared main diagonal\n and (t1.x - t1.y) != (t2.x - t2.y) // no shared anti-diagonal\n }\n\n // exactly 8 trees\n #Tree = 8\n}\n\nrun placement for 3 but exactly 8 Tree, 5 Int", "permalink": "duo-glider-evade-maggot", "time": "2023-12-19 09:34:45.968742", "cmd": 1} {"id": 9531, "parent": 9530, "code": "module trees\n\nsig Tree {\n x: Int,\n y: Int\n} {\n x >= 0 and x <= 7\n y >= 0 and y <= 7\n}\n\npred placement {\n // no shared row, column, or diagonal\n all t1, t2: Tree | t1 != t2 => {\n t1.x != t2.x and t1.y != t2.y // no shared row or column\n and (t1.x + t1.y != t2.x + t2.y) // no shared main diagonal\n and (t1.x - t1.y != t2.x - t2.y) // no shared anti-diagonal\n }\n\n // exactly 8 trees\n #Tree = 8\n}\n\n\nrun placement for 3 but exactly 8 Tree, 5 Int", "permalink": "flop-last-exodus-undone", "time": "2023-12-19 09:35:15.777816", "cmd": 1} {"id": 9534, "parent": 9531, "code": "module trees\n\nsig Tree {\n x: Int,\n y: Int\n} {\n x >= 0 and x <= 7\n y >= 0 and y <= 7\n}\n\n\npred placement {\n // no shared row, column, or diagonal\n all t1, t2: Tree | t1 != t2 => {\n t1.x != t2.x and t1.y != t2.y // no shared row or column\n and abs[t1.x - t2.x] != abs[t1.y - t2.y] // no shared diagonal\n }\n\n // exactly 8 trees\n #Tree = 8\n}\n\n\n // exactly 8 trees\n #Tree = 8\n}\n\n\nrun placement for 3 but exactly 8 Tree, 5 Int", "permalink": "gear-diary-boots-motion", "time": "2023-12-19 09:37:00.107219", "cmd": 1} {"id": 9541, "parent": 9539, "code": "module trees\n\nsig Tree {\n x : Int,\n y : Int\n} {\n x >= 0 and x <= 7\n y >= 0 and y <= 7\n}\n\npred placement {\n // no shared row, column, or diagonal\n all tree1, tree2: Tree | tree1.x != tree2.y\n\n}\n\nrun placement for 3 but exactly 8 Tree, 5 Int", "permalink": "arise-frying-drum-pacify", "time": "2023-12-19 09:39:27.444641", "cmd": 1} {"id": 9545, "parent": 9544, "code": "module trees\n\nsig Tree {\n x : Int,\n y : Int\n} {\n x >= 0 and x <= 7\n y >= 0 and y <= 7\n}\n\npred placement {\n one t1: Tree\n // no shared row, column, or diagonal\n plus[1, 1]\n\n}\n\nrun placement for 3 but exactly 8 Tree, 5 Int", "permalink": "spool-suds-duh-carbon", "time": "2023-12-19 09:42:31.110247", "cmd": 1} {"id": 9546, "parent": 9536, "code": "module trees\n\nsig Tree {\n x : Int,\n y : Int\n} {\n x >= 0 and x <= 7\n y >= 0 and y <= 7\n}\n\npred placement {\n // no shared row, column, or diagonal\n all t1, t2: Tree | t1.x != t2.x\n}\n\nrun placement for 3 but exactly 8 Tree, 5 Int", "permalink": "gonad-curry-shut-path", "time": "2023-12-19 09:43:10.545294", "cmd": 1} {"id": 9570, "parent": 9381, "code": "module trees\n\nsig Tree {\n x : Int,\n y : Int\n} {\n x >= 0 and x <= 7\n y >= 0 and y <= 7\n}\n\npred placement {\n // no shared row, column, or diagonal\n all disj t1,t2: Tree\n}\n\nrun placement for 3 but exactly 8 Tree, 5 Int", "permalink": "random-gulf-rehab-tutor", "time": "2023-12-19 13:38:56.542717", "cmd": 1} {"id": 9574, "parent": 9381, "code": "module trees\n\nsig Tree {\n x : Int,\n y : Int\n} {\n x >= 0 and x <= 7\n y >= 0 and y <= 7\n}\n\npred placement {\n // no shared row, column, or diagonal\n all disj t1,t2: Tree | t1.x !=t2.x\n \n}\n\nrun placement for 3 but exactly 8 Tree, 5 Int", "permalink": "unsure-affirm-sprain-cortex", "time": "2023-12-19 13:45:10.494072", "cmd": 1} {"id": 9575, "parent": 9573, "code": "module trees\n\nsig Tree {\n x : Int,\n y : Int\n} {\n x >= 0 and x <= 7\n y >= 0 and y <= 7\n}\n\npred placement {\n // no shared row, column, or diagonal\n // all t1, t2: Tree | t1 != t2 implies (\n // t1.x != t2.x and \n // t1.y != t2.y and \n // plus[t1.x, t1.y] != plus[t2.x, t2.y] and \n // minus[t1.x, t1.y] != minus[t2.x, t2.y]\n // )\n all disj t1, t2: Tree | \n t1.x != t2.x and \n t1.y != t2.y and \n t1.x + t1.y != t2.x + t2.y and \n t1.x - t1.y != t2.x - t2.y \n}\n\n\nrun placement for 3 but exactly 8 Tree, 5 Int", "permalink": "racing-jam-tried-strum", "time": "2023-12-19 13:47:27.710677", "cmd": 1} {"id": 9576, "parent": 9575, "code": "module trees\n\nsig Tree {\n x : Int,\n y : Int\n} {\n x >= 0 and x <= 7\n y >= 0 and y <= 7\n}\n\npred placement {\n // no shared row, column, or diagonal\n // all t1, t2: Tree | t1 != t2 implies (\n // t1.x != t2.x and \n // t1.y != t2.y and \n // plus[t1.x, t1.y] != plus[t2.x, t2.y] and \n // minus[t1.x, t1.y] != minus[t2.x, t2.y]\n // )\n all disj t1, t2: Tree | \n t1.x != t2.x and \n t1.y != t2.y and \n t1.x + t1.y != t2.x + t2.y and \n t1.x - t1.y != t2.x - t2.y \n}\n\nrun placement for 3 but exactly 8 Tree, 5 Int", "permalink": "speech-zombie-catchy-blazer", "time": "2023-12-19 13:47:39.446383", "cmd": 1} {"id": 9495, "parent": 9494, "code": "module SecretSanta\n\nsig Employee {\n officePartners : set Employee,\n isSecretSantaFor : one Employee\n}\nsig Intern extends Employee { \n supervisor : one Employee \n}\n\npred santaRules {\n // Everyone has a Secret Santa, and nobody is their \n // own Secret Santa.\n all employee: Employee | employee.isSecretSantaFor != employee\n\n \n // Nobody should get a person assigned that they \n // share an office with.\n all employee: Employee | employee.isSecretSantaFor not in employee.officePartners\n \n // No intern should have to buy a present for their \n // supervisor.\n all intern: Intern | intern.isSecretSantaFor != intern.supervisor\n\n}\n\nrun santaRules for 3", "permalink": "suing-spur-amino-pellet", "time": "2023-12-19 09:16:05.480198", "cmd": 1} {"id": 9496, "parent": 9473, "code": "module SecretSanta\n\nsig Employee {\n officePartners: set Employee,\n isSecretSantaFor: one Employee\n}\n\nsig Intern extends Employee { \n supervisor: one Employee \n}\n\npred santaRules {\n // Everyone has a Secret Santa, and nobody is their \n // own Secret Santa.\n all e: Employee | one e.isSecretSantaFor and e.isSecretSantaFor != e\n\n // Nobody should get a person assigned that they \n // share an office with.\n all e: Employee | e.isSecretSantaFor !in e.officePartners\n\n // No intern should have to buy a present for their \n // supervisor.\n all i: Intern | i.supervisor != i.isSecretSantaFor\n}\n\nrun santaRules for 3", "permalink": "mutate-unclad-mouth-gluten", "time": "2023-12-19 09:17:57.207821", "cmd": 1} {"id": 9505, "parent": 9380, "code": "module SecretSanta\n\nsig Employee {\n officePartners : set Employee,\n isSecretSantaFor : one Employee\n}\nsig Intern extends Employee { \n supervisor : one Employee \n}\n\npred santaRules {\n // Everyone has a Secret Santa, and nobody is their \n // own Secret Santa.\n all e:Employee | \n some s: Employee | \n e in s.isSecretSantaFor \n all e:Employee | e.isSecretSantaFor != e\n \n // Nobody should get a person assigned that they \n // share an office with.\n \n // No intern should have to buy a present for their \n // supervisor.\n\n}\n\nrun santaRules for 3", "permalink": "acorn-wiry-waged-relax", "time": "2023-12-19 09:22:27.721730", "cmd": 1} {"id": 9507, "parent": 9504, "code": "module SecretSanta\n\nsig Employee {\n officePartners: set Employee,\n isSecretSantaFor: one Employee\n}\n\nsig Intern extends Employee { \n supervisor: one Employee \n}\n\npred santaRules {\n // Everyone has a Secret Santa, and nobody is their \n // own Secret Santa.\n all e: Employee | some s: Employee | e in s. isSecretSantaFor\n all e: Employee | e.isSecretSantaFor != e\n\n // Nobody should get a person assigned that they \n // share an office with.\n all e: Employee | e.isSecretSantaFor not in e.officePartners\n\n // No intern should have to buy a present for their \n // supervisor.\n all i: Intern | i.supervisor != i.isSecretSantaFor\n}\n\nrun santaRules for 3", "permalink": "unkind-brink-used-robin", "time": "2023-12-19 09:25:49.107159", "cmd": 1} {"id": 9508, "parent": 9381, "code": "module trees\n\nsig Tree {\n x: Int,\n y: Int\n} {\n x >= 0 and x <= 7\n y >= 0 and y <= 7\n}\n\npred placement {\n // no shared row, column, or diagonal\n all t1, t2: Tree | t1 != t2 => {\n t1.x != t2.x and t1.y != t2.y // no shared row or column\n and abs[t1.x - t2.x] != abs[t1.y - t2.y] // no shared diagonal\n }\n \n // exactly 8 trees\n #Tree = 8\n}\n\nrun placement for 3 but exactly 8 Tree, 5 Int", "permalink": "lapped-shock-blank-retake", "time": "2023-12-19 09:26:09.567428", "cmd": 1} {"id": 9533, "parent": 9532, "code": "module trees\n\nsig Tree {\n x : Int,\n y : Int\n} {\n x >= 0 and x <= 7\n y >= 0 and y <= 7\n}\n\npred placement {\n // no shared row, column, or diagonal\n t1: Tree | t2: Tree | t1.x != t2.x and t1.y != t2.y\n}\n\nrun placement for 3 but exactly 8 Tree, 5 Int", "permalink": "lushly-rubble-boggle-reveal", "time": "2023-12-19 09:36:36.830045", "cmd": 1} {"id": 9535, "parent": 9534, "code": "module trees\n\nsig Tree {\n x: Int,\n y: Int\n} {\n x >= 0 and x <= 7\n y >= 0 and y <= 7\n}\n\npred placement {\n // no shared row, column, or diagonal\n all t1, t2: Tree | t1 != t2 => {\n t1.x != t2.x and t1.y != t2.y // no shared row or column\n and (t1.x + t1.y != t2.x + t2.y) // no shared main diagonal\n and (t1.x - t1.y != t2.x - t2.y) // no shared anti-diagonal\n }\n\n // exactly 8 trees\n #Tree = 8\n}\n\n\nrun placement for 3 but exactly 8 Tree, 5 Int", "permalink": "scenic-cycle-widen-cage", "time": "2023-12-19 09:37:04.992048", "cmd": 1} {"id": 9536, "parent": 9533, "code": "module trees\n\nsig Tree {\n x : Int,\n y : Int\n} {\n x >= 0 and x <= 7\n y >= 0 and y <= 7\n}\n\npred placement {\n // no shared row, column, or diagonal\n t1: Tree | t2: Tree | t1 = t2\n}\n\nrun placement for 3 but exactly 8 Tree, 5 Int", "permalink": "pellet-image-crafty-sake", "time": "2023-12-19 09:37:47.555851", "cmd": 1} {"id": 9540, "parent": 9538, "code": "module trees\n\nsig Tree {\n x : Int,\n y : Int\n} {\n x >= 0 and x <= 7\n y >= 0 and y <= 7\n}\n\npred placement {\n\n // no shared row, column, or diagonal\n plus[t1.x, t1.y]\n\n}\n\nrun placement for 3 but exactly 8 Tree, 5 Int", "permalink": "target-siding-brunch-renter", "time": "2023-12-19 09:39:23.320486", "cmd": 1} {"id": 9542, "parent": 9540, "code": "module trees\n\nsig Tree {\n x : Int,\n y : Int\n} {\n x >= 0 and x <= 7\n y >= 0 and y <= 7\n}\n\npred placement {\n one t1: Tree\n // no shared row, column, or diagonal\n plus[t1.x, t1.y]\n\n}\n\nrun placement for 3 but exactly 8 Tree, 5 Int", "permalink": "arrive-dosage-uneven-okay", "time": "2023-12-19 09:40:20.260728", "cmd": 1} {"id": 9543, "parent": 9537, "code": "module trees\n\nsig Tree {\n x: Int,\n y: Int\n} {\n x >= 0 and x <= 7\n y >= 0 and y <= 7\n}\n\npred placement {\n // no shared row, column, or diagonal\n all t1, t2: Tree | t1 != t2 => {\n t1.x != t2.x and t1.y != t2.y \n and (t1.x + t1.y != t2.x + t2.y) \n and (t1.x - t1.y != t2.x - t2.y)\n }\n\n // exactly 8 trees\n #Tree = 8\n\n // each row and column should have exactly one tree\n all disj r, c: Int | lone t: Tree | t.x = r or t.y = c\n}\n\n\nrun placement for 3 but exactly 8 Tree, 5 Int", "permalink": "baked-scary-baboon-canine", "time": "2023-12-19 09:40:23.246420", "cmd": 1} {"id": 9548, "parent": null, "code": "module trees\n\nsig Tree {\n x: Int,\n y: Int\n } {\n x >= 0 and x <= 7\n y >= 0 and y <= 7\n }\n\n pred placement {\n // No shared row, column, or diagonal\n no t1, t2: Tree |\n t1 != t2 &&\n (t1.x != t2.x) && (t1.y != t2.y) &&\n (abs[t1.x - t2.x] != abs[t1.y - t2.y])\n }\n\n run placement for 8 Tree", "permalink": "mumps-delete-wound-zero", "time": "2023-12-19 09:44:41.984249", "cmd": 1} {"id": 9571, "parent": 9570, "code": "module trees\n\nsig Tree {\n x : Int,\n y : Int\n} {\n x >= 0 and x <= 7\n y >= 0 and y <= 7\n}\n\npred placement {\n // no shared row, column, or diagonal\n all t1, t2: Tree | t1 != t2 implies (\n t1.x != t2.x and \n t1.y != t2.y and \n abs[t1.x - t2.x] != abs[t1.y - t2.y]\n )\n}\n\nrun placement for 3 but exactly 8 Tree, 5 Int", "permalink": "manly-gladly-saucy-almost", "time": "2023-12-19 13:40:35.083963", "cmd": 1} {"id": 9572, "parent": 9571, "code": "module trees\n\nsig Tree {\n x : Int,\n y : Int\n} {\n x >= 0 and x <= 7\n y >= 0 and y <= 7\n}\n\npred placement {\n // no shared row, column, or diagonal\n all t1, t2: Tree | t1 != t2 implies (\n t1.x != t2.x and \n t1.y != t2.y and \n abs[t1.x - t2.x] != abs[t1.y - t2.y]\n )\n}\n\n\nrun placement for 3 but exactly 8 Tree, 5 Int", "permalink": "wipe-fringe-setup-folk", "time": "2023-12-19 13:40:55.359422", "cmd": 1} {"id": 9577, "parent": 9576, "code": "module trees\n\nsig Tree {\n x : Int,\n y : Int\n} {\n x >= 0 and x <= 7\n y >= 0 and y <= 7\n}\n\npred placement {\n // no shared row, column, or diagonal\n // all t1, t2: Tree | t1 != t2 implies (\n // t1.x != t2.x and \n // t1.y != t2.y and \n // plus[t1.x, t1.y] != plus[t2.x, t2.y] and \n // minus[t1.x, t1.y] != minus[t2.x, t2.y]\n // )\n all disj t1, t2: Tree | \n t1.x != t2.x and \n t1.y != t2.y and \n plus[t1.x, t1.y] != plus[t2.x, t2.y] and \n minus[t1.x, t1.y] != minus[t2.x, t2.y] \n}\n\nrun placement for 3 but exactly 8 Tree, 5 Int", "permalink": "matted-ice-dicing-errant", "time": "2023-12-19 13:51:36.266575", "cmd": 1} {"id": 13223, "parent": null, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // TODO Implement the constraints here\n\n // Constraint 1\n some x : Person | Agatha in x.killed\n\n // Constraint 2\n all x, y: Person | (y in x.killed implies (y in x.hates and not y in x.richer))\n\n // Constraint 3\n all x: Person | (x in Agatha.hates implies not x in Charles.hates)\n\n // Constraint 4\n (Agatha in Agatha.hates) and (Charles in Agatha.hates)\n\n // Constraint 5\n all x : Person | (not Agatha in x.richer implies x in Butler.hates)\n\n // Constraint 6\n all x: Person | (x in Agatha.hates implies x in Butler.hates)\n\n // Constraint 7\n all x : Person | some y: Person | not y in x.hates\n}\n\nrun puzzle", "permalink": "emboss-duvet-duress-apple", "time": "2024-06-10 18:02:03.633073", "cmd": 1} {"id": 13233, "parent": 13232, "code": "sig A{}\nrun {}", "permalink": "canyon-clinic-proton-sequel", "time": "2024-06-12 10:15:06.346013", "cmd": 1} {"id": 13232, "parent": null, "code": "sig A{}\nrun {}fc", "permalink": "cactus-drum-zombie-bleak", "time": "2024-06-12 10:15:02.022159", "cmd": 1} {"id": 13268, "parent": 13267, "code": "open util/integer\n\n// Define a signature for Items with attributes id, name, price, and quantity\nsig Item {\n id: Int,\n name: one String,\n price: Int,\n quantity: Int\n}\n\n// Define a singleton signature for Basket to hold a set of items and the total price\none sig Basket {\n items: set Item,\n totalPrice: Int\n}\n\n// Predicate to initialize the basket\npred Init {\n //some items // Ensure there are some items in the basket\n //all i: items | i.quantity >= 0 // Quantities should be non-negative\n Basket.totalPrice = 1 // Total price is the sum of (quantity * price) of all items\n}\n\n// Run the model with some initial items\nrun {\n Init\n} for 10 but 5 Int, 5 String", "permalink": "elbow-camera-oboe-grasp", "time": "2024-06-19 11:30:16.357737", "cmd": 1} {"id": 13273, "parent": 13272, "code": "open util/integer\n\n// Define a signature for Items with attributes id, name, price, and quantity\nsig Item {\n id: Int,\n name: one String,\n price: Int,\n quantity: Int\n}\n\n// Define a singleton signature for Basket to hold a set of items and the total price\none sig Basket {\n items: set Item, \n totalPrice: Int\n}\n\n// Predicate to initialize the basket\npred Init {\n //some items // Ensure there are some items in the basket\n //all i: items | i.quantity >= 0 // Quantities should be non-negative\n Basket.totalPrice = Basket.items.sum // Total price is the sum of (quantity * price) of all items\n}\n\n// Run the model with some initial items\nrun {\n Init\n} for 10 but 5 Int", "permalink": "simile-museum-sporty-send", "time": "2024-06-19 11:38:19.357028", "cmd": 1} {"id": 13276, "parent": 13275, "code": "open util/integer\n\n// Define a signature for Items with attributes id, name, price, and quantity\nsig Item {\n id: Int,\n name: one String,\n price: Int,\n quantity: Int\n}\n\n// Define a singleton signature for Basket to hold a set of items and the total price\none sig Basket {\n items: set Item, \n totalPrice: Int\n}\n\n// Predicate to initialize the basket\npred Init {\n //some items // Ensure there are some items in the basket\n //all i: items | i.quantity >= 0 // Quantities should be non-negative\n Basket.totalPrice = Basket.items.price.sum // Total price is the sum of (quantity * price) of all items\n}\n\n// Run the model with some initial items\nrun {\n Init\n} for 10 but 5 In", "permalink": "outbid-resend-editor-sadden", "time": "2024-06-19 11:40:27.012694", "cmd": 1} {"id": 13279, "parent": 13278, "code": "open util/integer\n\n// Define a signature for Items with attributes id, name, price, and quantity\nsig Item {\n id: Int,\n name: one String,\n price: Int,\n quantity: Int\n}\n\n// Define a singleton signature for Basket to hold a set of items and the total price\none sig Basket {\n items: set Item, \n totalPrice: Int\n}\n\n// Predicate to initialize the basket\npred Init {\n //some items // Ensure there are some items in the basket\n //all i: items | i.quantity >= 0 // Quantities should be non-negative\n Basket.totalPrice = Basket.items.price.sum // Total price is the sum of (quantity * price) of all items\n}\n\n// Run the model with some initial items\nrun {\n Init\n} for 5 items", "permalink": "spiffy-curfew-purist-album", "time": "2024-06-19 11:42:11.349196", "cmd": 1} {"id": 13285, "parent": 13284, "code": "open util/integer\n\n// Define a signature for Items with attributes id, name, price, and quantity\nsig Item {\n id: Int,\n name: one String,\n price: Int,\n quantity: Int\n}\n\n// Define a singleton signature for Basket to hold a set of items and the total price\nsig Basket {\n items: set Item, \n totalPrice: Int\n}\n\n// Predicate to initialize the basket\npred Init {\n //some items // Ensure there are some items in the basket\n //all i: items | i.quantity >= 0 // Quantities should be non-negative\n Basket.totalPrice = Basket.items.price.sum // Total price is the sum of (quantity * price) of all items\n}\n\n// Run the model with some initial items\nrun {\n Init\n} for 10", "permalink": "eggnog-bok-filth-gossip", "time": "2024-06-19 11:44:22.718469", "cmd": 1} {"id": 13305, "parent": 13304, "code": "sig Student {}\n\nsig Course {\n members: set Student\n}\n\nfact {\n // Ensuring that each course has at least one student\n all c: Course | some c.members\n}\n\nrun {}", "permalink": "runny-driven-frame-why", "time": "2024-06-20 09:01:26.760178", "cmd": 1} {"id": 13307, "parent": 13306, "code": "sig Student {}\n\nsig Course {\n members: set Student\n}\n\nrun {}", "permalink": "walk-lily-gerbil-jelly", "time": "2024-06-20 09:09:05.638456", "cmd": 1} {"id": 13321, "parent": null, "code": "\none sig Platoon {\n children : set AddressingScheme + Channels + Movement + Member\n} {\n -- feature instance multiplicity\n 1 = # children & AddressingScheme\n 1 = # children & Channels\n 1 = # children & Movement\n # children & Member >= 1\n -- group instance multiplicity\n # children >= 4\n -- group type multiplicity (cannot easily count: enumerate subsets)\n some AddressingScheme and some Channels and some Movement and some Member\n -- example for <3, 4>\n -- (no AddressingScheme and some Channels and some Movement and some Member) or\n -- (some AddressingScheme and no Channels and some Movement and some Member) or\n -- (some AddressingScheme and some Channels and no Movement and some Member) or\n -- (some AddressingScheme and some Channels and some Movement and no Member) or\n -- (some AddressingScheme and some Channels and some Movement and some Member)\n}\n\nsig AddressingScheme {\n children : set Regular + Compact\n} {\n -- feature instance multiplicity\n # children & Regular >= 0\n # children & Regular <= 1\n -- TODO why does swapping order alter result\n # children & Regular >= 0\n # children & Compact <= 1\n -- group instance multiplicity\n # children = 1\n}\n\nsig Channels {}\nsig Movement {}\nsig Member {}\nsig Regular {}\nsig Compact {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "celtic-faucet-creed-copy", "time": "2024-06-21 15:01:23.191355", "cmd": 1} {"id": 13332, "parent": 13331, "code": "// Alloy model generated from Feature model\n\nsig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 0\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 1\n # children & Compact <= 1\n # children >= 0\n some Regular and some Compact\n}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\nsig Movement {}\nsig Regular {}\nsig Compact {}\nsig Member {}\nsig Channels {}\n\nrun {} for 10 but 5 Int", "permalink": "impish-prewar-drone-unruly", "time": "2024-06-21 15:46:06.175102", "cmd": 1} {"id": 13333, "parent": 13332, "code": "// Alloy model generated from Feature model\n\nsig Platoon {\n children: set AddressingScheme + blah + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & blah >= 1\n # children & blah <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 0\n some AddressingScheme and some blah and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 1\n # children & Compact <= 1\n # children >= 0\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig blah {\n children: set mo + momo\n} {\n # children & mo >= 0\n # children & mo <= 1\n # children & momo >= 0\n # children & momo <= 2\n # children >= 0\n some mo and some momo\n}\nsig mo {}\n\nsig momo {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + blah + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n blah.children = mo + momo\n}\nsig mo {}\nsig Movement {}\nsig Regular {}\nsig momo {}\nsig Compact {}\nsig Member {}\nsig Channels {}\n\nrun {} for 10 but 5 Int", "permalink": "fiddle-suburb-basket-wimp", "time": "2024-06-21 15:47:46.195696", "cmd": 1} {"id": 13335, "parent": 13334, "code": "// Alloy model generated from Feature model\n\nsig Platoon {\n children: set AddressingScheme + blah + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & blah >= 1\n # children & blah <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 0\n some AddressingScheme and some blah and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 1\n # children & Compact <= 1\n # children >= 0\n some Regular and some Compact\n}\n\n\n\nsig blah {\n children: set mo + momo\n} {\n # children & mo >= 0\n # children & mo <= 1\n # children & momo >= 0\n # children & momo <= 2\n # children >= 0\n some mo and some momo\n}\n\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + blah + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n blah.children = mo + momo\n}\nsig mo {}\nsig Movement {}\nsig Regular {}\nsig momo {}\nsig Compact {}\nsig Member {}\nsig Channels {}\n\nrun {} for 10 but 5 Int", "permalink": "ditch-chimp-lark-deputy", "time": "2024-06-21 15:48:26.352912", "cmd": 1} {"id": 13338, "parent": 13325, "code": "// Alloy model generated from Feature model\n\nsig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children >= 1\n # children <= 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "canopy-humvee-grower-cover", "time": "2024-06-21 17:16:59.605735", "cmd": 1} {"id": 13339, "parent": 13338, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children >= 1\n # children <= 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children >= 1\n # children <= 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\nfact childrenBelongToParent {\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "siesta-raging-impose-bulgur", "time": "2024-06-21 17:24:37.255926", "cmd": 1} {"id": 13341, "parent": 13340, "code": "// Alloy model generated from Feature model\n\nsig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children >= 1\n # children <= 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "spry-frenzy-oblong-gains", "time": "2024-06-21 17:31:56.354627", "cmd": 1} {"id": 13342, "parent": 13341, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children >= 1\n # children <= 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "rewash-woven-filler-balmy", "time": "2024-06-21 17:32:05.358614", "cmd": 1} {"id": 13344, "parent": 13343, "code": "one sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children >= 1\n # children <= 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 3 Int", "permalink": "lash-drudge-colony-borax", "time": "2024-06-21 17:33:34.404344", "cmd": 1} {"id": 13348, "parent": 13347, "code": "one sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children = 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 3 Int", "permalink": "canopy-could-douche-turban", "time": "2024-06-21 17:34:39.397793", "cmd": 1} {"id": 13351, "parent": 13350, "code": "one sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme = 1\n # children & Channels = 1\n # children & Movement = 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children = 1\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 3 Int", "permalink": "sprint-frolic-iguana-raving", "time": "2024-06-21 17:37:10.706856", "cmd": 1} {"id": 13353, "parent": 13352, "code": "one sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme = 1\n # children & Channels = 1\n # children & Movement = 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\none sig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children = 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "mashed-prayer-blah-rimmed", "time": "2024-06-21 17:37:43.994796", "cmd": 1} {"id": 13266, "parent": null, "code": "open util/integer\n\n// Define a signature for Items with attributes id, name, price, and quantity\nsig Item {\n id: Int,\n name: one String,\n price: Int,\n quantity: Int\n}\n\n// Define a singleton signature for Basket to hold a set of items and the total price\none sig Basket {\n items: set Item,\n totalPrice: Int\n}\n\n// Predicate to initialize the basket\npred Init {\n //some items // Ensure there are some items in the basket\n //all i: items | i.quantity >= 0 // Quantities should be non-negative\n Basket.totalPrice = sum i: Basket.items | i.price // Total price is the sum of (quantity * price) of all items\n}\n\n// Run the model with some initial items\nrun {\n Init\n} for 10 but 5 Int, 5 String", "permalink": "return-masses-spout-yippee", "time": "2024-06-19 11:28:19.301760", "cmd": 1} {"id": 13275, "parent": 13274, "code": "open util/integer\n\n// Define a signature for Items with attributes id, name, price, and quantity\nsig Item {\n id: Int,\n name: one String,\n price: Int,\n quantity: Int\n}\n\n// Define a singleton signature for Basket to hold a set of items and the total price\none sig Basket {\n items: set Item, \n totalPrice: Int\n}\n\n// Predicate to initialize the basket\npred Init {\n //some items // Ensure there are some items in the basket\n //all i: items | i.quantity >= 0 // Quantities should be non-negative\n Basket.totalPrice = Basket.items.price.sum // Total price is the sum of (quantity * price) of all items\n}\n\n// Run the model with some initial items\nrun {\n Init\n} for 10 ", "permalink": "fading-extent-dandy-object", "time": "2024-06-19 11:39:30.075165", "cmd": 1} {"id": 13277, "parent": 13276, "code": "open util/integer\n\n// Define a signature for Items with attributes id, name, price, and quantity\nsig Item {\n id: Int,\n name: one String,\n price: Int,\n quantity: Int\n}\n\n// Define a singleton signature for Basket to hold a set of items and the total price\none sig Basket {\n items: set Item, \n totalPrice: Int\n}\n\n// Predicate to initialize the basket\npred Init {\n //some items // Ensure there are some items in the basket\n //all i: items | i.quantity >= 0 // Quantities should be non-negative\n Basket.totalPrice = Basket.items.price.sum // Total price is the sum of (quantity * price) of all items\n}\n\n// Run the model with some initial items\nrun {\n Init\n} for 10 but 5 Int", "permalink": "object-viewer-self-swarm", "time": "2024-06-19 11:40:34.179739", "cmd": 1} {"id": 13278, "parent": 13277, "code": "open util/integer\n\n// Define a signature for Items with attributes id, name, price, and quantity\nsig Item {\n id: Int,\n name: one String,\n price: Int,\n quantity: Int\n}\n\n// Define a singleton signature for Basket to hold a set of items and the total price\none sig Basket {\n items: set Item, \n totalPrice: Int\n}\n\n// Predicate to initialize the basket\npred Init {\n //some items // Ensure there are some items in the basket\n //all i: items | i.quantity >= 0 // Quantities should be non-negative\n Basket.totalPrice = Basket.items.price.sum // Total price is the sum of (quantity * price) of all items\n}\n\n// Run the model with some initial items\nrun {\n Init\n} ", "permalink": "lazily-thrash-caress-clear", "time": "2024-06-19 11:41:44.560889", "cmd": 1} {"id": 13281, "parent": 13280, "code": "open util/integer\n\n// Define a signature for Items with attributes id, name, price, and quantity\nsig Item {\n id: Int,\n name: one String,\n price: Int,\n quantity: Int\n}\n\n// Define a singleton signature for Basket to hold a set of items and the total price\none sig Basket {\n items: set Item, \n totalPrice: Int\n}\n\n// Predicate to initialize the basket\npred Init {\n //some items // Ensure there are some items in the basket\n //all i: items | i.quantity >= 0 // Quantities should be non-negative\n Basket.totalPrice = Basket.items.price.sum // Total price is the sum of (quantity * price) of all items\n}\n\n// Run the model with some initial items\nrun {\n Init\n} for 10 but 5 item", "permalink": "recopy-rinse-stand-stash", "time": "2024-06-19 11:42:39.794037", "cmd": 1} {"id": 13283, "parent": 13282, "code": "open util/integer\n\n// Define a signature for Items with attributes id, name, price, and quantity\nsig Item {\n id: Int,\n name: one String,\n price: Int,\n quantity: Int\n}\n\n// Define a singleton signature for Basket to hold a set of items and the total price\nsig Basket {\n items: set Item, \n totalPrice: Int\n}\n\n// Predicate to initialize the basket\npred Init {\n //some items // Ensure there are some items in the basket\n //all i: items | i.quantity >= 0 // Quantities should be non-negative\n Basket.totalPrice = Basket.items.price.sum // Total price is the sum of (quantity * price) of all items\n}\n\n// Run the model with some initial items\nrun {\n Init\n} for 10 ", "permalink": "omega-grunge-emboss-envoy", "time": "2024-06-19 11:43:24.347190", "cmd": 1} {"id": 13303, "parent": 13302, "code": "sig Person {}\nsig Group {\n members: set Person\n}\n\nrun {}", "permalink": "aim-ether-jaunt-grass", "time": "2024-06-20 08:57:21.103001", "cmd": 1} {"id": 13306, "parent": 13305, "code": "sig Student {}\n\nsig Course {\n members: some Student\n}\n\nrun {}", "permalink": "dash-fiddle-egging-fringe", "time": "2024-06-20 09:08:24.691789", "cmd": 1} {"id": 13322, "parent": 13321, "code": "one sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n}\n\nrun {} for 10 but 5 Int", "permalink": "sudden-cyclic-drench-walrus", "time": "2024-06-21 15:06:28.026357", "cmd": 1} {"id": 13323, "parent": 13322, "code": "one sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n}\n\nrun {} for 10 but 5 Int", "permalink": "spoils-cost-basil-plated", "time": "2024-06-21 15:14:35.214706", "cmd": 1} {"id": 13324, "parent": 13323, "code": "one sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\n\nsig Channels {}\nsig Movement {}\nsig Member {}\nsig Regular {}\nsig Compact {}\n\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n}\n\nrun {} for 10 but 5 Int", "permalink": "truck-stump-cinch-mayday", "time": "2024-06-21 15:15:51.836818", "cmd": 1} {"id": 13326, "parent": null, "code": "// Alloy model generated from Feature model\n\nsig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 0\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 1\n # children & Compact <= 1\n # children >= 0\n some Regular and some Compact\n}\nsig Regular {}\n # children >= 0\n some \n\nsig Compact {}\n # children >= 0\n some \n\n\nsig Channels {}\n # children >= 0\n some \n\nsig Movement {}\n # children >= 0\n some \n\nsig Member {}\n # children >= 0\n some \n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\nsig Movement {}\nsig AddressingScheme {}\nsig Regular {}\nsig Compact {}\nsig Member {}\nsig Channels {}\n\nrun {} for 10 but 5 Int", "permalink": "voyage-kisser-bok-mug", "time": "2024-06-21 15:30:04.530780", "cmd": 1} {"id": 13328, "parent": 13327, "code": "// Alloy model generated from Feature model\n\nsig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 0\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 1\n # children & Compact <= 1\n # children >= 0\n some Regular and some Compact\n}\nsig Regular {}\n\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\nsig Movement {}\nsig AddressingScheme {}\nsig Regular {}\nsig Compact {}\nsig Member {}\nsig Channels {}\n\nrun {} for 10 but 5 Int", "permalink": "shrimp-squeak-elope-bok", "time": "2024-06-21 15:31:02.726012", "cmd": 1} {"id": 13330, "parent": 13329, "code": "// Alloy model generated from Feature model\n\nsig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 0\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 1\n # children & Compact <= 1\n # children >= 0\n some Regular and some Compact\n}\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\nsig Movement {}\nsig Regular {}\nsig Compact {}\nsig Member {}\nsig Channels {}\n\nrun {} for 10 but 5 Int", "permalink": "remedy-mumbo-sulfur-tyke", "time": "2024-06-21 15:31:41.723692", "cmd": 1} {"id": 13334, "parent": 13333, "code": "// Alloy model generated from Feature model\n\nsig Platoon {\n children: set AddressingScheme + blah + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & blah >= 1\n # children & blah <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 0\n some AddressingScheme and some blah and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 1\n # children & Compact <= 1\n # children >= 0\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig blah {\n children: set mo + momo\n} {\n # children & mo >= 0\n # children & mo <= 1\n # children & momo >= 0\n # children & momo <= 2\n # children >= 0\n some mo and some momo\n}\n\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + blah + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n blah.children = mo + momo\n}\nsig mo {}\nsig Movement {}\nsig Regular {}\nsig momo {}\nsig Compact {}\nsig Member {}\nsig Channels {}\n\nrun {} for 10 but 5 Int", "permalink": "slaw-alumni-resale-stack", "time": "2024-06-21 15:47:51.677467", "cmd": 1} {"id": 13340, "parent": 13339, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children >= 1\n # children <= 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "sled-raft-verify-sludge", "time": "2024-06-21 17:31:37.841346", "cmd": 1} {"id": 13349, "parent": 13348, "code": "one sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme = 1\n # children & Channels = 1\n # children & Movement = 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children = 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 3 Int", "permalink": "reword-unwary-liver-eaten", "time": "2024-06-21 17:36:13.820517", "cmd": 1} {"id": 13352, "parent": 13351, "code": "one sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme = 1\n # children & Channels = 1\n # children & Movement = 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\none sig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children = 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 3 Int", "permalink": "waffle-decoy-paddle-police", "time": "2024-06-21 17:37:23.071407", "cmd": 1} {"id": 13355, "parent": 13354, "code": "one sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme = 1\n # children & Channels = 1\n # children & Movement = 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\none sig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children = 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 3 Int", "permalink": "tiara-sprawl-doozy-radio", "time": "2024-06-21 17:37:49.022699", "cmd": 1} {"id": 13357, "parent": 13356, "code": "one sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme = 1\n # children & Channels = 1\n # children & Movement = 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\none sig AddressingScheme {\n children : set Regular + Compact\n} {\n -- feature instance multiplicity\n # children & Regular >= 0\n # children & Regular <= 1\n -- TODO why does swapping order alter result\n # children & Regular >= 0\n # children & Compact <= 1 \n -- group instance multiplicity\n # children = 1\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 3 Int", "permalink": "siesta-said-yodel-album", "time": "2024-06-21 17:43:29.320291", "cmd": 1} {"id": 13362, "parent": 13361, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme = 1\n # children & Channels = 1\n # children & Movement = 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children = 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 3 Int", "permalink": "wisdom-duly-stole-shape", "time": "2024-06-21 17:46:13.479567", "cmd": 1} {"id": 13366, "parent": 13365, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children >= 1\n # children <= 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 8 Int", "permalink": "eject-helmet-ablaze-lair", "time": "2024-06-21 17:49:19.182359", "cmd": 1} {"id": 13373, "parent": 13372, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme = 1\n # children & Channels = 1\n # children & Movement = 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children = 1\nsome Regular and some Compact\n\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 3 Int", "permalink": "feed-truth-croon-oval", "time": "2024-06-21 17:52:47.408292", "cmd": 1} {"id": 13378, "parent": 13377, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme = 1\n # children & Channels = 1\n # children & Movement = 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children = 1\nsome Regular and some Compact\n\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "launch-mosaic-latter-probe", "time": "2024-06-21 17:55:33.847404", "cmd": 1} {"id": 10838, "parent": null, "code": "sig Person {} \nsig Book{\n author : Person,\n title : String\n}\npred bookWithtitle(b: Book, title : string){\n b.title in title\n}\nrun bookWithtitle { some b: Book | bookWithtitle[b, \"Introduction to Software Engineering\"] } ", "permalink": "google-resale-curtly-unfair", "time": "2024-01-29 12:54:01.811736", "cmd": 1} {"id": 13371, "parent": 13370, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme = 1\n # children & Channels = 1\n # children & Movement = 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children = 1\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "fleshy-detail-alive-negate", "time": "2024-06-21 17:50:40.601425", "cmd": 1} {"id": 13374, "parent": 13373, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme = 1\n # children & Channels = 1\n # children & Movement = 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children = 1\nsome Regular and some Compact\n\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 1 Int", "permalink": "mantis-travel-boots-tables", "time": "2024-06-21 17:52:53.584901", "cmd": 1} {"id": 13384, "parent": 13383, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children >= 1\n # children <= 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "gooey-mute-gown-street", "time": "2024-06-21 18:00:40.073410", "cmd": 1} {"id": 13556, "parent": 13555, "code": "sig A {}", "permalink": "rarity-iguana-tutu-email", "time": "2024-07-03 07:56:47.589046", "cmd": 1} {"id": 13557, "parent": 13556, "code": "sig A {}", "permalink": "lushly-caucus-scoop-scary", "time": "2024-07-03 07:56:48.558476", "cmd": 1} {"id": 13565, "parent": 13564, "code": "sig A {}", "permalink": "hybrid-chafe-spring-skied", "time": "2024-07-03 08:03:49.106510", "cmd": 1} {"id": 10934, "parent": null, "code": "sig A{}\nrun {}", "permalink": "suburb-august-vowel-nibble", "time": "2024-02-02 12:32:28.152726", "cmd": 1} {"id": 10935, "parent": 10934, "code": "sig A{}\nrun {} 5", "permalink": "landed-apple-fog-rimmed", "time": "2024-02-02 12:32:42.749944", "cmd": 1} {"id": 10966, "parent": 6744, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "parrot-litter-koala-handed", "time": "2024-02-07 11:52:24.366555", "cmd": 1} {"id": 10967, "parent": 10966, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(2){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "skies-utmost-disown-uphold", "time": "2024-02-07 11:52:33.817051", "cmd": 1} {"id": 10968, "parent": 10967, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "shove-omega-snore-rimmed", "time": "2024-02-07 11:52:46.004581", "cmd": 1} {"id": 10969, "parent": 10968, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n1 : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "secret-waltz-hurler-street", "time": "2024-02-07 11:52:53.004488", "cmd": 1} {"id": 10970, "parent": 10969, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some 1 : List.header.*link | no n.link\n}\nrun acyclic for 6", "permalink": "stuck-musky-kitty-duh", "time": "2024-02-07 11:53:01.794642", "cmd": 1} {"id": 10991, "parent": 10990, "code": "one sig List { header: lone Node }\n\nsig Node { link: lone Node }\n\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\n\nrun acyclic for 1", "permalink": "banish-blurt-kept-faucet", "time": "2024-02-20 08:23:58.487468", "cmd": 1} {"id": 10996, "parent": 10995, "code": "lone sig List { header: lone Node }\n\nsig Node { link: lone Node }\n\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3", "permalink": "utopia-hatred-proxy-shed", "time": "2024-02-20 08:24:45.215781", "cmd": 1} {"id": 11004, "parent": 11003, "code": "one sig List { header: lone Node }\nsig Node { link: lone Node }\npred acyclic{\nno List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "detest-rewrap-alias-racoon", "time": "2024-02-21 07:17:12.401509", "cmd": 1} {"id": 11012, "parent": 11011, "code": "open util/integer\n\n// Meta-model\none sig FM {\n root: one Feature,\n group: set Feature,\n require: ConstraintNode -> ConstraintNode,\n exclude: ConstraintNode -> ConstraintNode,\n config: set Instance\n}\n\nabstract sig Feature{\n groupCardinality: set Intervall,\n groupInstanceCardinality: set Intervall,\n cardinality: some Intervall,\n parent: lone Feature,\n instances: set Instance\n}\n\nsig Instance {\n feature: one Feature,\n instanceParent: lone Instance\n}\n\nsig Intervall {\n lowerBound: Int,\n upperBound: Int + KleeneStar\n}\n\nabstract sig ConstraintNode {\n feature: one Feature,\n cardinality: some Intervall\n}\n\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n f = FM.root\n}\n\n// Only one feature can be a root\nfact {\n all f: Feature | (IsRoot[f] <=> (f in FM.root.instances))\n}\n\n// Example features\none sig Feature1, Feature2, Feature3 extends Feature{}\n\n// Example intervals\none sig i1, i2 extends Intervall{}\n\n// Example constraint nodes\none sig c1, c2 extends ConstraintNode{}\n\n// Example FM\nfact {\n // FM.root must be one of the features\n FM.root in Feature1 + Feature2 + Feature3\n}\n\n// Linking features to their cardinality intervals\nfact {\n Feature1.cardinality = i1\n Feature2.cardinality = i1\n Feature3.cardinality = i2\n}\n\n// Linking constraint nodes to their features and cardinality intervals\nfact {\n c1.feature = Feature1\n c1.cardinality = i1\n\n c2.feature = Feature2\n c2.cardinality = i2\n}\n\n// Linking FM's require and exclude\nfact {\n FM.require = c1 -> c2\n}\n\n// Example configuration\nfact {\n no FM.config\n}\n\nrun show for 1", "permalink": "smudge-swan-runner-deem", "time": "2024-02-22 14:57:34.497980", "cmd": 1} {"id": 11016, "parent": 11015, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n// Example features\none sig Platoon, AddressingScheme, Channels, Movement extends Feature{}\n\n// Example intervals\none sig i1, i2, i3 extends Intervall{}\n\n// Example constraint nodes\none sig c0, c1, c2 extends ConstraintNode{}\n\n// Example FM\nfact {\n FM.root = Platoon\n FM.group = Channels + Movement\n\n // Linking features to their cardinality intervals\n Platoon.cardinality = i1\n Channels.cardinality = i2\n Movement.cardinality = i3\n\n // Linking constraint nodes to their features and cardinality intervals\n c0.feature = Platoon\n c0.cardinality = i1\n\n c1.feature = Channels\n c1.cardinality = i2\n\n c2.feature = Movement\n c2.cardinality = i3\n\n // Linking FM's require and exclude\n FM.require = c2 -> c0\n}\n\n// Example configuration\nfact {\n no FM.config\n}\n\npred show{}\nrun show", "permalink": "septum-plow-nerd-skid", "time": "2024-02-22 15:01:36.980149", "cmd": 1} {"id": 11021, "parent": 11020, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\none sig Platoon, AddressingScheme, Channels, Movement extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25, i26, i27, i28, i29, i30, i31, i32, i33 extends Intervall{}\none sig c0, c1, c2, c3, c4, c5, c6, c7, c8, c9 extends ConstraintNode{}\nfact {\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 4\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 4\ni3.upperBound = 4\nPlatoon.groupCardinality = i3\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = 1\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\n\n\n\n}\npred show{}\nrun show for 3 but 2 Feature, 2 ConstraintNode, 1 Instance", "permalink": "saved-aspect-jigsaw-city", "time": "2024-02-22 15:19:12.550128", "cmd": 1} {"id": 11023, "parent": 11022, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\none sig Platoon, AddressingScheme, Channels extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8 extends Intervall{}\nfact {\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 4\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 4\ni3.upperBound = 4\nPlatoon.groupCardinality = i3\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = 1\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\n\n\n\n}\npred show{}\nrun show for 3 but 3 Feature, 0 ConstraintNode, 1 Instance", "permalink": "clash-mobile-oyster-disk", "time": "2024-02-22 15:20:11.720260", "cmd": 1} {"id": 11027, "parent": 11026, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\none sig Platoon, AddressingScheme, Channels, Regular, Compact, HighThroughput, Reliable extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i16, i17, i18, i19, i24, i25 extends Intervall{}\nfact {\n //Platoon\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 4\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 4\ni3.upperBound = 4\nPlatoon.groupCardinality = i3\n\n//Addressing Scheme\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\n\n//Addressing Scheme Children: Regular, Compact\nRegular.parent = AddressingScheme\ni16.lowerBound = 0\ni16.upperBound = 1\nRegular.cardinality = i16\nCompact.parent = AddressingScheme\ni17.lowerBound = 0\ni17.upperBound = 1\nCompact.cardinality = i17\n\n//Channels\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\n\n//Channels Children: High Throughput, Reliable\nHighThroughput.parent = Channels\ni18.lowerBound = 1\ni18.upperBound = 8\nHighThroughput.cardinality = i18\nReliable.parent = Channels\ni19.lowerBound = 1\ni19.upperBound = 32\nReliable.cardinality = i19\n\n//Cardinality: Compact / High Throughput\nc0.feature = Compact\ni24.lowerBound = 1\ni24.upperBound = KleeneStar\nc0.cardinality = i24\nc5.feature = HighThroughput\ni25.lowerBound = 10\ni25.upperBound = 20\nc5.cardinality = i25\nc1.feature = HighThroughput\n\nFM.exclude = c0 -> c5\n\n\n\n}\npred show{}\nrun show for 3 but 3 Feature, 0 ConstraintNode, 1 Instance", "permalink": "crock-scoff-stark-upwind", "time": "2024-02-22 16:15:22.692871", "cmd": 1} {"id": 11029, "parent": 11028, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Channels, Regular, Compact, HighThroughput, Reliable extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i16, i17, i18, i19, i24, i25 extends Intervall{}\none sig c0, c5 extends ConstraintNode{}\n\n\nfact {\n //Platoon\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 4\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 4\ni3.upperBound = 4\nPlatoon.groupCardinality = i3\n\n//Addressing Scheme\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\n\n//Addressing Scheme Children: Regular, Compact\nRegular.parent = AddressingScheme\ni16.lowerBound = 0\ni16.upperBound = 1\nRegular.cardinality = i16\nCompact.parent = AddressingScheme\ni17.lowerBound = 0\ni17.upperBound = 1\nCompact.cardinality = i17\n\n//Channels\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\n\n//Channels Children: High Throughput, Reliable\nHighThroughput.parent = Channels\ni18.lowerBound = 1\ni18.upperBound = 8\nHighThroughput.cardinality = i18\nReliable.parent = Channels\ni19.lowerBound = 1\ni19.upperBound = 32\nReliable.cardinality = i19\n\n//Cardinality: Compact / High Throughput\nc0.feature = Compact\ni24.lowerBound = 1\ni24.upperBound = KleeneStar\nc0.cardinality = i24\nc5.feature = HighThroughput\ni25.lowerBound = 10\ni25.upperBound = 20\nc5.cardinality = i25\n\nFM.exclude = c0 -> c5\n\n\n\n}\npred show{}\nrun show for 3 but 3 Feature, 0 ConstraintNode, 1 Instance", "permalink": "record-gurgle-cope-aliens", "time": "2024-02-22 16:16:57.752159", "cmd": 1} {"id": 11034, "parent": 11033, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Channels, Regular, Compact, HighThroughput, Reliable extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i16, i17, i18, i19, i24, i25 extends Intervall{}\none sig c0, c5 extends ConstraintNode{}\n\n\nfact {\n //Platoon\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 4\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 4\ni3.upperBound = 4\nPlatoon.groupCardinality = i3\n\n//Addressing Scheme\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\n\n//Addressing Scheme Children: Regular, Compact\nRegular.parent = AddressingScheme\ni16.lowerBound = 0\ni16.upperBound = 1\nRegular.cardinality = i16\nCompact.parent = AddressingScheme\ni17.lowerBound = 0\ni17.upperBound = 1\nCompact.cardinality = i17\n\n//Channels\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\n\n//Channels Children: High Throughput, Reliable\nHighThroughput.parent = Channels\ni18.lowerBound = 1\ni18.upperBound = 8\nHighThroughput.cardinality = i18\nReliable.parent = Channels\ni19.lowerBound = 1\ni19.upperBound = 32\nReliable.cardinality = i19\n\n//Cardinality: Compact / High Throughput\nc0.feature = Compact\ni24.lowerBound = 1\ni24.upperBound = KleeneStar\nc0.cardinality = i24\nc5.feature = HighThroughput\ni25.lowerBound = 10\ni25.upperBound = 20\nc5.cardinality = i25\n\nFM.exclude = c0 -> c5\n\n\n\n}\npred show{}\nrun show for 10, but 7 Intervall, 0 Feature, 0 ConstraintNode", "permalink": "twins-motive-slacks-oat", "time": "2024-02-22 16:31:54.385535", "cmd": 1} {"id": 11040, "parent": 11039, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Channels, Regular, Compact, HighThroughput, Reliable extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i16, i17, i18, i19, i24, i25 extends Intervall{}\none sig c0, c5 extends ConstraintNode{}\n\n\nfact {\n //Platoon\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 4\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 4\ni3.upperBound = 4\nPlatoon.groupCardinality = i3\n\n//Addressing Scheme\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\n\n//Addressing Scheme Children: Regular, Compact\nRegular.parent = AddressingScheme\ni16.lowerBound = 0\ni16.upperBound = 1\nRegular.cardinality = i16\nCompact.parent = AddressingScheme\ni17.lowerBound = 0\ni17.upperBound = 1\nCompact.cardinality = i17\n\n//Channels\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\n\n//Channels Children: High Throughput, Reliable\nHighThroughput.parent = Channels\ni18.lowerBound = 1\ni18.upperBound = 8\nHighThroughput.cardinality = i18\nReliable.parent = Channels\ni19.lowerBound = 1\ni19.upperBound = 32\nReliable.cardinality = i19\n\n//Cardinality: Compact / High Throughput\nc0.feature = Compact\ni24.lowerBound = 1\ni24.upperBound = KleeneStar\nc0.cardinality = i24\nc5.feature = HighThroughput\ni25.lowerBound = 10\ni25.upperBound = 20\nc5.cardinality = i25\n\nFM.exclude = c0 -> c5\n\n\n\n}\npred show{}\nrun show for 3 but 5 int, 0 Feature, 0 ConstraintNode", "permalink": "hurray-exhume-colony-falcon", "time": "2024-02-22 16:51:20.131412", "cmd": 1} {"id": 11150, "parent": 11149, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "oaf-unwind-boring-statue", "time": "2024-03-03 10:40:37.661281", "cmd": 2} {"id": 11153, "parent": 11152, "code": "code: /* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\nsig Book {\n authors: set Author,\n catalogedIn: one Catalog\n}\n\nsig Author {\n writtenBooks: set Book,\n affiliatedLibrary: one Library\n}\n\nsig Member {\n borrowedBooks: set Loan,\n memberOf: one Library\n}\n\nsig Librarian {\n managedBooks: set Book,\n worksAt: one Library\n}\n\nsig Loan {\n book: one Book,\n borrower: one Member\n}\n\nsig Catalog {\n books: set Book,\n library: one Library\n}\n\nsig Library {\n members: set Member,\n catalog: one Catalog\n}\n\n// Facts\nfact AllBooksInLibraryCatalog {\n all b: Book | b in b.catalogedIn.books\n}\n\nfact ConsistentLibraryMembership {\n all m: Member | m.memberOf = m.borrowedBooks.book.catalogedIn.library\n}\n\n// Predicates\npred ValidLoan(m: Member, b: Book) {\n b in m.memberOf.catalog.books and\n b not in m.borrowedBooks.book\n}\n\npred LibrarianManagesBooks(l: Librarian) {\n all b: l.managedBooks | b.catalogedIn.library = l.worksAt\n}\n\n// Assertions\nassert NoLoanForNonCatalogedBooks {\n no l: Loan | l.book not in l.borrower.memberOf.catalog.books\n}\n\nassert LibrariansManageBooksOfTheirLibrary {\n all l: Librarian | all b: l.managedBooks | b.catalogedIn.library = l.worksAt\n}\n\n// Run commands\nrun ValidLoan for 4 // Satisfiable: Finding valid loans\nrun LibrarianManagesBooks for 4 // Unlikely to be satisfiable without proper setup\n\n\nrun {}", "permalink": "poise-unless-velcro-idly", "time": "2024-03-03 10:43:54.311557", "cmd": 2} {"id": 10988, "parent": 10987, "code": "one sig List { header: lone Node }\n\nsig Node { link: lone Node }\n\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3", "permalink": "rinse-pueblo-rut-mating", "time": "2024-02-20 08:23:17.847440", "cmd": 1} {"id": 10989, "parent": 10988, "code": "one sig List { header: lone Node }\n\nsig Node { link: lone Node }\n\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\n\nrun acyclic for ", "permalink": "celtic-timing-septum-blank", "time": "2024-02-20 08:23:43.996550", "cmd": 1} {"id": 10990, "parent": 10989, "code": "one sig List { header: lone Node }\n\nsig Node { link: lone Node }\n\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\n\nrun acyclic for 5", "permalink": "afar-caring-bling-tree", "time": "2024-02-20 08:23:55.081941", "cmd": 1} {"id": 10992, "parent": 10991, "code": "one sig List { header: lone Node }\n\nsig Node { link: lone Node }\n\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\n\nrun acyclic for 1", "permalink": "ascent-washed-cattle-rely", "time": "2024-02-20 08:24:06.872496", "cmd": 1} {"id": 10994, "parent": 10993, "code": "one sig List { header: lone Node }\n\nsig Node { link: lone Node }\n\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\n\nrun acyclicv for 3", "permalink": "absurd-cargo-empty-exes", "time": "2024-02-20 08:24:25.639404", "cmd": 1} {"id": 10995, "parent": 10994, "code": "one sig List { header: lone Node }\n\nsig Node { link: lone Node }\n\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3", "permalink": "resend-undone-blurb-single", "time": "2024-02-20 08:24:36.896250", "cmd": 1} {"id": 10998, "parent": 10997, "code": "one sig List { header: lone Node }\n\n--sig Node { link: lone Node }\n\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3", "permalink": "cupped-glance-awaken-print", "time": "2024-02-20 08:25:12.486795", "cmd": 1} {"id": 11001, "parent": null, "code": "one sig List { header: lone Node }\nsig Node { link: lone Node }\npred acyclic(){\nno List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "paper-onward-squid-motion", "time": "2024-02-21 07:16:35.544480", "cmd": 1} {"id": 11003, "parent": 11002, "code": "one sig List { header: lone Node }\nsig { link: lone Node }\npred acyclic(){\nno List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "relic-sleet-swore-july", "time": "2024-02-21 07:16:55.001583", "cmd": 1} {"id": 11005, "parent": 11004, "code": "one sig List { header: lone Node }\nsig Node { link: lone Node }\npred acyclic(){\nno List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "upheld-only-pep-lily", "time": "2024-02-21 07:17:20.955535", "cmd": 1} {"id": 11006, "parent": 11005, "code": "one sig List { header: lone Node }\nsig Node { link: lone Node }\npred acyclic(){\nno List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 0", "permalink": "backup-yahoo-myself-erased", "time": "2024-02-21 07:17:29.021341", "cmd": 1} {"id": 11015, "parent": 11014, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n// Example features\none sig Platoon, AddressingScheme, Channels, Movement extends Feature{}\n\n// Example intervals\none sig i1, i2, i3 extends Intervall{}\n\n// Example constraint nodes\none sig c0, c1, c2 extends ConstraintNode{}\n\n// Example FM\nfact {\n FM.root = Platoon\n FM.group = Channels + Movement\n\n // Linking features to their cardinality intervals\n Platoon.cardinality = i1\n Channels.cardinality = i2\n Movement.cardinality = i3\n\n // Linking constraint nodes to their features and cardinality intervals\n c0.feature = Platoon\n c0.cardinality = i1\n\n c1.feature = Channels\n c1.cardinality = i2\n\n c2.feature = Movement\n c2.cardinality = i3\n\n // Linking FM's require and exclude\n FM.require = c2 -> c0\n}\n\n// Example configuration\nfact {\n no FM.config\n}\n\npred show{}\nrun show for 1", "permalink": "willed-mop-gnat-carat", "time": "2024-02-22 15:01:33.123998", "cmd": 1} {"id": 11024, "parent": 11023, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\none sig Platoon, AddressingScheme extends Feature{}\none sig i1, i2, i3, i4, i5, i6 extends Intervall{}\nfact {\n //Platoon\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 4\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 4\ni3.upperBound = 4\nPlatoon.groupCardinality = i3\n\n//Addressing Scheme\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\n\n//Addressing Scheme Children: Regular, Compact\nRegular.parent = AddressingScheme\ni16.lowerBound = 0\ni16.upperBound = 1\nRegular.cardinality = i16\nCompact.parent = AddressingScheme\ni17.lowerBound = 0\ni17.upperBound = 1\nCompact.cardinality = i17\n\n//Channels\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\n\n//Channels Children: High Throughput, Reliable\nHighThroughput.parent = Channels\ni18.lowerBound = 1\ni18.upperBound = 8\nHighThroughput.cardinality = i18\nReliable.parent = Channels\ni19.lowerBound = 1\ni19.upperBound = 32\nReliable.cardinality = i19\n\n//Cardinality: Compact / High Throughput\nc0.feature = Compact\ni24.lowerBound = 1\ni24.upperBound = KleeneStar\nc0.cardinality = i24\nc5.feature = HighThroughput\ni25.lowerBound = 10\ni25.upperBound = 20\nc5.cardinality = i25\nc1.feature = HighThroughput\n\nFM.exclude = c0 -> c5\n\n\n\n}\npred show{}\nrun show for 3 but 3 Feature, 0 ConstraintNode, 1 Instance", "permalink": "pounce-croak-taste-conch", "time": "2024-02-22 16:12:52.261687", "cmd": 1} {"id": 11030, "parent": 11029, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Channels, Regular, Compact, HighThroughput, Reliable extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i16, i17, i18, i19, i24, i25 extends Intervall{}\none sig c0, c5 extends ConstraintNode{}\n\n\nfact {\n //Platoon\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 4\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 4\ni3.upperBound = 4\nPlatoon.groupCardinality = i3\n\n//Addressing Scheme\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\n\n//Addressing Scheme Children: Regular, Compact\nRegular.parent = AddressingScheme\ni16.lowerBound = 0\ni16.upperBound = 1\nRegular.cardinality = i16\nCompact.parent = AddressingScheme\ni17.lowerBound = 0\ni17.upperBound = 1\nCompact.cardinality = i17\n\n//Channels\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\n\n//Channels Children: High Throughput, Reliable\nHighThroughput.parent = Channels\ni18.lowerBound = 1\ni18.upperBound = 8\nHighThroughput.cardinality = i18\nReliable.parent = Channels\ni19.lowerBound = 1\ni19.upperBound = 32\nReliable.cardinality = i19\n\n//Cardinality: Compact / High Throughput\nc0.feature = Compact\ni24.lowerBound = 1\ni24.upperBound = KleeneStar\nc0.cardinality = i24\nc5.feature = HighThroughput\ni25.lowerBound = 10\ni25.upperBound = 20\nc5.cardinality = i25\n\nFM.exclude = c0 -> c5\n\n\n\n}\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "aching-deck-yippee-plaza", "time": "2024-02-22 16:27:37.415828", "cmd": 1} {"id": 11033, "parent": 11032, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Channels, Regular, Compact, HighThroughput, Reliable extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i16, i17, i18, i19, i24, i25 extends Intervall{}\none sig c0, c5 extends ConstraintNode{}\n\n\nfact {\n //Platoon\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 4\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 4\ni3.upperBound = 4\nPlatoon.groupCardinality = i3\n\n//Addressing Scheme\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\n\n//Addressing Scheme Children: Regular, Compact\nRegular.parent = AddressingScheme\ni16.lowerBound = 0\ni16.upperBound = 1\nRegular.cardinality = i16\nCompact.parent = AddressingScheme\ni17.lowerBound = 0\ni17.upperBound = 1\nCompact.cardinality = i17\n\n//Channels\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\n\n//Channels Children: High Throughput, Reliable\nHighThroughput.parent = Channels\ni18.lowerBound = 1\ni18.upperBound = 8\nHighThroughput.cardinality = i18\nReliable.parent = Channels\ni19.lowerBound = 1\ni19.upperBound = 32\nReliable.cardinality = i19\n\n//Cardinality: Compact / High Throughput\nc0.feature = Compact\ni24.lowerBound = 1\ni24.upperBound = KleeneStar\nc0.cardinality = i24\nc5.feature = HighThroughput\ni25.lowerBound = 10\ni25.upperBound = 20\nc5.cardinality = i25\n\nFM.exclude = c0 -> c5\n\n\n\n}\npred show{}\nrun show for 10, 0 Feature, 0 ConstraintNode", "permalink": "truce-liable-appear-sudoku", "time": "2024-02-22 16:31:31.396225", "cmd": 1} {"id": 11035, "parent": 11034, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Channels, Regular, Compact, HighThroughput, Reliable extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i16, i17, i18, i19, i24, i25 extends Intervall{}\none sig c0, c5 extends ConstraintNode{}\n\n\nfact {\n //Platoon\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 4\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 4\ni3.upperBound = 4\nPlatoon.groupCardinality = i3\n\n//Addressing Scheme\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\n\n//Addressing Scheme Children: Regular, Compact\nRegular.parent = AddressingScheme\ni16.lowerBound = 0\ni16.upperBound = 1\nRegular.cardinality = i16\nCompact.parent = AddressingScheme\ni17.lowerBound = 0\ni17.upperBound = 1\nCompact.cardinality = i17\n\n//Channels\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\n\n//Channels Children: High Throughput, Reliable\nHighThroughput.parent = Channels\ni18.lowerBound = 1\ni18.upperBound = 8\nHighThroughput.cardinality = i18\nReliable.parent = Channels\ni19.lowerBound = 1\ni19.upperBound = 32\nReliable.cardinality = i19\n\n//Cardinality: Compact / High Throughput\nc0.feature = Compact\ni24.lowerBound = 1\ni24.upperBound = KleeneStar\nc0.cardinality = i24\nc5.feature = HighThroughput\ni25.lowerBound = 10\ni25.upperBound = 20\nc5.cardinality = i25\n\nFM.exclude = c0 -> c5\n\n\n\n}\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "canal-ranged-gab-hull", "time": "2024-02-22 16:32:22.360032", "cmd": 1} {"id": 11037, "parent": 11036, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Channels, Regular, Compact, HighThroughput, Reliable extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i16, i17, i18, i19, i24, i25 extends Intervall{}\none sig c0, c5 extends ConstraintNode{}\n\n\nfact {\n //Platoon\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 4\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 4\ni3.upperBound = 4\nPlatoon.groupCardinality = i3\n\n//Addressing Scheme\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\n\n//Addressing Scheme Children: Regular, Compact\nRegular.parent = AddressingScheme\ni16.lowerBound = 0\ni16.upperBound = 1\nRegular.cardinality = i16\nCompact.parent = AddressingScheme\ni17.lowerBound = 0\ni17.upperBound = 1\nCompact.cardinality = i17\n\n//Channels\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\n\n//Channels Children: High Throughput, Reliable\nHighThroughput.parent = Channels\ni18.lowerBound = 1\ni18.upperBound = 8\nHighThroughput.cardinality = i18\nReliable.parent = Channels\ni19.lowerBound = 1\ni19.upperBound = 32\nReliable.cardinality = i19\n\n//Cardinality: Compact / High Throughput\nc0.feature = Compact\ni24.lowerBound = 1\ni24.upperBound = KleeneStar\nc0.cardinality = i24\nc5.feature = HighThroughput\ni25.lowerBound = 10\ni25.upperBound = 20\nc5.cardinality = i25\n\nFM.exclude = c0 -> c5\n\n\n\n}\npred show{}\nrun show for 3 but 15 int, 0 Feature, 0 ConstraintNode", "permalink": "wrench-cozily-oboe-retool", "time": "2024-02-22 16:47:58.774326", "cmd": 1} {"id": 11042, "parent": 11040, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Channels, Regular, Compact, HighThroughput, Reliable extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i16, i17, i18, i19, i24, i25 extends Intervall{}\none sig c0, c5 extends ConstraintNode{}\n\n\nfact {\n //Platoon\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 4\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 4\ni3.upperBound = 4\nPlatoon.groupCardinality = i3\n\n//Addressing Scheme\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\n\n//Addressing Scheme Children: Regular, Compact\nRegular.parent = AddressingScheme\ni16.lowerBound = 0\ni16.upperBound = 1\nRegular.cardinality = i16\nCompact.parent = AddressingScheme\ni17.lowerBound = 0\ni17.upperBound = 1\nCompact.cardinality = i17\n\n//Channels\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\n\n//Channels Children: High Throughput, Reliable\nHighThroughput.parent = Channels\ni18.lowerBound = 1\ni18.upperBound = 8\nHighThroughput.cardinality = i18\nReliable.parent = Channels\ni19.lowerBound = 1\ni19.upperBound = 32\nReliable.cardinality = i19\n\n//Cardinality: Compact / High Throughput\nc0.feature = Compact\ni24.lowerBound = 1\ni24.upperBound = KleeneStar\nc0.cardinality = i24\nc5.feature = HighThroughput\ni25.lowerBound = 10\ni25.upperBound = 20\nc5.cardinality = i25\n\nFM.exclude = c0 -> c5\n\n\n\n}\npred show{}\nrun show for 1 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "chafe-hulk-gone-lasso", "time": "2024-02-22 16:56:54.340194", "cmd": 1} {"id": 11149, "parent": 7297, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "cattle-subpar-emote-volley", "time": "2024-03-03 10:40:16.804688", "cmd": 1} {"id": 11151, "parent": 7058, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\nrun {}", "permalink": "turtle-corny-dice-wilder", "time": "2024-03-03 10:42:48.962594", "cmd": 1} {"id": 11164, "parent": 11163, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "runner-corny-thud-status", "time": "2024-03-04 13:14:20.542370", "cmd": 10} {"id": 11165, "parent": 11164, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "boxcar-chive-sip-shack", "time": "2024-03-04 13:14:26.563883", "cmd": 7} {"id": 10987, "parent": null, "code": "one sig List { header: lone Node }\nsig Node { link: lone Node }\npred acyclic(){\nno List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "statue-celtic-uptown-size", "time": "2024-02-20 08:23:06.711245", "cmd": 1} {"id": 10993, "parent": 10992, "code": "one sig List { header: lone Node }\n\nsig Node { link: lone Node }\n\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3", "permalink": "blazer-abacus-swan-veto", "time": "2024-02-20 08:24:16.364348", "cmd": 1} {"id": 11010, "parent": null, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\none sig Platoon, AddressingScheme, Channels, Movement, Node, Regular, Compact, HighThroughput, Reliable, SlowMoving, FastMoving, Follower, Leader extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25, i26, i27, i28, i29, i30, i31, i32, i33 extends Intervall{}\none sig c0, c1, c2, c3, c4, c5, c6, c7, c8, c9 extends ConstraintNode{}\nfact {\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 4\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 4\ni3.upperBound = KleeneStar\nPlatoon.groupCardinality = i3\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\nMovement.parent = Platoon\ni10.lowerBound = 1\ni10.upperBound = 1\nMovement.cardinality = i10\ni11.lowerBound = 1\ni11.upperBound = 1\nMovement.groupInstanceCardinality = i11\ni12.lowerBound = 1\ni12.upperBound = 1\nMovement.groupCardinality = i12\nNode.parent = Platoon\ni13.lowerBound = 1\ni13.upperBound = KleeneStar\nNode.cardinality = i13\ni14.lowerBound = 1\ni14.upperBound = 1\nNode.groupInstanceCardinality = i14\ni15.lowerBound = 1\ni15.upperBound = 2\nNode.groupCardinality = i15\nRegular.parent = AddressingScheme\ni16.lowerBound = 0\ni16.upperBound = 1\nRegular.cardinality = i16\nCompact.parent = AddressingScheme\ni17.lowerBound = 0\ni17.upperBound = 1\nCompact.cardinality = i17\nHighThroughput.parent = Channels\ni18.lowerBound = 1\ni18.upperBound = 8\nHighThroughput.cardinality = i18\nReliable.parent = Channels\ni19.lowerBound = 1\ni19.upperBound = 32\nReliable.cardinality = i19\nSlowMoving.parent = Movement\ni20.lowerBound = 0\ni20.upperBound = 1\nSlowMoving.cardinality = i20\nFastMoving.parent = Movement\ni21.lowerBound = 0\ni21.upperBound = 1\nFastMoving.cardinality = i21\nFollower.parent = Node\ni22.lowerBound = 0\ni22.upperBound = 1\nFollower.cardinality = i22\nLeader.parent = Node\ni23.lowerBound = 0\ni23.upperBound = 1\nLeader.cardinality = i23\nc0.feature = Compact\ni24.lowerBound = 1\ni24.upperBound = KleeneStar\nc0.cardinality = i24\nc5.feature = HighThroughput\ni25.lowerBound = 10\ni25.upperBound = 20\nc5.cardinality = i25\nc1.feature = HighThroughput\ni26.lowerBound = 1\ni26.upperBound = KleeneStar\nc1.cardinality = i26\nc6.feature = Reliable\ni27.lowerBound = 3\ni27.upperBound = KleeneStar\nc6.cardinality = i27\nc2.feature = FastMoving\ni28.lowerBound = 1\ni28.upperBound = 1\nc2.cardinality = i28\nc7.feature = Reliable\ni29.lowerBound = 2\ni29.upperBound = KleeneStar\nc7.cardinality = i29\nc3.feature = Follower\ni30.lowerBound = 3\ni30.upperBound = KleeneStar\nc3.cardinality = i30\nc8.feature = FastMoving\ni31.lowerBound = 1\ni31.upperBound = KleeneStar\nc8.cardinality = i31\nc4.feature = Platoon\ni32.lowerBound = 1\ni32.upperBound = 1\nc4.cardinality = i32\nc9.feature = Leader\ni33.lowerBound = 1\ni33.upperBound = 1\nc9.cardinality = i33\nFM.require = c2 -> c7 + c4 -> c9 \nFM.exclude = c0 -> c5 + c1 -> c6 + c3 -> c8 \n}\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "dingy-basket-sweat-region", "time": "2024-02-22 14:49:14.303921", "cmd": 1} {"id": 11013, "parent": 11012, "code": "open util/integer\n\n// Meta-model\none sig FM {\n root: one Feature,\n group: set Feature,\n require: ConstraintNode -> ConstraintNode,\n exclude: ConstraintNode -> ConstraintNode,\n config: set Instance\n}\n\nabstract sig Feature{\n groupCardinality: set Intervall,\n groupInstanceCardinality: set Intervall,\n cardinality: some Intervall,\n parent: lone Feature,\n instances: set Instance\n}\n\nsig Instance {\n feature: one Feature,\n instanceParent: lone Instance\n}\n\nsig Intervall {\n lowerBound: Int,\n upperBound: Int + KleeneStar\n}\n\nabstract sig ConstraintNode {\n feature: one Feature,\n cardinality: some Intervall\n}\n\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n f = FM.root\n}\n\n// Only one feature can be a root\nfact {\n all f: Feature | (IsRoot[f] <=> (f in FM.root.instances))\n}\n\n// Example features\none sig Feature1, Feature2, Feature3 extends Feature{}\n\n// Example intervals\none sig i1, i2 extends Intervall{}\n\n// Example constraint nodes\none sig c1, c2 extends ConstraintNode{}\n\n// Example FM\nfact {\n // FM.root must be one of the features\n FM.root in Feature1 + Feature2 + Feature3\n}\n\n// Linking features to their cardinality intervals\nfact {\n Feature1.cardinality = i1\n Feature2.cardinality = i1\n Feature3.cardinality = i2\n}\n\n// Linking constraint nodes to their features and cardinality intervals\nfact {\n c1.feature = Feature1\n c1.cardinality = i1\n\n c2.feature = Feature2\n c2.cardinality = i2\n}\n\n// Linking FM's require and exclude\nfact {\n FM.require = c1 -> c2\n}\n\n// Example configuration\nfact {\n no FM.config\n}\n\npred show{}\nrun show for 1 ", "permalink": "juror-pauper-repent-studio", "time": "2024-02-22 14:58:04.323115", "cmd": 1} {"id": 11014, "parent": null, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n// Example features\none sig Platoon, AddressingScheme, Channels, Movement extends Feature{}\n\n// Example intervals\none sig i1, i2, i3 extends Intervall{}\n\n// Example constraint nodes\none sig c0, c1, c2 extends ConstraintNode{}\n\n// Example FM\nfact {\n FM.root = Platoon\n FM.group = Channels + Movement\n\n // Linking features to their cardinality intervals\n Platoon.cardinality = i1\n Channels.cardinality = i2\n Movement.cardinality = i3\n\n // Linking constraint nodes to their features and cardinality intervals\n c0.feature = Platoon\n c0.cardinality = i1\n\n c1.feature = Channels\n c1.cardinality = i2\n\n c2.feature = Movement\n c2.cardinality = i3\n\n // Linking FM's require and exclude\n FM.require = c2 -> c0\n}\n\n// Example configuration\nfact {\n no FM.config\n}\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "barge-rebel-game-mural", "time": "2024-02-22 15:01:25.108185", "cmd": 1} {"id": 11017, "parent": 11016, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n// Example features\none sig Platoon, AddressingScheme, Channels, Movement extends Feature{}\n\n// Example intervals\none sig i1, i2, i3 extends Intervall{}\n\n// Example constraint nodes\none sig c0, c1, c2 extends ConstraintNode{}\n\n// Example FM\nfact {\n FM.root = Platoon\n FM.group = Channels + Movement\n\n // Linking features to their cardinality intervals\n Platoon.cardinality = i1\n Channels.cardinality = i2\n Movement.cardinality = i3\n\n // Linking constraint nodes to their features and cardinality intervals\n c0.feature = Platoon\n c0.cardinality = i1\n\n c1.feature = Channels\n c1.cardinality = i2\n\n c2.feature = Movement\n c2.cardinality = i3\n\n // Linking FM's require and exclude\n FM.require = c2 -> c0\n}\n\n// Example configuration\n\n\npred show{}\nrun show", "permalink": "gladly-sphere-fog-county", "time": "2024-02-22 15:01:43.967225", "cmd": 1} {"id": 11019, "parent": 11018, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\none sig Platoon, AddressingScheme, Channels, Movement extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25, i26, i27, i28, i29, i30, i31, i32, i33 extends Intervall{}\none sig c0, c1, c2, c3, c4, c5, c6, c7, c8, c9 extends ConstraintNode{}\nfact {\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 4\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 4\ni3.upperBound = KleeneStar\nPlatoon.groupCardinality = i3\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\nMovement.parent = Platoon\ni10.lowerBound = 1\ni10.upperBound = 1\nMovement.cardinality = i10\ni11.lowerBound = 1\ni11.upperBound = 1\nMovement.groupInstanceCardinality = i11\ni12.lowerBound = 1\ni12.upperBound = 1\nMovement.groupCardinality = i12\n\n}\npred show{}\nrun show ", "permalink": "defuse-blot-amid-rigor", "time": "2024-02-22 15:11:07.420475", "cmd": 1} {"id": 11020, "parent": 11019, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\none sig Platoon, AddressingScheme, Channels, Movement extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25, i26, i27, i28, i29, i30, i31, i32, i33 extends Intervall{}\none sig c0, c1, c2, c3, c4, c5, c6, c7, c8, c9 extends ConstraintNode{}\nfact {\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 4\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 4\ni3.upperBound = 4\nPlatoon.groupCardinality = i3\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = 1\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\n\n\n\n}\npred show{}\nrun show ", "permalink": "aspire-pushup-nuzzle-tissue", "time": "2024-02-22 15:16:34.969937", "cmd": 1} {"id": 11022, "parent": 11021, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\none sig Platoon, AddressingScheme, Channels extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8 extends Intervall{}\nfact {\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 4\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 4\ni3.upperBound = 4\nPlatoon.groupCardinality = i3\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = 1\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\n\n\n\n}\npred show{}\nrun show for 3 but 2 Feature, 0 ConstraintNode, 1 Instance", "permalink": "gloomy-rented-theme-tablet", "time": "2024-02-22 15:20:00.231443", "cmd": 1} {"id": 11025, "parent": null, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\none sig Platoon, AddressingScheme, Channels, Movement, Node, Regular, Compact, HighThroughput, Reliable, SlowMoving, FastMoving, Follower, Leader extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25, i26, i27, i28, i29, i30, i31, i32, i33 extends Intervall{}\none sig c0, c1, c2, c3, c4, c5, c6, c7, c8, c9 extends ConstraintNode{}\nfact {\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 4\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 4\ni3.upperBound = KleeneStar\nPlatoon.groupCardinality = i3\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\nMovement.parent = Platoon\ni10.lowerBound = 1\ni10.upperBound = 1\nMovement.cardinality = i10\ni11.lowerBound = 1\ni11.upperBound = 1\nMovement.groupInstanceCardinality = i11\ni12.lowerBound = 1\ni12.upperBound = 1\nMovement.groupCardinality = i12\nNode.parent = Platoon\ni13.lowerBound = 1\ni13.upperBound = KleeneStar\nNode.cardinality = i13\ni14.lowerBound = 1\ni14.upperBound = 1\nNode.groupInstanceCardinality = i14\ni15.lowerBound = 1\ni15.upperBound = 2\nNode.groupCardinality = i15\nRegular.parent = AddressingScheme\ni16.lowerBound = 0\ni16.upperBound = 1\nRegular.cardinality = i16\nCompact.parent = AddressingScheme\ni17.lowerBound = 0\ni17.upperBound = 1\nCompact.cardinality = i17\nHighThroughput.parent = Channels\ni18.lowerBound = 1\ni18.upperBound = 8\nHighThroughput.cardinality = i18\nReliable.parent = Channels\ni19.lowerBound = 1\ni19.upperBound = 32\nReliable.cardinality = i19\nSlowMoving.parent = Movement\ni20.lowerBound = 0\ni20.upperBound = 1\nSlowMoving.cardinality = i20\nFastMoving.parent = Movement\ni21.lowerBound = 0\ni21.upperBound = 1\nFastMoving.cardinality = i21\nFollower.parent = Node\ni22.lowerBound = 0\ni22.upperBound = 1\nFollower.cardinality = i22\nLeader.parent = Node\ni23.lowerBound = 0\ni23.upperBound = 1\nLeader.cardinality = i23\nc0.feature = Compact\ni24.lowerBound = 1\ni24.upperBound = KleeneStar\nc0.cardinality = i24\nc5.feature = HighThroughput\ni25.lowerBound = 10\ni25.upperBound = 20\nc5.cardinality = i25\nc1.feature = HighThroughput\ni26.lowerBound = 1\ni26.upperBound = KleeneStar\nc1.cardinality = i26\nc6.feature = Reliable\ni27.lowerBound = 3\ni27.upperBound = KleeneStar\nc6.cardinality = i27\nc2.feature = FastMoving\ni28.lowerBound = 1\ni28.upperBound = 1\nc2.cardinality = i28\nc7.feature = Reliable\ni29.lowerBound = 2\ni29.upperBound = KleeneStar\nc7.cardinality = i29\nc3.feature = Follower\ni30.lowerBound = 3\ni30.upperBound = KleeneStar\nc3.cardinality = i30\nc8.feature = FastMoving\ni31.lowerBound = 1\ni31.upperBound = KleeneStar\nc8.cardinality = i31\nc4.feature = Platoon\ni32.lowerBound = 1\ni32.upperBound = 1\nc4.cardinality = i32\nc9.feature = Leader\ni33.lowerBound = 1\ni33.upperBound = 1\nc9.cardinality = i33\nFM.require = c2 -> c7 + c4 -> c9 \nFM.exclude = c0 -> c5 + c1 -> c6 + c3 -> c8 \n}\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "aware-giddy-fedora-breath", "time": "2024-02-22 16:15:00.858486", "cmd": 1} {"id": 11028, "parent": 11027, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Channels, Regular, Compact, HighThroughput, Reliable extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i16, i17, i18, i19, i24, i25 extends Intervall{}\none sig c0, c5 extends ConstraintNode{}\n\n\nfact {\n //Platoon\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 4\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 4\ni3.upperBound = 4\nPlatoon.groupCardinality = i3\n\n//Addressing Scheme\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\n\n//Addressing Scheme Children: Regular, Compact\nRegular.parent = AddressingScheme\ni16.lowerBound = 0\ni16.upperBound = 1\nRegular.cardinality = i16\nCompact.parent = AddressingScheme\ni17.lowerBound = 0\ni17.upperBound = 1\nCompact.cardinality = i17\n\n//Channels\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\n\n//Channels Children: High Throughput, Reliable\nHighThroughput.parent = Channels\ni18.lowerBound = 1\ni18.upperBound = 8\nHighThroughput.cardinality = i18\nReliable.parent = Channels\ni19.lowerBound = 1\ni19.upperBound = 32\nReliable.cardinality = i19\n\n//Cardinality: Compact / High Throughput\nc0.feature = Compact\ni24.lowerBound = 1\ni24.upperBound = KleeneStar\nc0.cardinality = i24\nc5.feature = HighThroughput\ni25.lowerBound = 10\ni25.upperBound = 20\nc5.cardinality = i25\nc1.feature = HighThroughput\n\nFM.exclude = c0 -> c5\n\n\n\n}\npred show{}\nrun show for 3 but 3 Feature, 0 ConstraintNode, 1 Instance", "permalink": "dole-curtsy-drum-cocoa", "time": "2024-02-22 16:16:18.813405", "cmd": 1} {"id": 11038, "parent": 11037, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Channels, Regular, Compact, HighThroughput, Reliable extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i16, i17, i18, i19, i24, i25 extends Intervall{}\none sig c0, c5 extends ConstraintNode{}\n\n\nfact {\n //Platoon\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 4\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 4\ni3.upperBound = 4\nPlatoon.groupCardinality = i3\n\n//Addressing Scheme\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\n\n//Addressing Scheme Children: Regular, Compact\nRegular.parent = AddressingScheme\ni16.lowerBound = 0\ni16.upperBound = 1\nRegular.cardinality = i16\nCompact.parent = AddressingScheme\ni17.lowerBound = 0\ni17.upperBound = 1\nCompact.cardinality = i17\n\n//Channels\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\n\n//Channels Children: High Throughput, Reliable\nHighThroughput.parent = Channels\ni18.lowerBound = 1\ni18.upperBound = 8\nHighThroughput.cardinality = i18\nReliable.parent = Channels\ni19.lowerBound = 1\ni19.upperBound = 32\nReliable.cardinality = i19\n\n//Cardinality: Compact / High Throughput\nc0.feature = Compact\ni24.lowerBound = 1\ni24.upperBound = KleeneStar\nc0.cardinality = i24\nc5.feature = HighThroughput\ni25.lowerBound = 10\ni25.upperBound = 20\nc5.cardinality = i25\n\nFM.exclude = c0 -> c5\n\n\n\n}\npred show{}\nrun show for 1 but 10 int, 0 Feature, 0 ConstraintNode", "permalink": "drier-wing-marshy-last", "time": "2024-02-22 16:50:42.206158", "cmd": 1} {"id": 11045, "parent": 11044, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Channels, Regular, Compact, HighThroughput, Reliable extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i16, i17, i18, i19, i24, i25 extends Intervall{}\none sig c0, c5 extends ConstraintNode{}\n\n\nfact {\n //Platoon\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 2\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 2\ni3.upperBound = 2\nPlatoon.groupCardinality = i3\n\n//Addressing Scheme\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\n\n//Addressing Scheme Children: Regular, Compact\nRegular.parent = AddressingScheme\ni16.lowerBound = 0\ni16.upperBound = 1\nRegular.cardinality = i16\nCompact.parent = AddressingScheme\ni17.lowerBound = 0\ni17.upperBound = 1\nCompact.cardinality = i17\n\n//Channels\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\n\n//Channels Children: High Throughput, Reliable\nHighThroughput.parent = Channels\ni18.lowerBound = 1\ni18.upperBound = 8\nHighThroughput.cardinality = i18\nReliable.parent = Channels\ni19.lowerBound = 1\ni19.upperBound = 32\nReliable.cardinality = i19\n\n//Cardinality: Compact / High Throughput\nc0.feature = Compact\ni24.lowerBound = 1\ni24.upperBound = KleeneStar\nc0.cardinality = i24\nc5.feature = HighThroughput\ni25.lowerBound = 10\ni25.upperBound = 20\nc5.cardinality = i25\n\nFM.exclude = c0 -> c5\n\n\n\n}\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "willed-urgent-sneeze-spongy", "time": "2024-02-22 16:57:32.083162", "cmd": 1} {"id": 11154, "parent": 11153, "code": "code: /* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\nsig Book {\n authors: set Author,\n catalogedIn: one Catalog\n}\n\nsig Author {\n writtenBooks: set Book,\n affiliatedLibrary: one Library\n}\n\nsig Member {\n borrowedBooks: set Loan,\n memberOf: one Library\n}\n\nsig Librarian {\n managedBooks: set Book,\n worksAt: one Library\n}\n\nsig Loan {\n book: one Book,\n borrower: one Member\n}\n\nsig Catalog {\n books: set Book,\n library: one Library\n}\n\nsig Library {\n members: set Member,\n catalog: one Catalog\n}\n\n// Facts\nfact AllBooksInLibraryCatalog {\n all b: Book | b in b.catalogedIn.books\n}\n\nfact ConsistentLibraryMembership {\n all m: Member | m.memberOf = m.borrowedBooks.book.catalogedIn.library\n}\n\n// Predicates\npred ValidLoan(m: Member, b: Book) {\n b in m.memberOf.catalog.books and\n b not in m.borrowedBooks.book\n}\n\npred LibrarianManagesBooks(l: Librarian) {\n all b: l.managedBooks | b.catalogedIn.library = l.worksAt\n}\n\n// Assertions\nassert NoLoanForNonCatalogedBooks {\n no l: Loan | l.book not in l.borrower.memberOf.catalog.books\n}\n\nassert LibrariansManageBooksOfTheirLibrary {\n all l: Librarian | all b: l.managedBooks | b.catalogedIn.library = l.worksAt\n}\n\n// Run commands\nrun ValidLoan for 4 // Satisfiable: Finding valid loans\nrun LibrarianManagesBooks for 4 // Unlikely to be satisfiable without proper setup\n\n\nrun {}", "permalink": "snuff-rash-slept-crock", "time": "2024-03-03 10:44:10.115925", "cmd": 3} {"id": 10997, "parent": 10996, "code": "sig List { header: lone Node }\n\nsig Node { link: lone Node }\n\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3", "permalink": "drool-squirt-flaky-glue", "time": "2024-02-20 08:24:55.304129", "cmd": 1} {"id": 10999, "parent": 10998, "code": "one sig List { header: lone Node }\n\nsig Node { link: lone Node }\n\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3", "permalink": "limb-cornea-payer-jeep", "time": "2024-02-20 08:25:20.920644", "cmd": 1} {"id": 11002, "parent": 11001, "code": "one sig List { header: lone Node \nsig Node { link: lone Node }\npred acyclic(){\nno List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "mushy-shelve-posh-twitch", "time": "2024-02-21 07:16:41.377023", "cmd": 1} {"id": 11007, "parent": 11006, "code": "one sig List { header : lone Node }\nsig Node { link : lone Node }\npred Acyclic {\nno List.header or some n : List.header.*link | no n.link\n}\nassert links_equal_size { Acyclic => #List.header.^link = #link }\ncheck links_equal_size", "permalink": "pauper-parcel-march-opal", "time": "2024-02-21 07:19:39.095764", "cmd": 1} {"id": 11011, "parent": 11010, "code": "open util/integer\n\n// Meta-model\none sig FM {\n root: one Feature,\n group: set Feature,\n require: ConstraintNode -> ConstraintNode,\n exclude: ConstraintNode -> ConstraintNode,\n config: set Instance\n}\n\nabstract sig Feature{\n groupCardinality: set Intervall,\n groupInstanceCardinality: set Intervall,\n cardinality: some Intervall,\n parent: lone Feature,\n instances: set Instance\n}\n\nsig Instance {\n feature: one Feature,\n instanceParent: lone Instance\n}\n\nsig Intervall {\n lowerBound: Int,\n upperBound: Int + KleeneStar\n}\n\nabstract sig ConstraintNode {\n feature: one Feature,\n cardinality: some Intervall\n}\n\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n f = FM.root\n}\n\n// Only one feature can be a root\nfact {\n all f: Feature | (IsRoot[f] <=> (f in FM.root.instances))\n}\n\n// Example features\none sig Feature1, Feature2, Feature3 extends Feature{}\n\n// Example intervals\none sig i1, i2 extends Intervall{}\n\n// Example constraint nodes\none sig c1, c2 extends ConstraintNode{}\n\n// Example FM\nfact {\n // FM.root must be one of the features\n FM.root in Feature1 + Feature2 + Feature3\n}\n\n// Linking features to their cardinality intervals\nfact {\n Feature1.cardinality = i1\n Feature2.cardinality = i1\n Feature3.cardinality = i2\n}\n\n// Linking constraint nodes to their features and cardinality intervals\nfact {\n c1.feature = Feature1\n c1.cardinality = i1\n\n c2.feature = Feature2\n c2.cardinality = i2\n}\n\n// Linking FM's require and exclude\nfact {\n FM.require = c1 -> c2\n}\n\n// Example configuration\nfact {\n no FM.config\n}\n\nrun show for 1", "permalink": "cobalt-hefty-hasty-diaper", "time": "2024-02-22 14:57:10.299959", "cmd": 1} {"id": 11018, "parent": null, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\none sig Platoon, AddressingScheme, Channels, Movement extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25, i26, i27, i28, i29, i30, i31, i32, i33 extends Intervall{}\none sig c0, c1, c2, c3, c4, c5, c6, c7, c8, c9 extends ConstraintNode{}\nfact {\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 4\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 4\ni3.upperBound = KleeneStar\nPlatoon.groupCardinality = i3\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\nMovement.parent = Platoon\ni10.lowerBound = 1\ni10.upperBound = 1\nMovement.cardinality = i10\ni11.lowerBound = 1\ni11.upperBound = 1\nMovement.groupInstanceCardinality = i11\ni12.lowerBound = 1\ni12.upperBound = 1\nMovement.groupCardinality = i12\n\n}\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "pester-jockey-recopy-sudoku", "time": "2024-02-22 15:10:40.102116", "cmd": 1} {"id": 11026, "parent": 11024, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\none sig Platoon, AddressingScheme, Regular, Compact, HighThroughput, Reliable extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i16, i17, i18, i19, i24, i25 extends Intervall{}\nfact {\n //Platoon\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 4\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 4\ni3.upperBound = 4\nPlatoon.groupCardinality = i3\n\n//Addressing Scheme\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\n\n//Addressing Scheme Children: Regular, Compact\nRegular.parent = AddressingScheme\ni16.lowerBound = 0\ni16.upperBound = 1\nRegular.cardinality = i16\nCompact.parent = AddressingScheme\ni17.lowerBound = 0\ni17.upperBound = 1\nCompact.cardinality = i17\n\n//Channels\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\n\n//Channels Children: High Throughput, Reliable\nHighThroughput.parent = Channels\ni18.lowerBound = 1\ni18.upperBound = 8\nHighThroughput.cardinality = i18\nReliable.parent = Channels\ni19.lowerBound = 1\ni19.upperBound = 32\nReliable.cardinality = i19\n\n//Cardinality: Compact / High Throughput\nc0.feature = Compact\ni24.lowerBound = 1\ni24.upperBound = KleeneStar\nc0.cardinality = i24\nc5.feature = HighThroughput\ni25.lowerBound = 10\ni25.upperBound = 20\nc5.cardinality = i25\nc1.feature = HighThroughput\n\nFM.exclude = c0 -> c5\n\n\n\n}\npred show{}\nrun show for 3 but 3 Feature, 0 ConstraintNode, 1 Instance", "permalink": "radial-lair-jolly-paging", "time": "2024-02-22 16:15:04.130345", "cmd": 1} {"id": 11031, "parent": 11030, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Channels, Regular, Compact, HighThroughput, Reliable extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i16, i17, i18, i19, i24, i25 extends Intervall{}\none sig c0, c5 extends ConstraintNode{}\n\n\nfact {\n //Platoon\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 4\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 4\ni3.upperBound = 4\nPlatoon.groupCardinality = i3\n\n//Addressing Scheme\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\n\n//Addressing Scheme Children: Regular, Compact\nRegular.parent = AddressingScheme\ni16.lowerBound = 0\ni16.upperBound = 1\nRegular.cardinality = i16\nCompact.parent = AddressingScheme\ni17.lowerBound = 0\ni17.upperBound = 1\nCompact.cardinality = i17\n\n//Channels\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\n\n//Channels Children: High Throughput, Reliable\nHighThroughput.parent = Channels\ni18.lowerBound = 1\ni18.upperBound = 8\nHighThroughput.cardinality = i18\nReliable.parent = Channels\ni19.lowerBound = 1\ni19.upperBound = 32\nReliable.cardinality = i19\n\n//Cardinality: Compact / High Throughput\nc0.feature = Compact\ni24.lowerBound = 1\ni24.upperBound = KleeneStar\nc0.cardinality = i24\nc5.feature = HighThroughput\ni25.lowerBound = 10\ni25.upperBound = 20\nc5.cardinality = i25\n\nFM.exclude = c0 -> c5\n\n\n\n}\npred show{}\nrun show for 1 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "ruse-unglue-next-rectal", "time": "2024-02-22 16:28:15.095088", "cmd": 1} {"id": 11032, "parent": 11031, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Channels, Regular, Compact, HighThroughput, Reliable extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i16, i17, i18, i19, i24, i25 extends Intervall{}\none sig c0, c5 extends ConstraintNode{}\n\n\nfact {\n //Platoon\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 4\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 4\ni3.upperBound = 4\nPlatoon.groupCardinality = i3\n\n//Addressing Scheme\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\n\n//Addressing Scheme Children: Regular, Compact\nRegular.parent = AddressingScheme\ni16.lowerBound = 0\ni16.upperBound = 1\nRegular.cardinality = i16\nCompact.parent = AddressingScheme\ni17.lowerBound = 0\ni17.upperBound = 1\nCompact.cardinality = i17\n\n//Channels\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\n\n//Channels Children: High Throughput, Reliable\nHighThroughput.parent = Channels\ni18.lowerBound = 1\ni18.upperBound = 8\nHighThroughput.cardinality = i18\nReliable.parent = Channels\ni19.lowerBound = 1\ni19.upperBound = 32\nReliable.cardinality = i19\n\n//Cardinality: Compact / High Throughput\nc0.feature = Compact\ni24.lowerBound = 1\ni24.upperBound = KleeneStar\nc0.cardinality = i24\nc5.feature = HighThroughput\ni25.lowerBound = 10\ni25.upperBound = 20\nc5.cardinality = i25\n\nFM.exclude = c0 -> c5\n\n\n\n}\npred show{}\nrun show for 1, 0 Feature, 0 ConstraintNode", "permalink": "reach-dish-defeat-taps", "time": "2024-02-22 16:28:22.934811", "cmd": 1} {"id": 11036, "parent": 11035, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Channels, Regular, Compact, HighThroughput, Reliable extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i16, i17, i18, i19, i24, i25 extends Intervall{}\none sig c0, c5 extends ConstraintNode{}\n\n\nfact {\n //Platoon\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 4\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 4\ni3.upperBound = 4\nPlatoon.groupCardinality = i3\n\n//Addressing Scheme\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\n\n//Addressing Scheme Children: Regular, Compact\nRegular.parent = AddressingScheme\ni16.lowerBound = 0\ni16.upperBound = 1\nRegular.cardinality = i16\nCompact.parent = AddressingScheme\ni17.lowerBound = 0\ni17.upperBound = 1\nCompact.cardinality = i17\n\n//Channels\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\n\n//Channels Children: High Throughput, Reliable\nHighThroughput.parent = Channels\ni18.lowerBound = 1\ni18.upperBound = 8\nHighThroughput.cardinality = i18\nReliable.parent = Channels\ni19.lowerBound = 1\ni19.upperBound = 32\nReliable.cardinality = i19\n\n//Cardinality: Compact / High Throughput\nc0.feature = Compact\ni24.lowerBound = 1\ni24.upperBound = KleeneStar\nc0.cardinality = i24\nc5.feature = HighThroughput\ni25.lowerBound = 10\ni25.upperBound = 20\nc5.cardinality = i25\n\nFM.exclude = c0 -> c5\n\n\n\n}\npred show{}\nrun show for 10 but 15 int, 0 Feature, 0 ConstraintNode", "permalink": "ebony-steed-ducky-vegan", "time": "2024-02-22 16:40:50.790571", "cmd": 1} {"id": 11039, "parent": 11038, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Channels, Regular, Compact, HighThroughput, Reliable extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i16, i17, i18, i19, i24, i25 extends Intervall{}\none sig c0, c5 extends ConstraintNode{}\n\n\nfact {\n //Platoon\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 4\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 4\ni3.upperBound = 4\nPlatoon.groupCardinality = i3\n\n//Addressing Scheme\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\n\n//Addressing Scheme Children: Regular, Compact\nRegular.parent = AddressingScheme\ni16.lowerBound = 0\ni16.upperBound = 1\nRegular.cardinality = i16\nCompact.parent = AddressingScheme\ni17.lowerBound = 0\ni17.upperBound = 1\nCompact.cardinality = i17\n\n//Channels\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\n\n//Channels Children: High Throughput, Reliable\nHighThroughput.parent = Channels\ni18.lowerBound = 1\ni18.upperBound = 8\nHighThroughput.cardinality = i18\nReliable.parent = Channels\ni19.lowerBound = 1\ni19.upperBound = 32\nReliable.cardinality = i19\n\n//Cardinality: Compact / High Throughput\nc0.feature = Compact\ni24.lowerBound = 1\ni24.upperBound = KleeneStar\nc0.cardinality = i24\nc5.feature = HighThroughput\ni25.lowerBound = 10\ni25.upperBound = 20\nc5.cardinality = i25\n\nFM.exclude = c0 -> c5\n\n\n\n}\npred show{}\nrun show for 1 but 5 int, 0 Feature, 0 ConstraintNode", "permalink": "grower-strict-wool-harsh", "time": "2024-02-22 16:51:11.653534", "cmd": 1} {"id": 11041, "parent": 11040, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Channels, Regular, Compact, HighThroughput, Reliable extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i16, i17, i18, i19, i24, i25 extends Intervall{}\none sig c0, c5 extends ConstraintNode{}\n\n\nfact {\n //Platoon\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 4\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 4\ni3.upperBound = 4\nPlatoon.groupCardinality = i3\n\n//Addressing Scheme\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\n\n//Addressing Scheme Children: Regular, Compact\nRegular.parent = AddressingScheme\ni16.lowerBound = 0\ni16.upperBound = 1\nRegular.cardinality = i16\nCompact.parent = AddressingScheme\ni17.lowerBound = 0\ni17.upperBound = 1\nCompact.cardinality = i17\n\n//Channels\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\n\n//Channels Children: High Throughput, Reliable\nHighThroughput.parent = Channels\ni18.lowerBound = 1\ni18.upperBound = 8\nHighThroughput.cardinality = i18\nReliable.parent = Channels\ni19.lowerBound = 1\ni19.upperBound = 32\nReliable.cardinality = i19\n\n//Cardinality: Compact / High Throughput\nc0.feature = Compact\ni24.lowerBound = 1\ni24.upperBound = KleeneStar\nc0.cardinality = i24\nc5.feature = HighThroughput\ni25.lowerBound = 10\ni25.upperBound = 20\nc5.cardinality = i25\n\nFM.exclude = c0 -> c5\n\n\n\n}\npred show{}\nrun show for 3 but 15 int, 0 Feature, 0 ConstraintNode", "permalink": "slicer-guy-timid-flight", "time": "2024-02-22 16:56:49.988326", "cmd": 1} {"id": 11043, "parent": 11040, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Channels, Regular, Compact, HighThroughput, Reliable extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i16, i17, i18, i19, i24, i25 extends Intervall{}\none sig c0, c5 extends ConstraintNode{}\n\n\nfact {\n //Platoon\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 2\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 2\ni3.upperBound = 2\nPlatoon.groupCardinality = i3\n\n//Addressing Scheme\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\n\n//Addressing Scheme Children: Regular, Compact\nRegular.parent = AddressingScheme\ni16.lowerBound = 0\ni16.upperBound = 1\nRegular.cardinality = i16\nCompact.parent = AddressingScheme\ni17.lowerBound = 0\ni17.upperBound = 1\nCompact.cardinality = i17\n\n//Channels\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\n\n//Channels Children: High Throughput, Reliable\nHighThroughput.parent = Channels\ni18.lowerBound = 1\ni18.upperBound = 8\nHighThroughput.cardinality = i18\nReliable.parent = Channels\ni19.lowerBound = 1\ni19.upperBound = 32\nReliable.cardinality = i19\n\n//Cardinality: Compact / High Throughput\nc0.feature = Compact\ni24.lowerBound = 1\ni24.upperBound = KleeneStar\nc0.cardinality = i24\nc5.feature = HighThroughput\ni25.lowerBound = 10\ni25.upperBound = 20\nc5.cardinality = i25\n\nFM.exclude = c0 -> c5\n\n\n\n}\npred show{}\nrun show for 1 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "deduct-taste-gag-strike", "time": "2024-02-22 16:56:58.330630", "cmd": 1} {"id": 11044, "parent": 11043, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Channels, Regular, Compact, HighThroughput, Reliable extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i16, i17, i18, i19, i24, i25 extends Intervall{}\none sig c0, c5 extends ConstraintNode{}\n\n\nfact {\n //Platoon\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 2\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 2\ni3.upperBound = 2\nPlatoon.groupCardinality = i3\n\n//Addressing Scheme\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\n\n//Addressing Scheme Children: Regular, Compact\nRegular.parent = AddressingScheme\ni16.lowerBound = 0\ni16.upperBound = 1\nRegular.cardinality = i16\nCompact.parent = AddressingScheme\ni17.lowerBound = 0\ni17.upperBound = 1\nCompact.cardinality = i17\n\n//Channels\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\n\n//Channels Children: High Throughput, Reliable\nHighThroughput.parent = Channels\ni18.lowerBound = 1\ni18.upperBound = 8\nHighThroughput.cardinality = i18\nReliable.parent = Channels\ni19.lowerBound = 1\ni19.upperBound = 32\nReliable.cardinality = i19\n\n//Cardinality: Compact / High Throughput\nc0.feature = Compact\ni24.lowerBound = 1\ni24.upperBound = KleeneStar\nc0.cardinality = i24\nc5.feature = HighThroughput\ni25.lowerBound = 10\ni25.upperBound = 20\nc5.cardinality = i25\n\nFM.exclude = c0 -> c5\n\n\n\n}\npred show{}\nrun show for 1 but 3 int, 0 Feature, 0 ConstraintNode", "permalink": "expand-upwind-even-walrus", "time": "2024-02-22 16:57:10.765921", "cmd": 1} {"id": 11152, "parent": 11151, "code": "code: /* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\nsig Book {\n authors: set Author,\n catalogedIn: one Catalog\n}\n\nsig Author {\n writtenBooks: set Book,\n affiliatedLibrary: one Library\n}\n\nsig Member {\n borrowedBooks: set Loan,\n memberOf: one Library\n}\n\nsig Librarian {\n managedBooks: set Book,\n worksAt: one Library\n}\n\nsig Loan {\n book: one Book,\n borrower: one Member\n}\n\nsig Catalog {\n books: set Book,\n library: one Library\n}\n\nsig Library {\n members: set Member,\n catalog: one Catalog\n}\n\n// Facts\nfact AllBooksInLibraryCatalog {\n all b: Book | b in b.catalogedIn.books\n}\n\nfact ConsistentLibraryMembership {\n all m: Member | m.memberOf = m.borrowedBooks.book.catalogedIn.library\n}\n\n// Predicates\npred ValidLoan(m: Member, b: Book) {\n b in m.memberOf.catalog.books and\n b not in m.borrowedBooks.book\n}\n\npred LibrarianManagesBooks(l: Librarian) {\n all b: l.managedBooks | b.catalogedIn.library = l.worksAt\n}\n\n// Assertions\nassert NoLoanForNonCatalogedBooks {\n no l: Loan | l.book not in l.borrower.memberOf.catalog.books\n}\n\nassert LibrariansManageBooksOfTheirLibrary {\n all l: Librarian | all b: l.managedBooks | b.catalogedIn.library = l.worksAt\n}\n\n// Run commands\nrun ValidLoan for 4 // Satisfiable: Finding valid loans\nrun LibrarianManagesBooks for 4 // Unlikely to be satisfiable without proper setup\n\n\nrun {}", "permalink": "zips-perish-deepen-mascot", "time": "2024-03-03 10:43:45.119767", "cmd": 1} {"id": 11163, "parent": 7297, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "petal-ferry-patio-unglue", "time": "2024-03-04 13:13:18.708257", "cmd": 1} {"id": 11347, "parent": null, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Channels, Regular, Compact, HighThroughput, Reliable extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i16, i17, i18, i19, i24, i25 extends Intervall{}\none sig c0, c5 extends ConstraintNode{}\n\n\nfact {\n //Platoon\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 2\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 2\ni3.upperBound = 2\nPlatoon.groupCardinality = i3\n\n//Addressing Scheme\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\n\n//Addressing Scheme Children: Regular, Compact\nRegular.parent = AddressingScheme\ni16.lowerBound = 0\ni16.upperBound = 1\nRegular.cardinality = i16\nCompact.parent = AddressingScheme\ni17.lowerBound = 0\ni17.upperBound = 1\nCompact.cardinality = i17\n\n//Channels\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\n\n//Channels Children: High Throughput, Reliable\nHighThroughput.parent = Channels\ni18.lowerBound = 1\ni18.upperBound = 8\nHighThroughput.cardinality = i18\nReliable.parent = Channels\ni19.lowerBound = 1\ni19.upperBound = 32\nReliable.cardinality = i19\n\n//Cardinality: Compact / High Throughput\nc0.feature = Compact\ni24.lowerBound = 1\ni24.upperBound = KleeneStar\nc0.cardinality = i24\nc5.feature = HighThroughput\ni25.lowerBound = 10\ni25.upperBound = 20\nc5.cardinality = i25\n\nFM.exclude = c0 -> c5\n\n\n\n}\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "reverb-unkind-gulf-puma", "time": "2024-03-09 17:42:18.753061", "cmd": 1} {"id": 11872, "parent": 11871, "code": "module Dreadbury\n\nabstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\npred nativeEncoding() {\n some killed.Agatha\n killed in hates and no (killed & richer)\n no (Charles.hates & Agatha.hates)\n (Person - Butler) in Agatha.hates\n (Person - richer.Agatha) in Butler.hates\n Agatha.hates in Butler.hates\n all x : Person | Person != x.hates\n}\n\nrun nativeEncoding for 3", "permalink": "muck-roster-music-amigo", "time": "2024-03-15 14:31:51.206524", "cmd": 1} {"id": 11873, "parent": 6737, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {all a : Assignment | one a.associated_with}\n\n// Predicate PolicyAllowsGrading defines the policy for allowing grading of an Assignment by a Person.\npred PolicyAllowsGrading(p: Person, a: Assignment) {\n p in a.associated_with.assistant or p in a.associated_with.instructor\n}\n\n// Assert NoOneCanGradeTheirOwnAssignment checks that no Person can grade their own Assignment.\nassert NoOneCanGradeTheirOwnAssignment {\n all p : Person, a : Assignment |\n PolicyAllowsGrading[p, a] implies not p in a.assigned_to\n}\n\ncheck NoOneCanGradeTheirOwnAssignment for 2", "permalink": "wispy-step-joyous-lagged", "time": "2024-03-15 15:11:18.257858", "cmd": 1} {"id": 12022, "parent": null, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n * Use inheritance between signatures at least once.\n * Define at least 2 facts and 2 predicates.\n * Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n */\n\n// University Library Management System\n// Signatures: Person, Librarian, Student, Name, Book, Title, Membership\n\n// Person\nsig Person{\n name: one Name\n }\n \n// Name\nsig Name{}\n\n// Inheritance: Librarian extends Person\nsig Librarian extends Person{\n managedBooks: set Book\n }\n \n// Inheritance: Student extends Person\nsig Student extends Person{\n membership: lone Membership,\n borrowedBooks: set Book\n }\n \n// Book\nsig Book{\n title : one Title,\n available: one Bool\n }\n \n// Title\nsig Title{}\n// Membership\nsig Membership{}\n\n\n\n\n\nrun {}", "permalink": "sworn-senior-aqua-luster", "time": "2024-03-29 11:59:07.119088", "cmd": 1} {"id": 13267, "parent": 13266, "code": "open util/integer\n\n// Define a signature for Items with attributes id, name, price, and quantity\nsig Item {\n id: Int,\n name: one String,\n price: Int,\n quantity: Int\n}\n\n// Define a singleton signature for Basket to hold a set of items and the total price\none sig Basket {\n items: set Item,\n totalPrice: Int\n}\n\n// Predicate to initialize the basket\npred Init {\n //some items // Ensure there are some items in the basket\n //all i: items | i.quantity >= 0 // Quantities should be non-negative\n Basket.totalPrice = sum i: Basket.items | i.price // Total price is the sum of (quantity * price) of all items\n}\n\n// Run the model with some initial items\nrun {\n Init\n} for 10 but 5 Int, 5 String", "permalink": "blend-errand-grout-keg", "time": "2024-06-19 11:29:38.576744", "cmd": 1} {"id": 13269, "parent": 13268, "code": "open util/integer\n\n// Define a signature for Items with attributes id, name, price, and quantity\nsig Item {\n id: Int,\n name: one String,\n price: Int,\n quantity: Int\n}\n\n// Define a singleton signature for Basket to hold a set of items and the total price\none sig Basket {\n items: set Item, \n totalPrice: Int\n}\n\n// Predicate to initialize the basket\npred Init {\n //some items // Ensure there are some items in the basket\n //all i: items | i.quantity >= 0 // Quantities should be non-negative\n Basket.totalPrice = 1 // Total price is the sum of (quantity * price) of all items\n}\n\n// Run the model with some initial items\nrun {\n Init\n} for 10 but 5 Int, 5 String", "permalink": "ladle-ember-wages-bungee", "time": "2024-06-19 11:30:35.206209", "cmd": 1} {"id": 13270, "parent": 13269, "code": "open util/integer\n\n// Define a signature for Items with attributes id, name, price, and quantity\nsig Item {\n id: Int,\n name: one String,\n price: Int,\n quantity: Int\n}\n\n// Define a singleton signature for Basket to hold a set of items and the total price\none sig Basket {\n items: set Item, \n totalPrice: Int\n}\n\n// Predicate to initialize the basket\npred Init {\n //some items // Ensure there are some items in the basket\n //all i: items | i.quantity >= 0 // Quantities should be non-negative\n Basket.totalPrice = 1 // Total price is the sum of (quantity * price) of all items\n}\n\n// Run the model with some initial items\nrun {\n Init\n} for 10 but 5 Int", "permalink": "daisy-napkin-tiny-radar", "time": "2024-06-19 11:30:49.346892", "cmd": 1} {"id": 13272, "parent": 13271, "code": "open util/integer\n\n// Define a signature for Items with attributes id, name, price, and quantity\nsig Item {\n id: Int,\n name: one String,\n price: Int,\n quantity: Int\n}\n\n// Define a singleton signature for Basket to hold a set of items and the total price\none sig Basket {\n items: set Item, \n totalPrice: Int\n}\n\n// Predicate to initialize the basket\npred Init {\n //some items // Ensure there are some items in the basket\n //all i: items | i.quantity >= 0 // Quantities should be non-negative\n Basket.totalPrice = sum i: Basket.items | 1 // Total price is the sum of (quantity * price) of all items\n}\n\n// Run the model with some initial items\nrun {\n Init\n} for 10 but 5 Int", "permalink": "jester-gazing-napkin-banjo", "time": "2024-06-19 11:34:48.370511", "cmd": 1} {"id": 13286, "parent": 13285, "code": "open util/integer\n\n// Define a signature for Items with attributes id, name, price, and quantity\nsig Item {\n id: Int,\n name: one String,\n price: Int,\n quantity: Int\n}\n\n// Define a singleton signature for Basket to hold a set of items and the total price\nsig Basket {\n items: set Item, \n totalPrice: Int\n}\n\n// Predicate to initialize the basket\npred Init {\n //some items // Ensure there are some items in the basket\n //all i: items | i.quantity >= 0 // Quantities should be non-negative\n Basket.totalPrice = Basket.items.price.sum // Total price is the sum of (quantity * price) of all items\n}\n\n// Run the model with some initial items\nrun {\n Init\n} for 10", "permalink": "lanky-karma-roamer-rogue", "time": "2024-06-19 11:44:34.784976", "cmd": 1} {"id": 13302, "parent": null, "code": "sig Person {}\nsig Group {\n members: set Person\n}\n\nfact {\n all g: Group | #g.members > 0\n}\n\nrun {}", "permalink": "botch-throng-doable-turret", "time": "2024-06-20 08:56:58.914090", "cmd": 1} {"id": 13304, "parent": 13303, "code": "sig Student {}\n\nsig Course {\n members: set Student\n}\n\nrun {}", "permalink": "tulip-basis-volley-gutter", "time": "2024-06-20 08:59:04.274595", "cmd": 1} {"id": 13320, "parent": null, "code": "// Alloy model generated from Feature model\n\nsig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 0\n some AddressingScheme and some Channels and some Movement and some Member\n}\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n}", "permalink": "aids-nutmeg-ride-hybrid", "time": "2024-06-21 13:03:18.810924", "cmd": 1} {"id": 13327, "parent": 13326, "code": "// Alloy model generated from Feature model\n\nsig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 0\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 1\n # children & Compact <= 1\n # children >= 0\n some Regular and some Compact\n}\nsig Regular {}\n\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\nsig Movement {}\nsig AddressingScheme {}\nsig Regular {}\nsig Compact {}\nsig Member {}\nsig Channels {}\n\nrun {} for 10 but 5 Int", "permalink": "poet-fervor-lumber-tidy", "time": "2024-06-21 15:30:44.204064", "cmd": 1} {"id": 13271, "parent": 13270, "code": "open util/integer\n\n// Define a signature for Items with attributes id, name, price, and quantity\nsig Item {\n id: Int,\n name: one String,\n price: Int,\n quantity: Int\n}\n\n// Define a singleton signature for Basket to hold a set of items and the total price\none sig Basket {\n items: set Item, \n totalPrice: Int\n}\n\n// Predicate to initialize the basket\npred Init {\n //some items // Ensure there are some items in the basket\n //all i: items | i.quantity >= 0 // Quantities should be non-negative\n Basket.totalPrice = sum i: Basket.items | 1 // Total price is the sum of (quantity * price) of all items\n}\n\n// Run the model with some initial items\nrun {\n Init\n} for 10 but 5 Int", "permalink": "dodgy-sprang-from-mangy", "time": "2024-06-19 11:31:25.229725", "cmd": 1} {"id": 13274, "parent": 13273, "code": "open util/integer\n\n// Define a signature for Items with attributes id, name, price, and quantity\nsig Item {\n id: Int,\n name: one String,\n price: Int,\n quantity: Int\n}\n\n// Define a singleton signature for Basket to hold a set of items and the total price\none sig Basket {\n items: set Item, \n totalPrice: Int\n}\n\n// Predicate to initialize the basket\npred Init {\n //some items // Ensure there are some items in the basket\n //all i: items | i.quantity >= 0 // Quantities should be non-negative\n Basket.totalPrice = Basket.items.sum // Total price is the sum of (quantity * price) of all items\n}\n\n// Run the model with some initial items\nrun {\n Init\n} for 10 ", "permalink": "thaw-boxer-zebra-heave", "time": "2024-06-19 11:38:48.367401", "cmd": 1} {"id": 13280, "parent": 13279, "code": "open util/integer\n\n// Define a signature for Items with attributes id, name, price, and quantity\nsig Item {\n id: Int,\n name: one String,\n price: Int,\n quantity: Int\n}\n\n// Define a singleton signature for Basket to hold a set of items and the total price\none sig Basket {\n items: set Item, \n totalPrice: Int\n}\n\n// Predicate to initialize the basket\npred Init {\n //some items // Ensure there are some items in the basket\n //all i: items | i.quantity >= 0 // Quantities should be non-negative\n Basket.totalPrice = Basket.items.price.sum // Total price is the sum of (quantity * price) of all items\n}\n\n// Run the model with some initial items\nrun {\n Init\n} for 5 item", "permalink": "attire-decent-defame-keg", "time": "2024-06-19 11:42:25.453651", "cmd": 1} {"id": 13282, "parent": 13281, "code": "open util/integer\n\n// Define a signature for Items with attributes id, name, price, and quantity\nsig Item {\n id: Int,\n name: one String,\n price: Int,\n quantity: Int\n}\n\n// Define a singleton signature for Basket to hold a set of items and the total price\nsig Basket {\n items: set Item, \n totalPrice: Int\n}\n\n// Predicate to initialize the basket\npred Init {\n //some items // Ensure there are some items in the basket\n //all i: items | i.quantity >= 0 // Quantities should be non-negative\n Basket.totalPrice = Basket.items.price.sum // Total price is the sum of (quantity * price) of all items\n}\n\n// Run the model with some initial items\nrun {\n Init\n} for 10 but 5 item", "permalink": "much-botany-nutmeg-woozy", "time": "2024-06-19 11:43:16.326058", "cmd": 1} {"id": 13284, "parent": 13283, "code": "open util/integer\n\n// Define a signature for Items with attributes id, name, price, and quantity\nsig Item {\n id: Int,\n name: one String,\n price: Int,\n quantity: Int\n}\n\n// Define a singleton signature for Basket to hold a set of items and the total price\nsig Basket {\n items: set Item, \n totalPrice: Int\n}\n\n// Predicate to initialize the basket\npred Init {\n //some items // Ensure there are some items in the basket\n //all i: items | i.quantity >= 0 // Quantities should be non-negative\n Basket.totalPrice = Basket.items.price.sum // Total price is the sum of (quantity * price) of all items\n}\n\n// Run the model with some initial items\nrun {\n Init\n} for 10", "permalink": "barbed-each-ripple-wind", "time": "2024-06-19 11:44:07.382211", "cmd": 1} {"id": 13325, "parent": 13324, "code": "one sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\n\nsig AddressingScheme {\n children : set Regular + Compact\n} {\n -- feature instance multiplicity\n # children & Regular >= 0\n # children & Regular <= 1\n -- TODO why does swapping order alter result\n # children & Regular >= 0\n # children & Compact <= 1\n -- group instance multiplicity\n # children = 1\n}\n\nsig Channels {}\nsig Movement {}\nsig Member {}\nsig Regular {}\nsig Compact {}\n\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n}\n\nrun {} for 10 but 5 Int", "permalink": "barman-apache-tattoo-shaded", "time": "2024-06-21 15:16:05.272626", "cmd": 1} {"id": 13329, "parent": 13328, "code": "// Alloy model generated from Feature model\n\nsig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 0\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 1\n # children & Compact <= 1\n # children >= 0\n some Regular and some Compact\n}\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\nsig Movement {}\nsig AddressingScheme {}\nsig Regular {}\nsig Compact {}\nsig Member {}\nsig Channels {}\n\nrun {} for 10 but 5 Int", "permalink": "douche-brook-smoky-retold", "time": "2024-06-21 15:31:24.084574", "cmd": 1} {"id": 13337, "parent": 13336, "code": "// Alloy model generated from Feature model\n\nsig Platoon {\n children: set AddressingScheme + blah + Cow + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & blah >= 1\n # children & blah <= 1\n # children & Cow >= 1\n # children & Cow <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 0\n some AddressingScheme and some blah and some Cow and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 1\n # children & Compact <= 1\n # children >= 0\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig blah {\n children: set mo + momo\n} {\n # children & mo >= 0\n # children & mo <= 1\n # children & momo >= 0\n # children & momo <= 2\n # children >= 0\n some mo and some momo\n}\nsig mo {}\n\nsig momo {}\n\n\nsig Cow {\n children: set calf1 + claf2\n} {\n # children & calf1 >= 0\n # children & calf1 <= 1\n # children & claf2 >= 0\n # children & claf2 <= 2\n # children >= 0\n some calf1 and some claf2\n}\nsig calf1 {}\n\nsig claf2 {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + blah + Cow + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n blah.children = mo + momo\n Cow.children = calf1 + claf2\n}\n\nrun {} for 10 but 5 Int", "permalink": "clamor-alike-squid-santa", "time": "2024-06-21 16:12:36.512387", "cmd": 1} {"id": 13345, "parent": 13344, "code": "one sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children >= 1\n # children <= 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 2 Int", "permalink": "yo-yo-footer-wham-ounce", "time": "2024-06-21 17:33:47.137168", "cmd": 1} {"id": 13354, "parent": 13353, "code": "one sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme = 1\n # children & Channels = 1\n # children & Movement = 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\none sig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children = 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 4 Int", "permalink": "sway-spongy-musket-puma", "time": "2024-06-21 17:37:46.612716", "cmd": 1} {"id": 13364, "parent": 13363, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme = 1\n # children & Channels = 1\n # children & Movement = 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children = 1\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "dingy-pry-singer-wasabi", "time": "2024-06-21 17:47:09.764779", "cmd": 1} {"id": 13375, "parent": 13374, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme = 1\n # children & Channels = 1\n # children & Movement = 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children = 1\nsome Regular and some Compact\n\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 3 Int", "permalink": "decent-jackal-lily-cube", "time": "2024-06-21 17:52:57.309115", "cmd": 1} {"id": 13377, "parent": 13376, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme = 1\n # children & Channels = 1\n # children & Movement = 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children = 1\nsome Regular and some Compact\n\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 10 Int", "permalink": "spore-salute-civil-turf", "time": "2024-06-21 17:53:04.942782", "cmd": 1} {"id": 13385, "parent": 13384, "code": "// Alloy model generated from Feature model\n\nsig Platoon {\n children: set AddressingScheme + blah + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & blah >= 1\n # children & blah <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 0\n some AddressingScheme and some blah and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 1\n # children & Compact <= 1\n # children >= 0\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig blah {\n children: set mo + momo\n} {\n # children & mo >= 0\n # children & mo <= 1\n # children & momo >= 0\n # children & momo <= 2\n # children >= 0\n some mo and some momo\n}\nsig mo {}\n\nsig momo {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + blah + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n blah.children = mo + momo\n}\n\nrun {} for 10 but 5 Int", "permalink": "curry-tingle-poach-thong", "time": "2024-06-21 18:02:30.302386", "cmd": 1} {"id": 11871, "parent": null, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3", "permalink": "attain-define-walnut-recoil", "time": "2024-03-15 14:30:36.416184", "cmd": 1} {"id": 11995, "parent": null, "code": "one sig List{\n header: lone Node\n}\n\nsig Node{\n nextNode: lone Node\n}\n\nfact{\n no List.header or some n: List.header.*nextNode| no n.nextNode\n Node in List.header.*nextNode\n}\n\nrun{}", "permalink": "entree-squint-strum-image", "time": "2024-03-26 10:36:02.233556", "cmd": 1} {"id": 13331, "parent": 13330, "code": "// Alloy model generated from Feature model\n\nsig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 0\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 1\n # children & Compact <= 1\n # children >= 0\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\nsig Movement {}\nsig Regular {}\nsig Compact {}\nsig Member {}\nsig Channels {}\n\nrun {} for 10 but 5 Int", "permalink": "path-tile-frying-cramp", "time": "2024-06-21 15:45:59.185839", "cmd": 1} {"id": 13336, "parent": 13335, "code": "// Alloy model generated from Feature model\n\nsig Platoon {\n children: set AddressingScheme + blah + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & blah >= 1\n # children & blah <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 0\n some AddressingScheme and some blah and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 1\n # children & Compact <= 1\n # children >= 0\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig blah {\n children: set mo + momo\n} {\n # children & mo >= 0\n # children & mo <= 1\n # children & momo >= 0\n # children & momo <= 2\n # children >= 0\n some mo and some momo\n}\nsig mo {}\n\nsig momo {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + blah + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n blah.children = mo + momo\n}\n\nrun {} for 10 but 5 Int", "permalink": "resend-street-astute-taking", "time": "2024-06-21 15:49:35.060872", "cmd": 1} {"id": 13343, "parent": 13342, "code": "one sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children >= 1\n # children <= 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "breach-robe-stride-shrine", "time": "2024-06-21 17:33:28.208625", "cmd": 1} {"id": 13346, "parent": 13345, "code": "one sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children >= 1\n # children <= 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 12 Int", "permalink": "swirl-purity-headed-cola", "time": "2024-06-21 17:33:58.262340", "cmd": 1} {"id": 13347, "parent": 13345, "code": "one sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children >= 1\n # children <= 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 3 Int", "permalink": "oval-numbly-grinch-mango", "time": "2024-06-21 17:33:58.739576", "cmd": 1} {"id": 13350, "parent": 13349, "code": "one sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme = 1\n # children & Channels = 1\n # children & Movement = 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children = 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 3 Int", "permalink": "crave-reheat-pox-aghast", "time": "2024-06-21 17:36:26.568274", "cmd": 1} {"id": 13356, "parent": 13355, "code": "one sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme = 1\n # children & Channels = 1\n # children & Movement = 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children : set Regular + Compact\n} {\n -- feature instance multiplicity\n # children & Regular >= 0\n # children & Regular <= 1\n -- TODO why does swapping order alter result\n # children & Regular >= 0\n # children & Compact <= 1 \n -- group instance multiplicity\n # children = 1\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 3 Int", "permalink": "bulge-retake-fetch-groove", "time": "2024-06-21 17:38:15.262375", "cmd": 1} {"id": 13358, "parent": 13357, "code": "\none sig Platoon {\n children : set AddressingScheme + Channels + Movement + Member\n} {\n -- feature instance multiplicity\n 1 = # children & AddressingScheme\n 1 = # children & Channels\n 1 = # children & Movement\n # children & Member >= 1\n -- group instance multiplicity\n # children >= 4\n -- group type multiplicity (cannot easily count: enumerate subsets)\n some AddressingScheme and some Channels and some Movement and some Member\n -- example for <3, 4>\n -- (no AddressingScheme and some Channels and some Movement and some Member) or\n -- (some AddressingScheme and no Channels and some Movement and some Member) or\n -- (some AddressingScheme and some Channels and no Movement and some Member) or\n -- (some AddressingScheme and some Channels and some Movement and no Member) or\n -- (some AddressingScheme and some Channels and some Movement and some Member)\n}\n\nsig AddressingScheme {\n children : set Regular + Compact\n} {\n -- feature instance multiplicity\n # children & Regular >= 0\n # children & Regular <= 1\n -- TODO why does swapping order alter result\n # children & Regular >= 0\n # children & Compact <= 1 \n -- group instance multiplicity\n # children = 1\n}\n\nsig Channels {}\nsig Movement {}\nsig Member {}\nsig Regular {}\nsig Compact {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "prone-pulse-ipod-muzzle", "time": "2024-06-21 17:43:45.409405", "cmd": 1} {"id": 13367, "parent": 13366, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children >= 1\n # children <= 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 3 Int", "permalink": "anchor-specks-speech-smith", "time": "2024-06-21 17:49:22.373216", "cmd": 1} {"id": 13368, "parent": 13367, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children >= 1\n # children <= 1\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 3 Int", "permalink": "worst-ladle-resent-udder", "time": "2024-06-21 17:49:34.609635", "cmd": 1} {"id": 12032, "parent": 7297, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "feline-numbly-surfer-doing", "time": "2024-03-30 15:23:29.416137", "cmd": 1} {"id": 13359, "parent": 13358, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children = 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "caviar-exhale-evade-iphone", "time": "2024-06-21 17:45:27.056984", "cmd": 1} {"id": 13360, "parent": 13359, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children = 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 3 Int", "permalink": "fetal-calm-arise-pauper", "time": "2024-06-21 17:45:32.916270", "cmd": 1} {"id": 13361, "parent": 13360, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme = 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children = 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 3 Int", "permalink": "gap-laurel-raging-spool", "time": "2024-06-21 17:45:44.911317", "cmd": 1} {"id": 13363, "parent": 13362, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme = 1\n # children & Channels = 1\n # children & Movement = 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children = 1\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 3 Int", "permalink": "unroll-impure-sulk-next", "time": "2024-06-21 17:46:45.721784", "cmd": 1} {"id": 13365, "parent": 13364, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children >= 1\n # children <= 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "ice-refuse-flight-mayday", "time": "2024-06-21 17:49:12.300311", "cmd": 1} {"id": 13369, "parent": 13368, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children = 1\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 3 Int", "permalink": "clause-share-name-ruby", "time": "2024-06-21 17:49:51.388130", "cmd": 1} {"id": 13372, "parent": 13371, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme = 1\n # children & Channels = 1\n # children & Movement = 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children = 1\nsome Regular and some Compact\n\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "dating-action-polio-abacus", "time": "2024-06-21 17:52:41.904861", "cmd": 1} {"id": 13380, "parent": 13379, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children >= 1\n # children <= 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "frolic-await-cone-hardy", "time": "2024-06-21 17:56:04.832288", "cmd": 1} {"id": 13370, "parent": 13369, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme = 1\n # children & Channels = 1\n # children & Movement = 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children = 1\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 3 Int", "permalink": "could-prize-stunt-flail", "time": "2024-06-21 17:50:30.179380", "cmd": 1} {"id": 13376, "parent": 13375, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme = 1\n # children & Channels = 1\n # children & Movement = 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children = 1\nsome Regular and some Compact\n\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 4 Int", "permalink": "polo-growl-sprang-babble", "time": "2024-06-21 17:53:00.927474", "cmd": 1} {"id": 13379, "parent": 13378, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme = 1\n # children & Channels = 1\n # children & Movement = 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children = 1\n\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "musky-finite-septum-clash", "time": "2024-06-21 17:55:38.149395", "cmd": 1} {"id": 13382, "parent": 13381, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children >= 1\n # children <= 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "used-pastel-stung-wince", "time": "2024-06-21 18:00:19.917469", "cmd": 1} {"id": 13383, "parent": 13382, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children >= 1\n # children <= 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 3 Int", "permalink": "santa-giddy-rink-cost", "time": "2024-06-21 18:00:33.067464", "cmd": 1} {"id": 13386, "parent": 13385, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + blah + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & blah >= 1\n # children & blah <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 0\n some AddressingScheme and some blah and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 1\n # children & Compact <= 1\n # children >= 0\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig blah {\n children: set mo + momo\n} {\n # children & mo >= 0\n # children & mo <= 1\n # children & momo >= 0\n # children & momo <= 2\n # children >= 0\n some mo and some momo\n}\nsig mo {}\n\nsig momo {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + blah + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n blah.children = mo + momo\n}\n\nrun {} for 10 but 5 Int", "permalink": "mango-pout-manila-shifty", "time": "2024-06-21 18:05:18.112624", "cmd": 1} {"id": 13388, "parent": 13387, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + blah + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & blah >= 1\n # children & blah <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 0\n some AddressingScheme and some blah and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 1\n # children & Compact <= 1\n # children >= 0\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig blah {\n children: set mo + momo\n} {\n # children & mo >= 0\n # children & mo <= 1\n # children & momo >= 0\n # children & momo <= 2\n # children >= 0\n some mo and some momo\n}\nsig mo {}\n\nsig momo {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + blah + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n blah.children = mo + momo\n}\n\nrun {} for 10 but 5 Int", "permalink": "filth-mute-candle-corned", "time": "2024-06-21 18:07:30.315597", "cmd": 1} {"id": 13389, "parent": 13388, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + blah + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & blah >= 1\n # children & blah <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 0\n some AddressingScheme and some blah and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 1\n # children & Compact <= 1\n # children = 1\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig blah {\n children: set mo + momo\n} {\n # children & mo >= 0\n # children & mo <= 1\n # children & momo >= 0\n # children & momo <= 2\n # children >= 0\n some mo and some momo\n}\nsig mo {}\n\nsig momo {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + blah + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n blah.children = mo + momo\n}\n\nrun {} for 10 but 5 Int", "permalink": "kosher-boat-giblet-cattle", "time": "2024-06-21 18:07:52.041836", "cmd": 1} {"id": 13390, "parent": 13389, "code": "// Alloy model generated from Feature model\n\nsig Platoon {\n children: set AddressingScheme + blah + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & blah >= 1\n # children & blah <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 0\n some AddressingScheme and some blah and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 1\n # children & Compact <= 1\n # children >= 0\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig blah {\n children: set mo + momo\n} {\n # children & mo >= 0\n # children & mo <= 1\n # children & momo >= 0\n # children & momo <= 2\n # children >= 0\n some mo and some momo\n}\nsig mo {}\n\nsig momo {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + blah + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n blah.children = mo + momo\n}\n\nrun {} for 10 but 5 Int", "permalink": "snore-punch-broker-flame", "time": "2024-06-21 18:08:11.651417", "cmd": 1} {"id": 13391, "parent": 13390, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + blah + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & blah >= 1\n # children & blah <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 0\n some AddressingScheme and some blah and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 1\n # children & Compact <= 1\n # children >= 0\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig blah {\n children: set mo + momo\n} {\n # children & mo >= 0\n # children & mo <= 1\n # children & momo >= 0\n # children & momo <= 2\n # children >= 0\n some mo and some momo\n}\nsig mo {}\n\nsig momo {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + blah + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n blah.children = mo + momo\n}\n\nrun {} for 10 but 5 Int", "permalink": "false-obtain-amigo-fifty", "time": "2024-06-21 18:08:25.057337", "cmd": 1} {"id": 13392, "parent": 13391, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children >= 1\n # children <= 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "false-lying-retold-waking", "time": "2024-06-21 18:13:30.099954", "cmd": 1} {"id": 12031, "parent": 7069, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "common-eject-richly-flame", "time": "2024-03-30 15:22:58.945056", "cmd": 1} {"id": 12033, "parent": 12032, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File \n{\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "pawing-aloe-raking-old", "time": "2024-03-30 15:23:33.264146", "cmd": 1} {"id": 12088, "parent": null, "code": "sig A{}\nrun {} ", "permalink": "grove-tamper-tattoo-manual", "time": "2024-04-02 08:57:08.642139", "cmd": 1} {"id": 12089, "parent": 12088, "code": "sig A {\n f: set Int\n} { \n one f\n}\n\nsig B extends A {} {some f}\n\nrun {} for 3", "permalink": "dreamt-radial-carol-yard", "time": "2024-04-02 08:57:46.040020", "cmd": 1} {"id": 12090, "parent": 12089, "code": "// Queens are placed on boards.\nsome sig Queen { }\nlet positions = { i: Int, j: Int | 0 <= i && i <= 7 && 0 <= j && j <= 7 }\none sig Board { queens: positions one -> lone Queen }\nfun absDifference(m: Int, n: Int): Int {\n let difference = minus[m, n] {\n difference > 0 => difference else minus[0, difference]\n }\n}\n// Attack relationship in terms of coordinates.\npred attacks(q1: (Int -> Int), q2: (Int -> Int)) {\n let q1row = q1.univ, q1col = univ.q1,\n q2row = q2.univ, q2col = univ.q2,\n rowDifference = absDifference[q1row, q2row],\n colDifference = absDifference[q1col, q2col] {\n // Same row attacks\n rowDifference = 0 ||\n // Same column attacks\n colDifference = 0 ||\n // Diagonal attacks\n rowDifference = colDifference\n }\n}\n// Make sure no two queens attack each other.\nfact notAttacking {\n all q1, q2: Queen | q1 != q2 => !attacks[Board.queens.q1, Board.queens.q2]\n}\n// Make sure every queen is assigned a position on the board. I think this is\n// redundant and follows from Board signature\n// assert assignedPosition { all q: Queen | one Board.queens.q }\n// Run\nrun { } for 1 Board, exactly 8 Queen", "permalink": "aloof-pupil-punk-refund", "time": "2024-04-02 09:00:08.973464", "cmd": 1} {"id": 12119, "parent": null, "code": "sig A{}\nrun {} ", "permalink": "stole-grope-unbend-broken", "time": "2024-04-03 13:20:27.418958", "cmd": 1} {"id": 12120, "parent": null, "code": "sig A{}\nrun {} ", "permalink": "mute-blast-drier-whiny", "time": "2024-04-04 08:26:38.397486", "cmd": 1} {"id": 12123, "parent": null, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3", "permalink": "pledge-accent-avid-army", "time": "2024-04-04 15:46:56.014141", "cmd": 1} {"id": 12124, "parent": 12123, "code": "module Dreadbury\n\nabstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\n\none sig Agatha, Butler, Charles extends Person {}\n\npred nativeEncoding() {\n some killed.Agatha\n killed in hates and no (killed & richer)\n no (Charles.hates & Agatha.hates)\n (Person - Butler) in Agatha.hates\n (Person - richer.Agatha) in Butler.hates\n Agatha.hates in Butler.hates\n all x : Person | Person != x.hates\n}\n\nrun nativeEncoding for 3", "permalink": "neatly-chevy-rice-flight", "time": "2024-04-04 15:47:07.320786", "cmd": 1} {"id": 12445, "parent": 12444, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich ueberschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Channels, Regular, Compact, HighThroughput, Reliable extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i16, i17, i18, i19, i24, i25 extends Intervall{}\none sig c0, c5 extends ConstraintNode{}\n\n\nfact {\n //Platoon\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 2\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 2\ni3.upperBound = 2\nPlatoon.groupCardinality = i3\n\n//Addressing Scheme\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\n\n//Addressing Scheme Children: Regular, Compact\nRegular.parent = AddressingScheme\ni16.lowerBound = 0\ni16.upperBound = 1\nRegular.cardinality = i16\nCompact.parent = AddressingScheme\ni17.lowerBound = 0\ni17.upperBound = 1\nCompact.cardinality = i17\n\n//Channels\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\n\n//Channels Children: High Throughput, Reliable\nHighThroughput.parent = Channels\ni18.lowerBound = 1\ni18.upperBound = 8\nHighThroughput.cardinality = i18\nReliable.parent = Channels\ni19.lowerBound = 1\ni19.upperBound = 32\nReliable.cardinality = i19\n\n//Cardinality: Compact / High Throughput\nc0.feature = Compact\ni24.lowerBound = 1\ni24.upperBound = KleeneStar\nc0.cardinality = i24\nc5.feature = HighThroughput\ni25.lowerBound = 10\ni25.upperBound = 20\nc5.cardinality = i25\n\nFM.exclude = c0 -> c5\n\n\n\n}\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "tanned-trance-bunt-unclip", "time": "2024-04-12 08:36:34.889521", "cmd": 1} {"id": 12483, "parent": 7297, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "plant-goofy-blame-violin", "time": "2024-04-24 05:38:06.005251", "cmd": 1} {"id": 12444, "parent": null, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Channels, Regular, Compact, HighThroughput, Reliable extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i16, i17, i18, i19, i24, i25 extends Intervall{}\none sig c0, c5 extends ConstraintNode{}\n\n\nfact {\n //Platoon\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 2\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 2\ni3.upperBound = 2\nPlatoon.groupCardinality = i3\n\n//Addressing Scheme\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\n\n//Addressing Scheme Children: Regular, Compact\nRegular.parent = AddressingScheme\ni16.lowerBound = 0\ni16.upperBound = 1\nRegular.cardinality = i16\nCompact.parent = AddressingScheme\ni17.lowerBound = 0\ni17.upperBound = 1\nCompact.cardinality = i17\n\n//Channels\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\n\n//Channels Children: High Throughput, Reliable\nHighThroughput.parent = Channels\ni18.lowerBound = 1\ni18.upperBound = 8\nHighThroughput.cardinality = i18\nReliable.parent = Channels\ni19.lowerBound = 1\ni19.upperBound = 32\nReliable.cardinality = i19\n\n//Cardinality: Compact / High Throughput\nc0.feature = Compact\ni24.lowerBound = 1\ni24.upperBound = KleeneStar\nc0.cardinality = i24\nc5.feature = HighThroughput\ni25.lowerBound = 10\ni25.upperBound = 20\nc5.cardinality = i25\n\nFM.exclude = c0 -> c5\n\n\n\n}\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "unplug-proved-grip-thorn", "time": "2024-04-12 08:34:38.608958", "cmd": 1} {"id": 12446, "parent": 12445, "code": "one sig Platoon {\n children : set AddressingScheme + Channels + Movement + Member\n} {\n -- feature instance multiplicity\n 1 = # children & AddressingScheme\n 1 = # children & Channels\n 1 = # children & Movement\n # children & Member >= 1\n -- group instance multiplicity\n # children >= 4\n -- group type multiplicity (cannot easily count: enumerate subsets)\n some AddressingScheme and some Channels and some Movement and some Member\n -- example for <3, 4>\n -- (no AddressingScheme and some Channels and some Movement and some Member) or\n -- (some AddressingScheme and no Channels and some Movement and some Member) or\n -- (some AddressingScheme and some Channels and no Movement and some Member) or\n -- (some AddressingScheme and some Channels and some Movement and no Member)\n}\n\nsig AddressingScheme {\n children : set Regular + Compact\n} {\n -- feature instance multiplicity\n # children & Regular >= 0\n # children & Regular <= 1\n 1 >= # children & Compact\n -- group instance multiplicity\n # children = 1\n}\n\nsig Channels {}\nsig Movement {}\nsig Member {}\nsig Regular {}\nsig Compact {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "duress-prayer-sample-rack", "time": "2024-04-12 08:39:23.002583", "cmd": 1} {"id": 12447, "parent": null, "code": "one sig Platoon {\n children : set AddressingScheme + Channels + Movement + Member\n} {\n -- feature instance multiplicity\n 1 = # children & AddressingScheme\n 1 = # children & Channels\n 1 = # children & Movement\n # children & Member >= 1\n -- group instance multiplicity\n # children >= 4\n -- group type multiplicity (cannot easily count: enumerate subsets)\n some AddressingScheme and some Channels and some Movement and some Member\n -- example for <3, 4>\n -- (no AddressingScheme and some Channels and some Movement and some Member) or\n -- (some AddressingScheme and no Channels and some Movement and some Member) or\n -- (some AddressingScheme and some Channels and no Movement and some Member) or\n -- (some AddressingScheme and some Channels and some Movement and no Member)\n}\n\nsig AddressingScheme {\n children : set Regular + Compact\n} {\n -- feature instance multiplicity\n # children & Regular >= 0\n # children & Regular <= 1\n 1 >= # children & Compact\n -- group instance multiplicity\n # children = 1\n}\n\nsig Channels {}\nsig Movement {}\nsig Member {}\nsig Regular {}\nsig Compact {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "charm-malt-glade-undead", "time": "2024-04-12 08:43:09.929487", "cmd": 1} {"id": 12449, "parent": 12448, "code": "one sig Platoon {\n children : set AddressingScheme + Channels + Movement + Member\n} {\n -- feature instance multiplicity\n 1 = # children & AddressingScheme\n 1 = # children & Channels\n 1 = # children & Movement\n # children & Member >= 1\n -- group instance multiplicity\n # children >= 4\n -- group type multiplicity (cannot easily count: enumerate subsets)\n some AddressingScheme and some Channels and some Movement and some Member\n -- example for <3, 4>\n -- (no AddressingScheme and some Channels and some Movement and some Member) or\n -- (some AddressingScheme and no Channels and some Movement and some Member) or\n -- (some AddressingScheme and some Channels and no Movement and some Member) or\n -- (some AddressingScheme and some Channels and some Movement and no Member)\n}\n\nsig AddressingScheme {\n children : set Regular + Compact\n} {\n -- feature instance multiplicity\n # children & Regular >= 0\n # children & Regular <= 1\n 1 >= # children & Compact\n -- group instance multiplicity\n # children = 1\n}\n\nsig Channels {}\nsig Movement {}\nsig Member {}\nsig Regular {}\nsig Compact {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "dealer-spoils-hybrid-basin", "time": "2024-04-12 08:43:47.979771", "cmd": 1} {"id": 12518, "parent": 12517, "code": "\none sig Platoon {\n children : set AddressingScheme + Channels + Movement + Member\n} {\n -- feature instance multiplicity\n 1 = # children & AddressingScheme\n 1 = # children & Channels\n 1 = # children & Movement\n # children & Member >= 1\n -- group instance multiplicity\n # children >= 4\n -- group type multiplicity (cannot easily count: enumerate subsets)\n some AddressingScheme and some Channels and some Movement and some Member\n -- example for <3, 4>\n -- (no AddressingScheme and some Channels and some Movement and some Member) or\n -- (some AddressingScheme and no Channels and some Movement and some Member) or\n -- (some AddressingScheme and some Channels and no Movement and some Member) or\n -- (some AddressingScheme and some Channels and some Movement and no Member)\n}\n\nsig AddressingScheme {\n children : set Regular + Compact\n} {\n -- feature instance multiplicity\n # children & Regular >= 0\n # children & Regular <= 1\n 1 >= # children & Compact\n -- group instance multiplicity\n # children = 2\n}\n\nsig Channels {}\nsig Movement {}\nsig Member {}\nsig Regular {}\nsig Compact {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "blurb-broom-smell-paltry", "time": "2024-05-07 15:01:40.939595", "cmd": 1} {"id": 12520, "parent": 12519, "code": "\none sig Platoon {\n children : set AddressingScheme + Channels + Movement + Member\n} {\n -- feature instance multiplicity\n 1 = # children & AddressingScheme\n 1 = # children & Channels\n 1 = # children & Movement\n # children & Member >= 1\n -- group instance multiplicity\n # children >= 4\n -- group type multiplicity (cannot easily count: enumerate subsets)\n some AddressingScheme and some Channels and some Movement and some Member\n -- example for <3, 4>\n -- (no AddressingScheme and some Channels and some Movement and some Member) or\n -- (some AddressingScheme and no Channels and some Movement and some Member) or\n -- (some AddressingScheme and some Channels and no Movement and some Member) or\n -- (some AddressingScheme and some Channels and some Movement and no Member)\n}\n\nsig AddressingScheme {\n children : set Regular + Compact\n} {\n -- feature instance multiplicity\n # children & Regular >= 0\n # children & Regular <= 1\n 1 >= # children & Compact\n -- group instance multiplicity\n # children = 2\n}\n\nsig Channels {}\nsig Movement {}\nsig Member {}\nsig Regular {}\nsig Compact {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "chevy-skype-jinx-gush", "time": "2024-05-07 15:02:50.220423", "cmd": 1} {"id": 12521, "parent": 12520, "code": "\none sig Platoon {\n children : set AddressingScheme + Channels + Movement + Member\n} {\n -- feature instance multiplicity\n 1 = # children & AddressingScheme\n 1 = # children & Channels\n 1 = # children & Movement\n # children & Member >= 1\n -- group instance multiplicity\n # children >= 4\n -- group type multiplicity (cannot easily count: enumerate subsets)\n some AddressingScheme and some Channels and some Movement and some Member\n -- example for <3, 4>\n -- (no AddressingScheme and some Channels and some Movement and some Member) or\n -- (some AddressingScheme and no Channels and some Movement and some Member) or\n -- (some AddressingScheme and some Channels and no Movement and some Member) or\n -- (some AddressingScheme and some Channels and some Movement and no Member)\n}\n\nsig AddressingScheme {\n children : set Regular + Compact\n} {\n -- feature instance multiplicity\n # children & Regular >= 0\n # children & Regular <= 1\n 1 >= # children & Compact\n -- group instance multiplicity\n # children = 1\n}\n\nsig Channels {}\nsig Movement {}\nsig Member {}\nsig Regular {}\nsig Compact {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "dude-ranked-clash-return", "time": "2024-05-07 15:03:54.446112", "cmd": 1} {"id": 12523, "parent": 12522, "code": "\none sig Platoon {\n children : set AddressingScheme + Channels + Movement + Member\n} {\n -- feature instance multiplicity\n# children & AddressingScheme = 1 \n 1 = # children & Channels\n 1 = # children & Movement\n # children & Member >= 1\n -- group instance multiplicity\n # children >= 4\n -- group type multiplicity (cannot easily count: enumerate subsets)\n some AddressingScheme and some Channels and some Movement and some Member\n -- example for <3, 4>\n -- (no AddressingScheme and some Channels and some Movement and some Member) or\n -- (some AddressingScheme and no Channels and some Movement and some Member) or\n -- (some AddressingScheme and some Channels and no Movement and some Member) or\n -- (some AddressingScheme and some Channels and some Movement and no Member)\n}\n\nsig AddressingScheme {\n children : set Regular + Compact\n} {\n -- feature instance multiplicity\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 1 \n -- group instance multiplicity\n # children = 1\n}\n\nsig Channels {}\nsig Movement {}\nsig Member {}\nsig Regular {}\nsig Compact {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "campus-bovine-lemon-active", "time": "2024-05-07 15:06:38.706288", "cmd": 1} {"id": 12526, "parent": 12525, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich ueberschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon extends Feature{}\none sig i1, i2, i3 extends Intervall{}\n// one sig c0, c5 extends ConstraintNode{}\n\n/**\n Setting variables\n*/\n\nfact {\n // Platoon\n i1.lowerBound = 1\n i1.upperBound = 1\n Platoon.cardinality = i1\n i2.lowerBound = 4\n i2.upperBound = KleeneStar\n Platoon.groupInstanceCardinality = i2\n i3.lowerBound = 4\n i3.upperBound = 4\n Platoon.groupCardinality = i3\n\n \n}\n\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "polo-vacate-bacon-valley", "time": "2024-05-07 15:39:55.855832", "cmd": 1} {"id": 12528, "parent": 12527, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich ueberschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme extends Feature{}\none sig i1, i2, i3, i4, i5, i6 extends Intervall{}\n// one sig c0, c5 extends ConstraintNode{}\n\n/**\n Setting variables\n*/\n\nfact {\n // Platoon\n i1.lowerBound = 1\n i1.upperBound = 1\n Platoon.cardinality = i1\n i2.lowerBound = 4\n i2.upperBound = KleeneStar\n Platoon.groupInstanceCardinality = i2\n i3.lowerBound = 4\n i3.upperBound = 4\n Platoon.groupCardinality = i3\n\n //Adressing Scheme\n AddressingScheme.parent = Platoon\n i4.lowerBound = 1\n i4.upperBound = 1\n AddressingScheme.cardinality = i4\n i5.lowerBound = 1\n i5.upperBound = 1\n AddressingScheme.groupInstanceCardinality = i5\n i6.lowerBound = 1\n i6.upperBound = 1\n AddressingScheme.groupCardinality = i6\n\n \n}\n\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "garnet-bamboo-manly-plod", "time": "2024-05-07 15:44:28.788214", "cmd": 1} {"id": 12530, "parent": 12529, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich ueberschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme extends Feature{}\none sig i1, i2, i3, i4, i5, i6 extends Intervall{}\n// one sig c0, c5 extends ConstraintNode{}\n\n/**\n Setting variables\n*/\n\nfact {\n // Platoon\n i1.lowerBound = 1\n i1.upperBound = 1\n Platoon.cardinality = i1\n i2.lowerBound = 4\n i2.upperBound = KleeneStar\n Platoon.groupInstanceCardinality = i2\n i3.lowerBound = 4\n i3.upperBound = 4\n Platoon.groupCardinality = i3\n\n //Adressing Scheme\n AddressingScheme.parent = Platoon\n i4.lowerBound = 1\n i4.upperBound = 1\n AddressingScheme.cardinality = i4\n i5.lowerBound = 1\n i5.upperBound = 1\n AddressingScheme.groupInstanceCardinality = i5\n i6.lowerBound = 1\n i6.upperBound = 1\n AddressingScheme.groupCardinality = i6\n\n \n}\n\npred show{}\nrun show for 10 but 8 int, 0 Feature, 0 ConstraintNode", "permalink": "why-coming-resent-cake", "time": "2024-05-07 15:44:51.070736", "cmd": 1} {"id": 12532, "parent": 12531, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich ueberschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme extends Feature{}\none sig i1, i2, i3, i4, i5, i6 extends Intervall{}\n// one sig c0, c5 extends ConstraintNode{}\n\n/**\n Setting variables\n*/\n\nfact {\n // Platoon\n i1.lowerBound = 1\n i1.upperBound = 1\n Platoon.cardinality = i1\n i2.lowerBound = 4\n i2.upperBound = KleeneStar\n Platoon.groupInstanceCardinality = i2\n i3.lowerBound = 4\n i3.upperBound = 4\n Platoon.groupCardinality = i3\n\n //Adressing Scheme\n AddressingScheme.parent = Platoon\n i4.lowerBound = 1\n i4.upperBound = 1\n AddressingScheme.cardinality = i4\n i5.lowerBound = 1\n i5.upperBound = 1\n AddressingScheme.groupInstanceCardinality = i5\n i6.lowerBound = 1\n i6.upperBound = 1\n AddressingScheme.groupCardinality = i6\n\n \n}\n\npred show{}\nrun show for 10 but 5 Int", "permalink": "puppet-apache-shrunk-edging", "time": "2024-05-07 15:45:36.246273", "cmd": 1} {"id": 12533, "parent": 12532, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich ueberschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme extends Feature{}\none sig i1, i2, i3, i4, i5, i6 extends Intervall{}\n// one sig c0, c5 extends ConstraintNode{}\n\n/**\n Setting variables\n*/\n\nfact {\n // Platoon\n i1.lowerBound = 1\n i1.upperBound = 1\n Platoon.cardinality = i1\n i2.lowerBound = 4\n i2.upperBound = KleeneStar\n Platoon.groupInstanceCardinality = i2\n i3.lowerBound = 4\n i3.upperBound = 4\n Platoon.groupCardinality = i3\n\n //Adressing Scheme\n AddressingScheme.parent = Platoon\n i4.lowerBound = 1\n i4.upperBound = 1\n AddressingScheme.cardinality = i4\n i5.lowerBound = 1\n i5.upperBound = 1\n AddressingScheme.groupInstanceCardinality = i5\n i6.lowerBound = 1\n i6.upperBound = 1\n AddressingScheme.groupCardinality = i6\n\n \n}\n\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "slug-sway-anger-stench", "time": "2024-05-07 15:46:03.687107", "cmd": 1} {"id": 12534, "parent": 12533, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich ueberschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Channels, Regular, Compact, HighThroughput, Reliable extends Feature{}\n\none sig i1, i2, i3, i4, i5, i6 extends Intervall{}\n// one sig c0, c5 extends ConstraintNode{}\n\n/**\n Setting variables\n*/\n\nfact {\n // Platoon\n i1.lowerBound = 1\n i1.upperBound = 1\n Platoon.cardinality = i1\n i2.lowerBound = 4\n i2.upperBound = KleeneStar\n Platoon.groupInstanceCardinality = i2\n i3.lowerBound = 4\n i3.upperBound = 4\n Platoon.groupCardinality = i3\n\n //Adressing Scheme\n AddressingScheme.parent = Platoon\n i4.lowerBound = 1\n i4.upperBound = 1\n AddressingScheme.cardinality = i4\n i5.lowerBound = 1\n i5.upperBound = 1\n AddressingScheme.groupInstanceCardinality = i5\n i6.lowerBound = 1\n i6.upperBound = 1\n AddressingScheme.groupCardinality = i6\n\n \n}\n\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "lucid-violin-giggle-defame", "time": "2024-05-07 15:47:04.922934", "cmd": 1} {"id": 12536, "parent": 12535, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich ueberschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Regular, Compact extends Feature{}\n\none sig i1, i2, i3, i4, i5, i6, i7, i8 extends Intervall{}\n// one sig c0, c5 extends ConstraintNode{}\n\n/**\n Setting variables\n*/\n\nfact {\n // Platoon\n i1.lowerBound = 1\n i1.upperBound = 1\n Platoon.cardinality = i1\n i2.lowerBound = 4\n i2.upperBound = KleeneStar\n Platoon.groupInstanceCardinality = i2\n i3.lowerBound = 4\n i3.upperBound = 4\n Platoon.groupCardinality = i3\n\n //Adressing Scheme\n AddressingScheme.parent = Platoon\n i4.lowerBound = 1\n i4.upperBound = 1\n AddressingScheme.cardinality = i4\n i5.lowerBound = 1\n i5.upperBound = 1\n AddressingScheme.groupInstanceCardinality = i5\n i6.lowerBound = 1\n i6.upperBound = 1\n AddressingScheme.groupCardinality = i6\n\n //Compact\n Compact.parent = AddressingScheme\n i7.lowerBound = 1\n i7.upperBound = KleeneStar\n Compact.cardinality = i7\n \n\n //Regular\n Regular.parent = AddressingScheme\n i8.lowerBound = 0\n i8.upperBound = 1\n Regular.cardinality = i8\n \n\n \n}\n\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "basin-rewire-sudoku-romp", "time": "2024-05-07 16:00:37.488305", "cmd": 1} {"id": 12448, "parent": 12447, "code": "one sig Platoon {\n children : set AddressingScheme + Channels + Movement + Member\n} {\n -- feature instance multiplicity\n 1 = # children & AddressingScheme\n 1 = # children & Channels\n 1 = # children & Movement\n # children & Member >= 1\n -- group instance multiplicity\n # children >= 4\n -- group type multiplicity (cannot easily count: enumerate subsets)\n some AddressingScheme and some Channels and some Movement and some Member\n -- example for <3, 4>\n -- (no AddressingScheme and some Channels and some Movement and some Member) or\n -- (some AddressingScheme and no Channels and some Movement and some Member) or\n -- (some AddressingScheme and some Channels and no Movement and some Member) or\n -- (some AddressingScheme and some Channels and some Movement and no Member)\n}\n\nsig AddressingScheme {\n children : set Regular + Compact\n} {\n -- feature instance multiplicity\n children & Regular >= 0\n # children & Regular <= 1\n 1 >= # children & Compact\n -- group instance multiplicity\n # children = 1\n}\n\nsig Channels {}\nsig Movement {}\nsig Member {}\nsig Regular {}\nsig Compact {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "rocket-payee-studio-hummus", "time": "2024-04-12 08:43:42.147761", "cmd": 1} {"id": 12515, "parent": 12514, "code": "\none sig Platoon {\n children : set AddressingScheme + Channels + Movement + Member\n} {\n -- feature instance multiplicity\n 1 = # children & AddressingScheme\n 1 = # children & Channels\n 1 = # children & Movement\n # children & Member >= 1\n -- group instance multiplicity\n # children >= 4\n -- group type multiplicity (cannot easily count: enumerate subsets)\n some AddressingScheme and some Channels and some Movement and some Member\n -- example for <3, 4>\n -- (no AddressingScheme and some Channels and some Movement and some Member) or\n -- (some AddressingScheme and no Channels and some Movement and some Member) or\n -- (some AddressingScheme and some Channels and no Movement and some Member) or\n -- (some AddressingScheme and some Channels and some Movement and no Member)\n}\n\nsig AddressingScheme {\n children : set Regular + Compact\n} {\n -- feature instance multiplicity\n # children & Regular >= 0\n # children & Regular <= 1\n 1 >= # children & Compact\n -- group instance multiplicity\n # children = 1\n}\n\nsig Channels {}\nsig Movement {}\nsig Member {}\nsig Regular {}\nsig Compact {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "sloppy-unwind-duct-knee", "time": "2024-05-07 14:58:44.757395", "cmd": 1} {"id": 12522, "parent": 12521, "code": "\none sig Platoon {\n children : set AddressingScheme + Channels + Movement + Member\n} {\n -- feature instance multiplicity\n 1 = # children & AddressingScheme\n 1 = # children & Channels\n 1 = # children & Movement\n # children & Member >= 1\n -- group instance multiplicity\n # children >= 4\n -- group type multiplicity (cannot easily count: enumerate subsets)\n some AddressingScheme and some Channels and some Movement and some Member\n -- example for <3, 4>\n -- (no AddressingScheme and some Channels and some Movement and some Member) or\n -- (some AddressingScheme and no Channels and some Movement and some Member) or\n -- (some AddressingScheme and some Channels and no Movement and some Member) or\n -- (some AddressingScheme and some Channels and some Movement and no Member)\n}\n\nsig AddressingScheme {\n children : set Regular + Compact\n} {\n -- feature instance multiplicity\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 1 \n -- group instance multiplicity\n # children = 1\n}\n\nsig Channels {}\nsig Movement {}\nsig Member {}\nsig Regular {}\nsig Compact {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "sworn-candy-spleen-curly", "time": "2024-05-07 15:05:18.672597", "cmd": 1} {"id": 12525, "parent": 12524, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich ueberschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Channels, Regular, Compact, HighThroughput, Reliable extends Feature{}\none sig i1, i2, i3 extends Intervall{}\n// one sig c0, c5 extends ConstraintNode{}\n\n/**\n Setting variables\n*/\n\nfact {\n // Platoon\n i1.lowerBound = 1\n i1.upperBound = 1\n Platoon.cardinality = i1\n i2.lowerBound = 4\n i2.upperBound = KleeneStar\n Platoon.groupInstanceCardinality = i2\n i3.lowerBound = 4\n i3.upperBound = 4\n Platoon.groupCardinality = i3\n\n \n}\n\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "rift-next-retail-agile", "time": "2024-05-07 15:37:46.280053", "cmd": 1} {"id": 12529, "parent": 12528, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich ueberschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme extends Feature{}\none sig i1, i2, i3, i4, i5, i6 extends Intervall{}\n// one sig c0, c5 extends ConstraintNode{}\n\n/**\n Setting variables\n*/\n\nfact {\n // Platoon\n i1.lowerBound = 1\n i1.upperBound = 1\n Platoon.cardinality = i1\n i2.lowerBound = 4\n i2.upperBound = KleeneStar\n Platoon.groupInstanceCardinality = i2\n i3.lowerBound = 4\n i3.upperBound = 4\n Platoon.groupCardinality = i3\n\n //Adressing Scheme\n AddressingScheme.parent = Platoon\n i4.lowerBound = 1\n i4.upperBound = 1\n AddressingScheme.cardinality = i4\n i5.lowerBound = 1\n i5.upperBound = 1\n AddressingScheme.groupInstanceCardinality = i5\n i6.lowerBound = 1\n i6.upperBound = 1\n AddressingScheme.groupCardinality = i6\n\n \n}\n\npred show{}\nrun show for 10 int, 0 Feature, 0 ConstraintNode", "permalink": "chute-credit-antics-molar", "time": "2024-05-07 15:44:39.552023", "cmd": 1} {"id": 12531, "parent": 12530, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich ueberschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme extends Feature{}\none sig i1, i2, i3, i4, i5, i6 extends Intervall{}\n// one sig c0, c5 extends ConstraintNode{}\n\n/**\n Setting variables\n*/\n\nfact {\n // Platoon\n i1.lowerBound = 1\n i1.upperBound = 1\n Platoon.cardinality = i1\n i2.lowerBound = 4\n i2.upperBound = KleeneStar\n Platoon.groupInstanceCardinality = i2\n i3.lowerBound = 4\n i3.upperBound = 4\n Platoon.groupCardinality = i3\n\n //Adressing Scheme\n AddressingScheme.parent = Platoon\n i4.lowerBound = 1\n i4.upperBound = 1\n AddressingScheme.cardinality = i4\n i5.lowerBound = 1\n i5.upperBound = 1\n AddressingScheme.groupInstanceCardinality = i5\n i6.lowerBound = 1\n i6.upperBound = 1\n AddressingScheme.groupCardinality = i6\n\n \n}\n\npred show{}\nrun show for 10 but 7 int", "permalink": "legal-halved-jeep-deny", "time": "2024-05-07 15:45:07.213707", "cmd": 1} {"id": 12535, "parent": 12534, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich ueberschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Channels, Regular, Compact, HighThroughput, Reliable extends Feature{}\n\none sig i1, i2, i3, i4, i5, i6, i7, i8 extends Intervall{}\n// one sig c0, c5 extends ConstraintNode{}\n\n/**\n Setting variables\n*/\n\nfact {\n // Platoon\n i1.lowerBound = 1\n i1.upperBound = 1\n Platoon.cardinality = i1\n i2.lowerBound = 4\n i2.upperBound = KleeneStar\n Platoon.groupInstanceCardinality = i2\n i3.lowerBound = 4\n i3.upperBound = 4\n Platoon.groupCardinality = i3\n\n //Adressing Scheme\n AddressingScheme.parent = Platoon\n i4.lowerBound = 1\n i4.upperBound = 1\n AddressingScheme.cardinality = i4\n i5.lowerBound = 1\n i5.upperBound = 1\n AddressingScheme.groupInstanceCardinality = i5\n i6.lowerBound = 1\n i6.upperBound = 1\n AddressingScheme.groupCardinality = i6\n\n //Compact\n Compact.parent = AddressingScheme\n i7.lowerBound = 1\n i7.upperBound = KleeneStar\n Compact.cardinality = i7\n \n\n //Regular\n Regular.parent = AddressingScheme\n i8.lowerBound = 0\n i8.upperBound = 1\n Regular.cardinality = i8\n \n\n \n}\n\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "patchy-return-scroll-plasma", "time": "2024-05-07 15:57:01.354297", "cmd": 1} {"id": 12509, "parent": null, "code": "sig A{}\nrun {}\nrun {}\nrun {}\ncheck {}", "permalink": "wind-rally-life-gossip", "time": "2024-04-30 12:00:54.524111", "cmd": 4} {"id": 12513, "parent": null, "code": "one sig Platoon {\n children : set AddressingScheme + Channels + Movement + Member\n} {\n -- feature instance multiplicity\n 1 = # children & AddressingScheme\n 1 = # children & Channels\n 1 = # children & Movement\n # children & Member >= 1\n -- group instance multiplicity\n # children >= 4\n -- group type multiplicity (cannot easily count: enumerate subsets)\n some AddressingScheme and some Channels and some Movement and some Member\n -- example for <3, 4>\n -- (no AddressingScheme and some Channels and some Movement and some Member) or\n -- (some AddressingScheme and no Channels and some Movement and some Member) or\n -- (some AddressingScheme and some Channels and no Movement and some Member) or\n -- (some AddressingScheme and some Channels and some Movement and no Member)\n}\n\nsig AddressingScheme {\n children : set Regular + Compact\n} {\n -- feature instance multiplicity\n # children & Regular >= 0\n # children & Regular <= 1\n 1 >= # children & Compact\n -- group instance multiplicity\n # children = 1\n}\n\nsig Channels {}\nsig Movement {}\nsig Member {}\nsig Regular {}\nsig Compact {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "theft-clip-dawn-galley", "time": "2024-05-06 12:48:09.302093", "cmd": 1} {"id": 12514, "parent": null, "code": "one sig Platoon {\n children : set AddressingScheme + Channels + Movement + Member\n} {\n -- feature instance multiplicity\n 1 = # children & AddressingScheme\n 1 = # children & Channels\n 1 = # children & Movement\n # children & Member >= 1\n -- group instance multiplicity\n # children >= 4\n -- group type multiplicity (cannot easily count: enumerate subsets)\n some AddressingScheme and some Channels and some Movement and some Member\n -- example for <3, 4>\n -- (no AddressingScheme and some Channels and some Movement and some Member) or\n -- (some AddressingScheme and no Channels and some Movement and some Member) or\n -- (some AddressingScheme and some Channels and no Movement and some Member) or\n -- (some AddressingScheme and some Channels and some Movement and no Member)\n}\n\nsig AddressingScheme {\n children : set Regular + Compact\n} {\n -- feature instance multiplicity\n # children & Regular >= 0\n # children & Regular <= 1\n 1 >= # children & Compact\n -- group instance multiplicity\n # children = 1\n}\n\nsig Channels {}\nsig Movement {}\nsig Member {}\nsig Regular {}\nsig Compact {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "dawn-frays-motto-rubbed", "time": "2024-05-07 14:48:15.122418", "cmd": 1} {"id": 12516, "parent": 12515, "code": "\none sig Platoon {\n children : set AddressingScheme + Channels + Movement + Member\n} {\n -- feature instance multiplicity\n 1 = # children & AddressingScheme\n 1 = # children & Channels\n 1 = # children & Movement\n # children & Member >= 1\n -- group instance multiplicity\n # children >= 4\n -- group type multiplicity (cannot easily count: enumerate subsets)\n some AddressingScheme and some Channels and some Movement and some Member\n -- example for <3, 4>\n -- (no AddressingScheme and some Channels and some Movement and some Member) or\n -- (some AddressingScheme and no Channels and some Movement and some Member) or\n -- (some AddressingScheme and some Channels and no Movement and some Member) or\n -- (some AddressingScheme and some Channels and some Movement and no Member)\n}\n\nsig AddressingScheme {\n children : set Regular + Compact\n} {\n -- feature instance multiplicity\n # children & Regular >= 0\n # children & Regular <= 1\n 1 >= # children & Compact\n -- group instance multiplicity\n # children = 2\n}\n\nsig Channels {}\nsig Movement {}\nsig Member {}\nsig Regular {}\nsig Compact {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "wreath-print-sleep-retake", "time": "2024-05-07 15:00:53.053723", "cmd": 1} {"id": 12519, "parent": 12518, "code": "\none sig Platoon {\n children : set AddressingScheme + Channels + Movement + Member\n} {\n -- feature instance multiplicity\n 1 = # children & AddressingScheme\n 1 = # children & Channels\n 1 = # children & Movement\n # children & Member >= 1\n -- group instance multiplicity\n # children >= 4\n -- group type multiplicity (cannot easily count: enumerate subsets)\n some AddressingScheme and some Channels and some Movement and some Member\n -- example for <3, 4>\n -- (no AddressingScheme and some Channels and some Movement and some Member) or\n -- (some AddressingScheme and no Channels and some Movement and some Member) or\n -- (some AddressingScheme and some Channels and no Movement and some Member) or\n -- (some AddressingScheme and some Channels and some Movement and no Member)\n}\n\nsig AddressingScheme {\n children : set Regular + Compact\n} {\n -- feature instance multiplicity\n # children & Regular >= 0\n # children & Regular <= 1\n 1 >= # children & Compact\n -- group instance multiplicity\n # children = 1\n}\n\nsig Channels {}\nsig Movement {}\nsig Member {}\nsig Regular {}\nsig Compact {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "sturdy-email-dubbed-linked", "time": "2024-05-07 15:01:50.570855", "cmd": 1} {"id": 12524, "parent": 12523, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n root: one Feature,\n group: set Feature,\n require: ConstraintNode -> ConstraintNode,\n exclude: ConstraintNode -> ConstraintNode,\n config: set Instance\n}\n\nabstract sig Feature{\n groupCardinality: set Intervall,\n groupInstanceCardinality: set Intervall,\n cardinality: some Intervall,\n parent: lone Feature,\n instances: set Instance\n}\n\nsig Instance {\n feature: one Feature,\n instanceParent: lone Instance\n}\n\nsig Intervall {\n lowerBound: Int,\n upperBound: Int + KleeneStar\n}\n\nabstract sig ConstraintNode {\n feature: one Feature,\n cardinality: some Intervall\n}\n\none sig KleeneStar {}\n\n/**\n Features\n*/\n\none sig Platoon, AddressingScheme, Channels, Movement, Member extends Feature {}\none sig i1, i2, i3 extends Intervall{}\none sig Regular, Compact, HighThroughput, Reliable extends Feature {}\n\n/**\n Constraints\n*/\n\nfact rootTree {\n all f: Feature | FM.root in f.*parent\n all f: FM.root | no f.parent\n all f: Feature - FM.root | one f.parent\n no f: Feature | f in f.^parent\n}\n\nfact configuration {\n all i: Instance | i in FM.config\n}\n\nfact root{\n all f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n all f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n all f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n all f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n all i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n all c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n\nfact groupCardinalityConstraint {\n all i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\nfact groupInstanceCardinalityConstraint {\n all i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n all i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n all i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n all i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n\nfact requireConstraint {\n all f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n all c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n\nfact excludeConstraint {\n all f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n all c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\nfact childrenBelongToParent {\n Platoon.instances = AddressingScheme.instances + Channels.instances + Movement.instances + Member.instances\n AddressingScheme.instances = Regular.instances + Compact.instances\n}\n\n/**\n Intervall constraints\n*/\n\nfact intervallPositive {\n all i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\nfact intervallIsAttribute {\n all i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\nfact noClustering {\n all i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n all i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n all i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n all i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n (i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n/**\n Setting variables\n*/\n\nfact {\n // Platoon\n i1.lowerBound = 1\n i1.upperBound = 1\n Platoon.cardinality = i1\n i2.lowerBound = 4\n i2.upperBound = KleeneStar\n Platoon.groupInstanceCardinality = i2\n i3.lowerBound = 4\n i3.upperBound = 4\n Platoon.groupCardinality = i3\n\n \n}\n\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "arose-yin-vowed-aghast", "time": "2024-05-07 15:36:09.975750", "cmd": 1} {"id": 12580, "parent": null, "code": "sig A{} \nrun {}", "permalink": "grew-sweep-stress-baggy", "time": "2024-05-21 13:37:11.095792", "cmd": 1} {"id": 12517, "parent": 12516, "code": "\none sig Platoon {\n children : set AddressingScheme + Channels + Movement + Member\n} {\n -- feature instance multiplicity\n 1 = # children & AddressingScheme\n 1 = # children & Channels\n 1 = # children & Movement\n # children & Member >= 1\n -- group instance multiplicity\n # children >= 4\n -- group type multiplicity (cannot easily count: enumerate subsets)\n some AddressingScheme and some Channels and some Movement and some Member\n -- example for <3, 4>\n -- (no AddressingScheme and some Channels and some Movement and some Member) or\n -- (some AddressingScheme and no Channels and some Movement and some Member) or\n -- (some AddressingScheme and some Channels and no Movement and some Member) or\n -- (some AddressingScheme and some Channels and some Movement and no Member)\n}\n\nsig AddressingScheme {\n children : set Regular + Compact\n} {\n -- feature instance multiplicity\n # children & Regular >= 0\n # children & Regular <= 1\n 2 >= # children & Compact\n -- group instance multiplicity\n # children = 2\n}\n\nsig Channels {}\nsig Movement {}\nsig Member {}\nsig Regular {}\nsig Compact {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "unsnap-item-itunes-anime", "time": "2024-05-07 15:01:27.046266", "cmd": 1} {"id": 12527, "parent": 12526, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich ueberschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Channels, Regular, Compact, HighThroughput, Reliable extends Feature{}\none sig i1, i2, i3 extends Intervall{}\n// one sig c0, c5 extends ConstraintNode{}\n\n/**\n Setting variables\n*/\n\nfact {\n // Platoon\n i1.lowerBound = 1\n i1.upperBound = 1\n Platoon.cardinality = i1\n i2.lowerBound = 4\n i2.upperBound = KleeneStar\n Platoon.groupInstanceCardinality = i2\n i3.lowerBound = 4\n i3.upperBound = 4\n Platoon.groupCardinality = i3\n\n \n}\n\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "feed-radish-glare-task", "time": "2024-05-07 15:40:26.101403", "cmd": 1} {"id": 12537, "parent": 12536, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich ueberschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Regular, Compact extends Feature{}\n\none sig i1, i2, i3, i4, i5, i6, i7, i8 extends Intervall{}\n// one sig c0, c5 extends ConstraintNode{}\n\n/**\n Setting variables\n*/\n\nfact {\n // Platoon\n i1.lowerBound = 1\n i1.upperBound = 1\n Platoon.cardinality = i1\n i2.lowerBound = 4\n i2.upperBound = KleeneStar\n Platoon.groupInstanceCardinality = i2\n i3.lowerBound = 4\n i3.upperBound = 4\n Platoon.groupCardinality = i3\n\n //Adressing Scheme\n AddressingScheme.parent = Platoon\n i4.lowerBound = 1\n i4.upperBound = 1\n AddressingScheme.cardinality = i4\n i5.lowerBound = 1\n i5.upperBound = 1\n AddressingScheme.groupInstanceCardinality = i5\n i6.lowerBound = 1\n i6.upperBound = 1\n AddressingScheme.groupCardinality = i6\n\n //Compact\n Compact.parent = AddressingScheme\n i7.lowerBound = 1\n i7.upperBound = KleeneStar\n Compact.cardinality = i7\n \n\n //Regular\n Regular.parent = AddressingScheme\n i8.lowerBound = 0\n i8.upperBound = 1\n Regular.cardinality = i8\n \n\n \n}\n\npred show{}\nrun show for 10 but 4 int, 0 Feature, 0 ConstraintNode", "permalink": "pogo-fruit-gnarly-liquid", "time": "2024-05-07 16:00:49.386430", "cmd": 1} {"id": 12538, "parent": 12537, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich ueberschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Regular, Compact extends Feature{}\n\none sig i1, i2, i3, i4, i5, i6, i7, i8 extends Intervall{}\n// one sig c0, c5 extends ConstraintNode{}\n\n/**\n Setting variables\n*/\n\nfact {\n // Platoon\n i1.lowerBound = 1\n i1.upperBound = 1\n Platoon.cardinality = i1\n i2.lowerBound = 4\n i2.upperBound = KleeneStar\n Platoon.groupInstanceCardinality = i2\n i3.lowerBound = 4\n i3.upperBound = 4\n Platoon.groupCardinality = i3\n\n //Adressing Scheme\n AddressingScheme.parent = Platoon\n i4.lowerBound = 1\n i4.upperBound = 1\n AddressingScheme.cardinality = i4\n i5.lowerBound = 1\n i5.upperBound = 1\n AddressingScheme.groupInstanceCardinality = i5\n i6.lowerBound = 1\n i6.upperBound = 1\n AddressingScheme.groupCardinality = i6\n\n //Compact\n Compact.parent = AddressingScheme\n i7.lowerBound = 1\n i7.upperBound = KleeneStar\n Compact.cardinality = i7\n \n\n //Regular\n Regular.parent = AddressingScheme\n i8.lowerBound = 0\n i8.upperBound = 1\n Regular.cardinality = i8\n \n\n \n}\n\npred show{}\nrun show for 10 but 2 int, 0 Feature, 0 ConstraintNode", "permalink": "apple-strut-unbent-yoyo", "time": "2024-05-07 16:00:54.404482", "cmd": 1} {"id": 12831, "parent": null, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\n\nsig Hierachy {\n root: lone GameComponent\n}\n\nsig GameComponent {\n status: one State,\n associated_with = one Transform\n}\n\nsig Data {\n associated_with: one GameComponent\n \n}\n\nsig Transform {\n}\n\n\nrun {}", "permalink": "trench-parrot-duty-crispy", "time": "2024-06-04 06:59:36.453561", "cmd": 1} {"id": 13381, "parent": 13380, "code": "// Alloy model generated from Feature model\n\nsig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children >= 1\n # children <= 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "giving-waving-sandy-motive", "time": "2024-06-21 17:56:14.156563", "cmd": 1} {"id": 13387, "parent": 13386, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + blah + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & blah >= 1\n # children & blah <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 0\n some AddressingScheme and some blah and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 1\n # children & Compact <= 1\n # children >= 0\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig blah {\n children: set mo + momo\n} {\n # children & mo >= 0\n # children & mo <= 1\n # children & momo >= 0\n # children & momo <= 2\n # children >= 0\n some mo and some momo\n}\nsig mo {}\n\nsig momo {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + blah + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n blah.children = mo + momo\n}\n\nrun {} for 10 but 5 Int", "permalink": "stupor-decal-punk-raisin", "time": "2024-06-21 18:05:46.817856", "cmd": 1} {"id": 12800, "parent": null, "code": "module SecretSanta\n\nsig Employee {\n officePartners : set Employee,\n isSecretSantaFor : one Employee\n}\nsig Intern extends Employee { \n supervisor : one Employee \n}\n \npred santaRules {\n // Everyone has a Secret Santa, and nobody is their own Secret Santa.\n all e: Employee | some s : Employee | s.isSecretSantaFor =e\n all e: Employee | e.isSecretSantaFor != e\n \n // Nobody should get a person assigned that they share an office with.\n all e: Employee | no e.isSecretSantaFor & e.officePartners\n \n // No intern should have to buy a present for their supervisor.\n all i: Intern | i.supervisor != i.isSecretSantaFor\n \n}\n \nrun santaRules for 3", "permalink": "flap-unable-jumbo-power", "time": "2024-06-03 14:10:43.396374", "cmd": 1} {"id": 13867, "parent": null, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\nsig Player{\n id : Int,\n age: Int\n}\n\nlone sig Piano{\n player : one Player,\n pianoID: Int\n}\n\nsig Violin {\n player: set Player,\n violinID: Int\n}\n\none sig Constructor extends Player {\n leader: one Player,\n experience: Int\n}\n\nfact PlayerRoleConstraint {\n all p: Player | (p in Piano.player) implies (p not in Violin.player)\n}\n\nfact noConstuctorNoOrchestra{\n no Constructor implies no Player\n}\n\n\nrun {} ", "permalink": "maker-maroon-finite-winner", "time": "2024-07-11 06:12:02.224798", "cmd": 1} {"id": 13853, "parent": 13852, "code": "sig Node {}\n\nsig List {\n header : one Node\n}\n\nrun {}", "permalink": "smith-lasso-stash-ditzy", "time": "2024-07-10 07:10:53.871242", "cmd": 1} {"id": 13858, "parent": 13857, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\nsig Player{\n\n}\n\nlone sig piano{\n player : one Player\n}\n\nrun {}", "permalink": "catnap-parted-wilt-native", "time": "2024-07-11 05:39:06.363216", "cmd": 1} {"id": 13859, "parent": 13858, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\nsig Player{\n\n}\n\nlone sig piano{\n player : one Player\n}\n\nrun {}", "permalink": "flame-charm-wagon-deem", "time": "2024-07-11 05:39:07.317429", "cmd": 1} {"id": 13860, "parent": 13859, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\nsig Player{\n\n}\n\nlone sig piano{\n player : one Player\n}\n\nrun {}", "permalink": "width-paddle-lurk-enable", "time": "2024-07-11 05:39:08.037501", "cmd": 1} {"id": 13865, "parent": null, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\nsig Player{\n id : Int,\n age: Int\n\n}\n\nlone sig piano{\n player : one Player\n}\n\n\nrun {}", "permalink": "bounce-thesis-wick-tremor", "time": "2024-07-11 05:41:23.678015", "cmd": 1} {"id": 12926, "parent": null, "code": "sig A{}\nrun {}", "permalink": "reflex-lung-resize-trump", "time": "2024-06-04 21:00:49.760476", "cmd": 1} {"id": 13405, "parent": null, "code": "sig A {}\nrun {}", "permalink": "exes-shut-those-ethics", "time": "2024-06-25 06:22:21.827024", "cmd": 1} {"id": 13407, "parent": null, "code": "sig A {}\nrun {}", "permalink": "drab-cement-carton-vanish", "time": "2024-06-25 06:28:06.619178", "cmd": 1} {"id": 13411, "parent": null, "code": "sig A{}\nrun {}", "permalink": "petted-grape-barrel-corset", "time": "2024-06-25 08:46:26.179517", "cmd": 1} {"id": 13413, "parent": null, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {all a : Assignment | one a.associated_with}\n\n// Predicate PolicyAllowsGrading defines the policy for allowing grading of an Assignment by a Person.\npred PolicyAllowsGrading(p: Person, a: Assignment) {\n p in a.associated_with.assistant or p in a.associated_with.instructor\n}\n\n// Assert NoOneCanGradeTheirOwnAssignment checks that no Person can grade their own Assignment.\nassert NoOneCanGradeTheirOwnAssignment {\n all p : Person, a : Assignment |\n PolicyAllowsGrading[p, a] implies not p in a.assigned_to\n}\n\ncheck NoOneCanGradeTheirOwnAssignment for 2", "permalink": "plenty-proud-boxcar-utter", "time": "2024-06-25 08:51:21.875407", "cmd": 1} {"id": 13417, "parent": 13416, "code": "sig A{}\nrun{}", "permalink": "womb-water-hurler-corny", "time": "2024-06-25 08:53:00.114804", "cmd": 1} {"id": 13423, "parent": 13422, "code": "var sig A{\n var others: set A\n}\nrun {(always eventually some A) and (always eventually no A) }", "permalink": "credit-widen-slush-otter", "time": "2024-06-25 09:45:58.742160", "cmd": 1} {"id": 13429, "parent": 13428, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {all a : Assignment | one a.associated_with}\n\n// Predicate PolicyAllowsGrading defines the policy for allowing grading of an Assignment by a Person.\npred PolicyAllowsGrading(p: Person, a: Assignment) {\n p in a.associated_with.assistant or p in a.associated_with.instructor\n}\n\n// Assert NoOneCanGradeTheirOwnAssignment checks that no Person can grade their own Assignment.\nassert NoOneCanGradeTheirOwnAssignment {\n all p : Person, a : Assignment |\n PolicyAllowsGrading[p, a] implies not p in a.assigned_to\n}\n\ncheck NoOneCanGradeTheirOwnAssignment for 2", "permalink": "rubble-finite-raisin-hardy", "time": "2024-06-25 11:49:59.819623", "cmd": 1} {"id": 13431, "parent": 13430, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {all a : Assignment | one a.associated_with}\n\n// Predicate PolicyAllowsGrading defines the policy for allowing grading of an Assignment by a Person.\npred PolicyAllowsGrading(p: Person, a: Assignment) {\n p in a.associated_with.assistant or p in a.associated_with.instructor\n}\n\n// Assert NoOneCanGradeTheirOwnAssignment checks that no Person can grade their own Assignment.\nassert NoOneCanGradeTheirOwnAssignment {\n all p : Person, a : Assignment |\n PolicyAllowsGrading[p, a] implies not p in a.assigned_to\n}\n\ncheck NoOneCanGradeTheirOwnAssignment for 2", "permalink": "heat-runt-thaw-ranger", "time": "2024-06-25 11:50:36.723259", "cmd": 1} {"id": 13433, "parent": 13432, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {all a : Assignment | one a.associated_with}\n\n// Predicate PolicyAllowsGrading defines the policy for allowing grading of an Assignment by a Person.\npred PolicyAllowsGrading(p: Person, a: Assignment) {\n p in a.associated_with.assistant or p in a.associated_with.instructor\n}\n\n// Assert NoOneCanGradeTheirOwnAssignment checks that no Person can grade their own Assignment.\nassert NoOneCanGradeTheirOwnAssignment {\n all p : Person, a : Assignment |\n PolicyAllowsGrading[p, a] implies not p in a.assigned_to\n}\n\ncheck NoOneCanGradeTheirOwnAssignment for 2", "permalink": "retail-crux-porous-chance", "time": "2024-06-25 11:51:46.735259", "cmd": 1} {"id": 13437, "parent": 13436, "code": "module appendixA/addressBook2\n\nsig Addr, Name { }\n\nsig Book {\n\taddr: Name -> (Name + Addr)\n\t}\n\npred inv [b: Book] {\n\tlet addr = b.addr |\n\t\tall n: Name {\n\t\t\tn not in n.^addr\n\t\t\tsome addr.n => some n.^addr & Addr\n\t\t}\n\t}\n\npred add [b, b\": Book, n: Name, t: Name+Addr] {\n\tb\".addr = b.addr + n->t\n\t}\n\npred del [b, b\": Book, n: Name, t: Name+Addr] {\n\tb\".addr = b.addr - n->t\n\t}\n\nfun lookup [b: Book, n: Name] : set Addr {\n\tn.^(b.addr) & Addr\n\t}", "permalink": "from-scribe-pleat-walrus", "time": "2024-06-25 11:55:29.634878", "cmd": 1} {"id": 13440, "parent": null, "code": "module appendixA/addressBook2\n\nsig Addr, Name { }\n\nsig Book {\n\taddr: Name -> (Name + Addr)\n\t}\n\npred inv [b: Book] {\n\tlet addr = b.addr |\n\t\tall n: Name {\n\t\t\tn not in n.^addr\n\t\t\tsome addr.n => some n.^addr & Addr\n\t\t}\n\t}\n\npred add [b, b\": Book, n: Name, t: Name+Addr] {\n\tb\".addr = b.addr + n->t\n\t}\n\npred del [b, b\": Book, n: Name, t: Name+Addr] {\n\tb\".addr = b.addr - n->t\n\t}\n\nfun lookup [b: Book, n: Name] : set Addr {\n\tn.^(b.addr) & Addr\n\t}", "permalink": "hull-uphill-cube-vessel", "time": "2024-06-25 14:22:43.891149", "cmd": 1} {"id": 13441, "parent": null, "code": "// Alloy model generated from Feature model\n\nsig Platoon {\n children: set AddressingScheme + blah + Cow + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & blah >= 1\n # children & blah <= 1\n # children & Cow >= 1\n # children & Cow <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 0\n some AddressingScheme and some blah and some Cow and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 1\n # children & Compact <= 1\n # children >= 0\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig blah {\n children: set mo + momo\n} {\n # children & mo >= 0\n # children & mo <= 1\n # children & momo >= 0\n # children & momo <= 2\n # children >= 0\n some mo and some momo\n}\nsig mo {}\n\nsig momo {}\n\n\nsig Cow {\n children: set calf1 + claf2\n} {\n # children & calf1 >= 0\n # children & calf1 <= 1\n # children & claf2 >= 0\n # children & claf2 <= 2\n # children >= 0\n some calf1 and some claf2\n}\nsig calf1 {}\n\nsig claf2 {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + blah + Cow + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n blah.children = mo + momo\n Cow.children = calf1 + claf2\n}\n\nrun {} for 10 but 5 Int", "permalink": "duke-spotty-proven-single", "time": "2024-06-26 09:59:30.854377", "cmd": 1} {"id": 13462, "parent": 13461, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + blah + Cow + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & blah >= 1\n # children & blah <= 1\n # children & Cow >= 1\n # children & Cow <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 3\n # children <= 4\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 1\n # children & Compact <= 1\n # children >= 0\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig blah {\n children: set mo + momo\n} {\n # children & mo >= 0\n # children & mo <= 1\n # children & momo >= 0\n # children & momo <= 2\n # children >= 0\n}\nsig mo {}\n\nsig momo {}\n\n\nsig Cow {\n children: set calf1 + claf2\n} {\n # children & calf1 >= 0\n # children & calf1 <= 1\n # children & claf2 >= 0\n # children & claf2 <= 2\n # children >= 0\n}\nsig calf1 {}\n\nsig claf2 {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + blah + Cow + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n blah.children = mo + momo\n Cow.children = calf1 + claf2\n}\n\nrun {} for 10 but 7 Int", "permalink": "canine-purge-hug-slug", "time": "2024-06-26 10:44:06.583625", "cmd": 1} {"id": 13481, "parent": 13480, "code": "sig A {\n\n}", "permalink": "feast-dusk-had-proud", "time": "2024-06-27 07:17:59.066812", "cmd": 1} {"id": 13483, "parent": 13482, "code": "sig A {\n\n}\n\nassert a1 {\n no A\n}\n\ncheck a1", "permalink": "carol-demote-python-sugar", "time": "2024-06-27 08:43:51.513731", "cmd": 1} {"id": 13485, "parent": 13484, "code": "sig A {\n\n}\n\nassert a1 {\n #A = 5\n}\n\ncheck a1", "permalink": "hanky-stony-justly-flint", "time": "2024-06-27 08:44:23.417805", "cmd": 1} {"id": 13486, "parent": 13485, "code": "sig A {\n\n}\n\nassert a1 {\n #A = 5\n}\n\ncheck a1", "permalink": "humvee-rival-compel-famine", "time": "2024-06-27 08:44:32.247820", "cmd": 1} {"id": 13487, "parent": 13486, "code": "sig A {\n\n}\n\nassert a1 {\n #A = 5\n}\n\ncheck a1", "permalink": "opal-marine-litmus-late", "time": "2024-06-27 08:44:35.162309", "cmd": 1} {"id": 13510, "parent": 13509, "code": "sig A {\n\n}", "permalink": "bouncy-dinghy-mumbo-motto", "time": "2024-07-02 20:09:59.656597", "cmd": 1} {"id": 13525, "parent": 13524, "code": "var sig File {}\nvar sig Trash in File {}\n\npred delete [f: File] {\n\tf not in Trash\n\tTrash' = Trash + f\n\tFile' = File\n}\n\npred restore [f: File] {\n\tf in Trash\n\tTrash' = Trash - f\n\tFile' = File\n}\n\npred empty {\n\tsome Trash\n\tno Trash'\n\tFile' = File - Trash\n}\n\npred do_nothing {\n\tFile' = File\n\tTrash' = Trash\n}\n\npred restoreEnabled [f:File] {\n f in Trash\n}\n\nfact Behaviour {\n\tno Trash\n\talways {\n//\t\t(some f: File | delete[f] or restore[f]) or empty\n\t\t(some f: File | delete[f] or restore[f]) or empty or do_nothing\n\t}\n} \n\nexample: run {}\n\nassert restoreAfterDelete {\n\talways (all f : File | restore[f] implies once delete[f])\n}\n\ncheck restoreAfterDelete for 10 steps\ncheck restoreAfterDelete for 1.. steps\n\nassert deleteAll {\n//\talways ((File in Trash and empty) implies always no File)\n\talways ((File in Trash and empty) implies after always no File)\n}\n\ncheck deleteAll\n\ncheck Exercise1 {\n\t-- The set of files never increases\n\talways (File' in File)\n}\n\n\ncheck Exercise2 {\n\t-- The set of files only changes when empty is performed\n\talways (File' != File implies empty)\n}\n\ncheck Exercise3 {\n (always all f : File | not delete[f]) implies always not empty\n}\n\ncheck Exercise4 {\n\t-- Once you have no files you never have files again\n\talways (no File implies always no File)\n}\n\nassert restoreIsPossibleBeforeEmpty {\n -- a deleted file can still be restored if the trash is not emptied\n -- always (all f:File | delete[f] implies (empty releases restoreEnabled[f]))\n -- always (all f:File | delete[f] implies ((empty or restore[f]) releases restoreEnabled[f]))\n always (all f:File | delete[f] implies after ((empty or restore[f]) releases restoreEnabled[f]))\n}\n\ncheck restoreIsPossibleBeforeEmpty for 3 but 1.. steps", "permalink": "pope-limit-mace-mango", "time": "2024-07-02 21:21:35.963918", "cmd": 1} {"id": 13540, "parent": 13539, "code": "sig DA {}", "permalink": "purr-fall-cheesy-decal", "time": "2024-07-02 21:50:06.764674", "cmd": 1} {"id": 13406, "parent": null, "code": "sig A {}\nrun {}", "permalink": "sheath-eaten-taps-silver", "time": "2024-06-25 06:25:52.108465", "cmd": 1} {"id": 13412, "parent": 6737, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {all a : Assignment | one a.associated_with}\n\n// Predicate PolicyAllowsGrading defines the policy for allowing grading of an Assignment by a Person.\npred PolicyAllowsGrading(p: Person, a: Assignment) {\n p in a.associated_with.assistant or p in a.associated_with.instructor\n}\n\n// Assert NoOneCanGradeTheirOwnAssignment checks that no Person can grade their own Assignment.\nassert NoOneCanGradeTheirOwnAssignment {\n all p : Person, a : Assignment |\n PolicyAllowsGrading[p, a] implies not p in a.assigned_to\n}\n\ncheck NoOneCanGradeTheirOwnAssignment for 2", "permalink": "props-stoke-quilt-baked", "time": "2024-06-25 08:47:32.724041", "cmd": 1} {"id": 13419, "parent": 13418, "code": "var sig A{\n var others: set A\n}\nrun {no A and eventually some A}", "permalink": "banked-sled-fridge-lent", "time": "2024-06-25 09:42:32.989143", "cmd": 1} {"id": 13425, "parent": 13424, "code": "var sig A{\n var others: set A,\n var self: A\n}\nrun {(always eventually some A) and (always eventually no A) }", "permalink": "willed-awning-flail-flinch", "time": "2024-06-25 09:48:24.924318", "cmd": 1} {"id": 13430, "parent": 13429, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {all a : Assignment | one a.associated_with}\n\n// Predicate PolicyAllowsGrading defines the policy for allowing grading of an Assignment by a Person.\npred PolicyAllowsGrading(p: Person, a: Assignment) {\n p in a.associated_with.assistant or p in a.associated_with.instructor\n}\n\n// Assert NoOneCanGradeTheirOwnAssignment checks that no Person can grade their own Assignment.\nassert NoOneCanGradeTheirOwnAssignment {\n all p : Person, a : Assignment |\n PolicyAllowsGrading[p, a] implies not p in a.assigned_to\n}\n\ncheck NoOneCanGradeTheirOwnAssignment for 2", "permalink": "slate-armed-create-open", "time": "2024-06-25 11:50:11.639551", "cmd": 1} {"id": 13432, "parent": 13431, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {all a : Assignment | one a.associated_with}\n\n// Predicate PolicyAllowsGrading defines the policy for allowing grading of an Assignment by a Person.\npred PolicyAllowsGrading(p: Person, a: Assignment) {\n p in a.associated_with.assistant or p in a.associated_with.instructor\n}\n\n// Assert NoOneCanGradeTheirOwnAssignment checks that no Person can grade their own Assignment.\nassert NoOneCanGradeTheirOwnAssignment {\n all p : Person, a : Assignment |\n PolicyAllowsGrading[p, a] implies not p in a.assigned_to\n}\n\ncheck NoOneCanGradeTheirOwnAssignment for 2", "permalink": "stream-repost-thumb-heat", "time": "2024-06-25 11:51:37.533431", "cmd": 1} {"id": 13435, "parent": 13434, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {all a : Assignment | one a.associated_with}\n\n// Predicate PolicyAllowsGrading defines the policy for allowing grading of an Assignment by a Person.\npred PolicyAllowsGrading(p: Person, a: Assignment) {\n p in a.associated_with.assistant or p in a.associated_with.instructor\n}\n\n// Assert NoOneCanGradeTheirOwnAssignment checks that no Person can grade their own Assignment.\nassert NoOneCanGradeTheirOwnAssignment {\n all p : Person, a : Assignment |\n PolicyAllowsGrading[p, a] implies not p in a.assigned_to\n}\n\ncheck NoOneCanGradeTheirOwnAssignment for 20", "permalink": "amigo-print-suburb-voter", "time": "2024-06-25 11:52:57.480135", "cmd": 1} {"id": 13436, "parent": null, "code": "module appendixA/addressBook2\n\nsig Addr, Name { }\n\nsig Book {\n\taddr: Name -> (Name + Addr)\n\t}\n\npred inv [b: Book] {\n\tlet addr = b.addr |\n\t\tall n: Name {\n\t\t\tn not in n.^addr\n\t\t\tsome addr.n => some n.^addr & Addr\n\t\t}\n\t}\n\npred add [b, b\": Book, n: Name, t: Name+Addr] {\n\tb\".addr = b.addr + n->t\n\t}\n\npred del [b, b\": Book, n: Name, t: Name+Addr] {\n\tb\".addr = b.addr - n->t\n\t}\n\nfun lookup [b: Book, n: Name] : set Addr {\n\tn.^(b.addr) & Addr\n\t}", "permalink": "watch-chummy-bubbly-exact", "time": "2024-06-25 11:55:07.291553", "cmd": 1} {"id": 13442, "parent": null, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children >= 1\n # children <= 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "robin-slate-prissy-math", "time": "2024-06-26 10:13:11.232144", "cmd": 1} {"id": 13444, "parent": 13443, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children = 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 3 Int", "permalink": "launch-slick-avenue-angles", "time": "2024-06-26 10:17:08.964683", "cmd": 1} {"id": 13446, "parent": 13445, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children = 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 4 Int", "permalink": "most-plenty-family-ultra", "time": "2024-06-26 10:17:56.889666", "cmd": 1} {"id": 13448, "parent": 13447, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme = 1\n # children & Channels = 1\n # children & Movement = 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children = 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "setup-hangup-groin-art", "time": "2024-06-26 10:26:54.835165", "cmd": 1} {"id": 13451, "parent": 13450, "code": "\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n 1 = # children & AddressingScheme\n 1 = # children & Channels\n 1 = # children & Movement\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children = 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 3 Int", "permalink": "spill-come-tablet-fedora", "time": "2024-06-26 10:28:58.773066", "cmd": 1} {"id": 13453, "parent": 13452, "code": "\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n 1 = # children & AddressingScheme\n 1 = # children & Channels\n 1 = # children & Movement\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children = 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 2 Int", "permalink": "move-dodge-lunacy-unfair", "time": "2024-06-26 10:29:21.901237", "cmd": 1} {"id": 13456, "parent": 13455, "code": "\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n 1 = # children & AddressingScheme\n 1 = # children & Channels\n 1 = # children & Movement\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children = 1\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "theft-unless-polish-awry", "time": "2024-06-26 10:30:57.965370", "cmd": 1} {"id": 13457, "parent": 13456, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children >= 1\n # children <= 1\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "fedora-tray-theft-dime", "time": "2024-06-26 10:36:29.185740", "cmd": 1} {"id": 13460, "parent": 13441, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + blah + Cow + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & blah >= 1\n # children & blah <= 1\n # children & Cow >= 1\n # children & Cow <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 3\n # children <= 4\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 1\n # children & Compact <= 1\n # children >= 0\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig blah {\n children: set mo + momo\n} {\n # children & mo >= 0\n # children & mo <= 1\n # children & momo >= 0\n # children & momo <= 2\n # children >= 0\n}\nsig mo {}\n\nsig momo {}\n\n\nsig Cow {\n children: set calf1 + claf2\n} {\n # children & calf1 >= 0\n # children & calf1 <= 1\n # children & claf2 >= 0\n # children & claf2 <= 2\n # children >= 0\n}\nsig calf1 {}\n\nsig claf2 {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + blah + Cow + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n blah.children = mo + momo\n Cow.children = calf1 + claf2\n}\n\nrun {} for 10 but 5 Int", "permalink": "marlin-scuba-rhyme-mantis", "time": "2024-06-26 10:43:45.378227", "cmd": 1} {"id": 13461, "parent": 13460, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + blah + Cow + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & blah >= 1\n # children & blah <= 1\n # children & Cow >= 1\n # children & Cow <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 3\n # children <= 4\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 1\n # children & Compact <= 1\n # children >= 0\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig blah {\n children: set mo + momo\n} {\n # children & mo >= 0\n # children & mo <= 1\n # children & momo >= 0\n # children & momo <= 2\n # children >= 0\n}\nsig mo {}\n\nsig momo {}\n\n\nsig Cow {\n children: set calf1 + claf2\n} {\n # children & calf1 >= 0\n # children & calf1 <= 1\n # children & claf2 >= 0\n # children & claf2 <= 2\n # children >= 0\n}\nsig calf1 {}\n\nsig claf2 {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + blah + Cow + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n blah.children = mo + momo\n Cow.children = calf1 + claf2\n}\n\nrun {} for 10 but 5 Int", "permalink": "anyone-unhook-stylus-oblong", "time": "2024-06-26 10:43:49.145388", "cmd": 1} {"id": 13463, "parent": 13462, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + blah + Cow + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & blah >= 1\n # children & blah <= 1\n # children & Cow >= 1\n # children & Cow <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 3\n # children <= 4\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 1\n # children & Compact <= 1\n # children >= 0\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig blah {\n children: set mo + momo\n} {\n # children & mo >= 0\n # children & mo <= 1\n # children & momo >= 0\n # children & momo <= 2\n # children >= 0\n}\nsig mo {}\n\nsig momo {}\n\n\nsig Cow {\n children: set calf1 + claf2\n} {\n # children & calf1 >= 0\n # children & calf1 <= 1\n # children & claf2 >= 0\n # children & claf2 <= 2\n # children >= 0\n}\nsig calf1 {}\n\nsig claf2 {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + blah + Cow + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n blah.children = mo + momo\n Cow.children = calf1 + claf2\n}\n\nrun {} for 10 but 6 Int", "permalink": "wool-fried-defame-nervy", "time": "2024-06-26 10:44:12.334165", "cmd": 1} {"id": 13466, "parent": 13465, "code": "// Alloy model generated from Feature model\n\nsig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 3\n # children <= 4\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 1\n # children & Compact <= 1\n # children >= 0\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "grudge-sprout-reborn-voyage", "time": "2024-06-26 10:45:07.388674", "cmd": 1} {"id": 13468, "parent": 13467, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 3\n # children <= 4\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 1\n # children & Compact <= 1\n # children >= 0\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "dose-mantis-deluxe-angled", "time": "2024-06-26 10:45:35.894125", "cmd": 1} {"id": 13469, "parent": 13468, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 3\n # children <= 4\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 1\n # children & Compact <= 1\n # children >= 1\n # children <= 1\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "never-rut-hatred-during", "time": "2024-06-26 10:47:18.728730", "cmd": 1} {"id": 13470, "parent": 13469, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 3\n # children <= 4\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 1\n # children & Compact <= 1\n # children >= 1\n # children <= 1\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "breath-banter-haven-dugout", "time": "2024-06-26 10:47:22.034958", "cmd": 1} {"id": 13472, "parent": 13471, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 3\n # children <= 4\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 1\n # children & Compact <= 1\n # children >= 1\n # children <= 2\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "ambush-eldest-onion-defame", "time": "2024-06-26 10:47:50.190212", "cmd": 1} {"id": 13478, "parent": null, "code": "one sig A {\n \n}", "permalink": "breezy-vista-tremor-racism", "time": "2024-06-27 07:17:20.699385", "cmd": 1} {"id": 13484, "parent": 13483, "code": "sig A {\n\n}\n\nassert a1 {\n no A\n}\n\ncheck a1", "permalink": "curtsy-okay-hazing-suburb", "time": "2024-06-27 08:43:59.063330", "cmd": 1} {"id": 13489, "parent": 13488, "code": "sig A {\n\n}\n\nassert a1 {\n not #A = 5\n}\n\ncheck a1", "permalink": "groove-salami-ridden-duke", "time": "2024-06-27 08:44:49.339872", "cmd": 1} {"id": 13491, "parent": 13490, "code": "sig A {\n\n}", "permalink": "latch-elf-diaper-cape", "time": "2024-06-27 08:53:03.109767", "cmd": 1} {"id": 13492, "parent": null, "code": "sig A {\n\n}\n\nassert a1 {\n not #A = 5\n}\n\ncheck a1", "permalink": "banked-petri-grub-walrus", "time": "2024-06-28 13:38:43.805834", "cmd": 1} {"id": 13493, "parent": null, "code": "sig A {\n\n}\n\nassert a1 {\n not #A = 5\n}\n\ncheck a1", "permalink": "carat-nutmeg-chaste-salami", "time": "2024-06-28 16:07:06.227526", "cmd": 1} {"id": 13495, "parent": 13494, "code": "module appendixA/addressBook2\n\nsig Addr, Name { }\n\nsig Book {\n\taddr: Name -> (Name + Addr)\n\t}\n\n", "permalink": "jimmy-hassle-drudge-comic", "time": "2024-06-28 16:29:23.583962", "cmd": 1} {"id": 13509, "parent": null, "code": "sig A {\n\n}\n\nassert a1 {\n not #A = 5\n}\n\ncheck a1", "permalink": "thrive-apply-kennel-perky", "time": "2024-07-02 20:09:49.569724", "cmd": 1} {"id": 12967, "parent": null, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nsig Hierachy {\n root: lone GameComponent\n}\n\nsig GameComponent {\n status: one State,\n associated_with = one Transform\n}\n\nsig Data {\n associated_with: one GameComponent\n \n}\n\nsig Transform {\n}\n\n\nrun {}", "permalink": "stylus-recant-roamer-atlas", "time": "2024-06-05 05:43:16.884902", "cmd": 1} {"id": 13409, "parent": 13408, "code": "sig A {}\nrun {}", "permalink": "stock-spotty-probe-shrimp", "time": "2024-06-25 06:31:40.221967", "cmd": 1} {"id": 13421, "parent": 13420, "code": "var sig A{\n var others: set A\n}\nrun {always (\n no A and eventually some A\n) }", "permalink": "iron-juggle-diner-carrot", "time": "2024-06-25 09:44:51.410837", "cmd": 1} {"id": 13434, "parent": 13433, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {all a : Assignment | one a.associated_with}\n\n// Predicate PolicyAllowsGrading defines the policy for allowing grading of an Assignment by a Person.\npred PolicyAllowsGrading(p: Person, a: Assignment) {\n p in a.associated_with.assistant or p in a.associated_with.instructor\n}\n\n// Assert NoOneCanGradeTheirOwnAssignment checks that no Person can grade their own Assignment.\nassert NoOneCanGradeTheirOwnAssignment {\n all p : Person, a : Assignment |\n PolicyAllowsGrading[p, a] implies not p in a.assigned_to\n}\n\ncheck NoOneCanGradeTheirOwnAssignment for 2", "permalink": "chump-fence-blurb-maggot", "time": "2024-06-25 11:52:43.478083", "cmd": 1} {"id": 13443, "parent": 13442, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children >= 1\n # children <= 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 3 Int", "permalink": "plural-stomp-sadly-prism", "time": "2024-06-26 10:13:21.666369", "cmd": 1} {"id": 13447, "parent": 13446, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children = 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "caring-crying-decoy-coffee", "time": "2024-06-26 10:26:22.448930", "cmd": 1} {"id": 13449, "parent": 13448, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n 1 = # children & AddressingScheme\n 1 = # children & Channels\n 1 = # children & Movement\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children = 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "wispy-possum-morale-stick", "time": "2024-06-26 10:28:35.529652", "cmd": 1} {"id": 13452, "parent": 13451, "code": "\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n 1 = # children & AddressingScheme\n 1 = # children & Channels\n 1 = # children & Movement\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children = 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "jab-barrel-scotch-vowed", "time": "2024-06-26 10:29:16.736186", "cmd": 1} {"id": 13454, "parent": 13453, "code": "\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n 1 = # children & AddressingScheme\n 1 = # children & Channels\n 1 = # children & Movement\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children = 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 1 Int", "permalink": "sleeve-never-curse-quail", "time": "2024-06-26 10:29:29.879197", "cmd": 1} {"id": 13455, "parent": 13454, "code": "\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n 1 = # children & AddressingScheme\n 1 = # children & Channels\n 1 = # children & Movement\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children = 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "idly-wispy-thrill-resent", "time": "2024-06-26 10:29:34.080822", "cmd": 1} {"id": 13459, "parent": 13458, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 4\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children >= 1\n # children <= 1\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "fiber-theme-anthem-motive", "time": "2024-06-26 10:38:34.645492", "cmd": 1} {"id": 13464, "parent": 13463, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + blah + Cow + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & blah >= 1\n # children & blah <= 1\n # children & Cow >= 1\n # children & Cow <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 3\n # children <= 4\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 1\n # children & Compact <= 1\n # children >= 0\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig blah {\n children: set mo + momo\n} {\n # children & mo >= 0\n # children & mo <= 1\n # children & momo >= 0\n # children & momo <= 2\n # children >= 0\n}\nsig mo {}\n\nsig momo {}\n\n\nsig Cow {\n children: set calf1 + claf2\n} {\n # children & calf1 >= 0\n # children & calf1 <= 1\n # children & claf2 >= 0\n # children & claf2 <= 2\n # children >= 0\n}\nsig calf1 {}\n\nsig claf2 {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + blah + Cow + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n blah.children = mo + momo\n Cow.children = calf1 + claf2\n}\n\nrun {} for 10 but 8 Int", "permalink": "filth-refund-anime-pastor", "time": "2024-06-26 10:44:16.789035", "cmd": 1} {"id": 13465, "parent": 13464, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + blah + Cow + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & blah >= 1\n # children & blah <= 1\n # children & Cow >= 1\n # children & Cow <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 3\n # children <= 4\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 1\n # children & Compact <= 1\n # children >= 0\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig blah {\n children: set mo + momo\n} {\n # children & mo >= 0\n # children & mo <= 1\n # children & momo >= 0\n # children & momo <= 2\n # children >= 0\n}\nsig mo {}\n\nsig momo {}\n\n\nsig Cow {\n children: set calf1 + claf2\n} {\n # children & calf1 >= 0\n # children & calf1 <= 1\n # children & claf2 >= 0\n # children & claf2 <= 2\n # children >= 0\n}\nsig calf1 {}\n\nsig claf2 {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + blah + Cow + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n blah.children = mo + momo\n Cow.children = calf1 + claf2\n}\n\nrun {} for 10 but 9 Int", "permalink": "wisdom-cactus-mobile-spinal", "time": "2024-06-26 10:44:20.128109", "cmd": 1} {"id": 13474, "parent": 13473, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 4\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children >= 1\n # children <= 1\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 ", "permalink": "ethics-ashen-spore-uproot", "time": "2024-06-26 18:42:02.478902", "cmd": 1} {"id": 13475, "parent": 13474, "code": "// Alloy model generated from Feature model\n\none sig ECommerce {\n children: set UserAccount + ProductCatalog + Checkout\n} {\n # children & UserAccount >= 1\n # children & UserAccount <= 1\n # children & ProductCatalog >= 1\n # children & ProductCatalog <= 1\n # children & Checkout >= 1\n # children & Checkout <= 1\n # children >= 0\n}\nsig UserAccount {\n children: set Profile + OrderHistory\n} {\n # children & Profile >= 1\n # children & Profile <= 1\n # children & OrderHistory >= 0\n # children & OrderHistory <= 1\n # children >= 1\n # children <= 1\n}\nsig Profile {}\n\nsig OrderHistory {}\n\n\nsig ProductCatalog {\n children: set Categories + Search + Recommendations\n} {\n # children & Categories >= 1\n # children & Categories <= 1\n # children & Search >= 0\n # children & Search <= 1\n # children & Recommendations >= 0\n # children & Recommendations <= 1\n # children >= 1\n # children <= 1\n}\nsig Categories {}\n\nsig Search {}\n\nsig Recommendations {}\n\n\nsig Checkout {\n children: set Payment + Shipping\n} {\n # children & Payment >= 1\n # children & Payment <= 1\n # children & Shipping >= 1\n # children & Shipping <= 1\n # children >= 1\n # children <= 2\n}\nsig Payment {}\n\nsig Shipping {}\n\n\n\nfact childrenBelongToParent {\n ECommerce.children = UserAccount + ProductCatalog + Checkout\n UserAccount.children = Profile + OrderHistory\n ProductCatalog.children = Categories + Search + Recommendations\n Checkout.children = Payment + Shipping\n}\n\nrun {} for 10 ", "permalink": "guise-groggy-posted-each", "time": "2024-06-26 19:05:13.343596", "cmd": 1} {"id": 13476, "parent": 13475, "code": "// Alloy model generated from Feature model\n\none sig ECommerce {\n children: set UserAccount + ProductCatalog + Checkout\n} {\n # children & UserAccount >= 1\n # children & UserAccount <= 1\n # children & ProductCatalog >= 1\n # children & ProductCatalog <= 1\n # children & Checkout >= 1\n # children & Checkout <= 1\n # children >= 0\n}\nsig UserAccount {\n children: set Profile + OrderHistory\n} {\n # children & Profile >= 1\n # children & Profile <= 1\n # children & OrderHistory >= 0\n # children & OrderHistory <= 1\n # children >= 1\n # children <= 2\n}\nsig Profile {}\n\nsig OrderHistory {}\n\n\nsig ProductCatalog {\n children: set Categories + Search + Recommendations\n} {\n # children & Categories >= 1\n # children & Search >= 0\n # children & Search <= 1\n # children & Recommendations >= 0\n # children >= 1\n}\nsig Categories {}\n\nsig Search {}\n\nsig Recommendations {}\n\n\nsig Checkout {\n children: set Payment + Shipping\n} {\n # children & Payment >= 1\n # children & Payment <= 1\n # children & Shipping >= 1\n # children & Shipping <= 1\n # children >= 2\n # children <= 2\n}\nsig Payment {}\n\nsig Shipping {}\n\n\n\nfact childrenBelongToParent {\n ECommerce.children = UserAccount + ProductCatalog + Checkout\n UserAccount.children = Profile + OrderHistory\n ProductCatalog.children = Categories + Search + Recommendations\n Checkout.children = Payment + Shipping\n}\n\nrun {} for 10 ", "permalink": "mold-stitch-error-greedy", "time": "2024-06-26 19:18:24.791454", "cmd": 1} {"id": 13477, "parent": 13476, "code": "// Alloy model generated from Feature model\n\none sig SmartHome {\n children: set Security + Automation + Entertainment\n} {\n # children & Security >= 1\n # children & Security <= 1\n # children & Automation >= 1\n # children & Automation <= 1\n # children & Entertainment >= 1\n # children & Entertainment <= 1\n # children >= 0\n}\nsig Security {\n children: set Camera + Alarm + Lock\n} {\n # children & Camera >= 0\n # children & Camera <= 1\n # children & Alarm >= 0\n # children & Alarm <= 1\n # children & Lock >= 0\n # children & Lock <= 1\n # children >= 0\n # children <= 3\n}\nsig Camera {}\n\nsig Alarm {}\n\nsig Lock {}\n\n\nsig Automation {\n children: set Lighting + Thermostat\n} {\n # children & Lighting >= 1\n # children & Lighting <= 1\n # children & Thermostat >= 0\n # children >= 0\n}\nsig Lighting {}\n\nsig Thermostat {}\n\n\nsig Entertainment {\n children: set AudioSystem + VideoSystem + GamingConsole\n} {\n # children & AudioSystem >= 0\n # children & AudioSystem <= 1\n # children & VideoSystem >= 0\n # children & VideoSystem <= 1\n # children & GamingConsole >= 0\n # children & GamingConsole <= 1\n # children >= 0\n # children <= 3\n}\nsig AudioSystem {}\n\nsig VideoSystem {}\n\nsig GamingConsole {}\n\n\n\nfact childrenBelongToParent {\n SmartHome.children = Security + Automation + Entertainment\n Security.children = Camera + Alarm + Lock\n Automation.children = Lighting + Thermostat\n Entertainment.children = AudioSystem + VideoSystem + GamingConsole\n}\n\nrun {} for 10 ", "permalink": "glue-okay-hazing-prune", "time": "2024-06-26 19:19:34.971100", "cmd": 1} {"id": 13480, "parent": 13479, "code": "sig A {\n\n}", "permalink": "spew-many-perish-depict", "time": "2024-06-27 07:17:34.988016", "cmd": 1} {"id": 13482, "parent": null, "code": "sig A {\n\n}", "permalink": "reply-wand-dolly-void", "time": "2024-06-27 07:18:38.466253", "cmd": 1} {"id": 13488, "parent": 13487, "code": "sig A {\n\n}\n\nassert a1 {\n not #A = 5\n}\n\ncheck a1", "permalink": "cackle-plug-fridge-wheat", "time": "2024-06-27 08:44:44.448272", "cmd": 1} {"id": 13494, "parent": null, "code": "module appendixA/addressBook2\n\nsig Addr, Name { }\n\nsig Book {\n\taddr: Name -> (Name + Addr)\n\t}\n\npred inv [b: Book] {\n\tlet addr = b.addr |\n\t\tall n: Name {\n\t\t\tn not in n.^addr\n\t\t\tsome addr.n => some n.^addr & Addr\n\t\t}\n\t}\n\npred add [b, b\": Book, n: Name, t: Name+Addr] {\n\tb\".addr = b.addr + n->t\n\t}\n\npred del [b, b\": Book, n: Name, t: Name+Addr] {\n\tb\".addr = b.addr - n->t\n\t}\n\nfun lookup [b: Book, n: Name] : set Addr {\n\tn.^(b.addr) & Addr\n\t}", "permalink": "take-agile-throng-alone", "time": "2024-06-28 16:29:02.085667", "cmd": 1} {"id": 13501, "parent": null, "code": "sig A{}", "permalink": "slaw-banker-wife-sludge", "time": "2024-07-02 11:20:06.654458", "cmd": 1} {"id": 13079, "parent": null, "code": "sig A{}\nrun {}", "permalink": "pledge-compel-jolly-share", "time": "2024-06-05 19:00:20.079280", "cmd": 1} {"id": 13081, "parent": null, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\nabstract sig Person {}\n\nsig Director extends Person {\n hasDirected: some Movie,\n hasWorkedWith: some Actor\n}\n\nsig Actor extends Person {\n hasWorkedWith: {some Director + set Actor} \n} {\n this not in hasWorkedWith\n}\n\nsig Movie {\n\n}\n\nsig Cast {\n\n}\n\n\nrun {}", "permalink": "excuse-feast-subtly-rework", "time": "2024-06-06 05:53:04.287505", "cmd": 1} {"id": 13082, "parent": 13081, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all Files in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n all f: \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "hamper-unmade-silent-grill", "time": "2024-06-06 06:15:24.861141", "cmd": 1} {"id": 13083, "parent": 13082, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n", "permalink": "trend-send-catchy-chop", "time": "2024-06-06 06:16:03.356865", "cmd": 1} {"id": 13084, "parent": 13083, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n all Files in Trash\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n all f: \n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "pencil-drool-chef-each", "time": "2024-06-06 06:16:20.686233", "cmd": 2} {"id": 13418, "parent": null, "code": "sig A{}\nrun{}", "permalink": "survey-elm-rubble-rewrap", "time": "2024-06-25 09:38:59.616863", "cmd": 1} {"id": 13420, "parent": 13419, "code": "var sig A{\n var others: set A\n}\nrun {no A and always eventually some A}", "permalink": "idiom-draw-tingle-dash", "time": "2024-06-25 09:43:36.558911", "cmd": 1} {"id": 13422, "parent": 13421, "code": "var sig A{\n var others: set A\n}\nrun {always (\n no A and eventually some A\n) }", "permalink": "monday-crispy-duh-bless", "time": "2024-06-25 09:45:01.544769", "cmd": 1} {"id": 13424, "parent": 13423, "code": "var sig A{\n var others: set A\n var self: A\n}\nrun {(always eventually some A) and (always eventually no A) }", "permalink": "worry-suitor-hurry-bunch", "time": "2024-06-25 09:48:19.619801", "cmd": 1} {"id": 13426, "parent": 13425, "code": "var sig A{\n var others: set A,\n var self: A\n}\n\nvar sig B {\n var others: set B,\n}\nrun {(always eventually some A) and (always eventually no A) }", "permalink": "valid-grower-frenzy-utmost", "time": "2024-06-25 09:54:37.326108", "cmd": 1} {"id": 13445, "parent": 13444, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children = 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "tackle-kimono-dainty-entity", "time": "2024-06-26 10:17:49.664114", "cmd": 1} {"id": 13450, "parent": 13449, "code": "\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n 1 = # children & AddressingScheme\n 1 = # children & Channels\n 1 = # children & Movement\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children = 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "shock-error-moaner-kelp", "time": "2024-06-26 10:28:49.355869", "cmd": 1} {"id": 13458, "parent": 13457, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 4\n some AddressingScheme and some Channels and some Movement and some Member\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children >= 1\n # children <= 1\n some Regular and some Compact\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "savior-halt-payer-sandal", "time": "2024-06-26 10:38:20.726004", "cmd": 1} {"id": 13467, "parent": 13466, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 3\n # children <= 4\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 1\n # children & Compact <= 1\n # children >= 0\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "veto-gong-trace-spiny", "time": "2024-06-26 10:45:29.139301", "cmd": 1} {"id": 13471, "parent": 13470, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 3\n # children <= 4\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 1\n # children & Compact <= 1\n # children >= 1\n # children <= 2\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "deport-kooky-robe-rhyme", "time": "2024-06-26 10:47:42.690599", "cmd": 1} {"id": 13473, "parent": 13459, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 4\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children >= 1\n # children <= 1\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10", "permalink": "unsure-deuce-sprint-pastel", "time": "2024-06-26 10:49:38.552068", "cmd": 1} {"id": 13479, "parent": 13478, "code": "one sig A {\n \n}", "permalink": "retold-dangle-tried-proven", "time": "2024-06-27 07:17:28.031116", "cmd": 1} {"id": 13490, "parent": 13482, "code": "sig A {\n\n}", "permalink": "omen-zit-undone-septic", "time": "2024-06-27 08:52:22.080978", "cmd": 1} {"id": 13503, "parent": 13502, "code": "sig A{}", "permalink": "fiber-alto-ploy-couch", "time": "2024-07-02 11:24:03.108796", "cmd": 1} {"id": 13524, "parent": null, "code": "var sig File {}\nvar sig Trash in File {}\n\npred delete [f: File] {\n\tf not in Trash\n\tTrash' = Trash + f\n\tFile' = File\n}\n\npred restore [f: File] {\n\tf in Trash\n\tTrash' = Trash - f\n\tFile' = File\n}\n\npred empty {\n\tsome Trash\n\tno Trash'\n\tFile' = File - Trash\n}\n\npred do_nothing {\n\tFile' = File\n\tTrash' = Trash\n}\n\npred restoreEnabled [f:File] {\n f in Trash\n}\n\nfact Behaviour {\n\tno Trash\n\talways {\n//\t\t(some f: File | delete[f] or restore[f]) or empty\n\t\t(some f: File | delete[f] or restore[f]) or empty or do_nothing\n\t}\n} \n\nexample: run {}\n\nassert restoreAfterDelete {\n\talways (all f : File | restore[f] implies once delete[f])\n}\n\ncheck restoreAfterDelete for 10 steps\ncheck restoreAfterDelete for 1.. steps\n\nassert deleteAll {\n//\talways ((File in Trash and empty) implies always no File)\n\talways ((File in Trash and empty) implies after always no File)\n}\n\ncheck deleteAll\n\ncheck Exercise1 {\n\t-- The set of files never increases\n\talways (File' in File)\n}\n\n\ncheck Exercise2 {\n\t-- The set of files only changes when empty is performed\n\talways (File' != File implies empty)\n}\n\ncheck Exercise3 {\n (always all f : File | not delete[f]) implies always not empty\n}\n\ncheck Exercise4 {\n\t-- Once you have no files you never have files again\n\talways (no File implies always no File)\n}\n\nassert restoreIsPossibleBeforeEmpty {\n -- a deleted file can still be restored if the trash is not emptied\n -- always (all f:File | delete[f] implies (empty releases restoreEnabled[f]))\n -- always (all f:File | delete[f] implies ((empty or restore[f]) releases restoreEnabled[f]))\n always (all f:File | delete[f] implies after ((empty or restore[f]) releases restoreEnabled[f]))\n}\n\ncheck restoreIsPossibleBeforeEmpty for 3 but 1.. steps", "permalink": "data-liking-ritzy-santa", "time": "2024-07-02 21:20:54.652047", "cmd": 3} {"id": 13532, "parent": 13531, "code": "var sig File {}\nvar sig Trash in File {}\n\npred delete [f: File] {\n\tf not in Trash\n\tTrash' = Trash + f\n\tFile' = File\n}\n\npred restore [f: File] {\n\tf in Trash\n\tTrash' = Trash - f\n\tFile' = File\n}\n\npred empty {\n\tsome Trash\n\tno Trash'\n\tFile' = File - Trash\n}\n\npred do_nothing {\n\tFile' = File\n\tTrash' = Trash\n}\n\npred restoreEnabled [f:File] {\n f in Trash\n}\n\nfact Behaviour {\n\tno Trash\n\talways {\n//\t\t(some f: File | delete[f] or restore[f]) or empty\n\t\t(some f: File | delete[f] or restore[f]) or empty or do_nothing\n\t}\n} \n\nrun {}\n\nassert restoreAfterDelete {\n\talways (all f : File | restore[f] implies once delete[f])\n}\n\ncheck restoreAfterDelete for 10 steps\ncheck restoreAfterDelete for 1.. steps\n\nassert deleteAll {\n//\talways ((File in Trash and empty) implies always no File)\n\talways ((File in Trash and empty) implies after always no File)\n}\n\ncheck deleteAll\n\ncheck Exercise1 {\n\t-- The set of files never increases\n\talways (File' in File)\n}\n\n\ncheck Exercise2 {\n\t-- The set of files only changes when empty is performed\n\talways (File' != File implies empty)\n}\n\ncheck Exercise3 {\n (always all f : File | not delete[f]) implies always not empty\n}\n\ncheck Exercise4 {\n\t-- Once you have no files you never have files again\n\talways (no File implies always no File)\n}\n\nassert restoreIsPossibleBeforeEmpty {\n -- a deleted file can still be restored if the trash is not emptied\n -- always (all f:File | delete[f] implies (empty releases restoreEnabled[f]))\n -- always (all f:File | delete[f] implies ((empty or restore[f]) releases restoreEnabled[f]))\n always (all f:File | delete[f] implies after ((empty or restore[f]) releases restoreEnabled[f]))\n}\n\ncheck restoreIsPossibleBeforeEmpty for 3 but 1.. steps", "permalink": "reflux-sheath-veal-pelt", "time": "2024-07-02 21:34:38.291787", "cmd": 1} {"id": 13535, "parent": 13534, "code": "var sig File {}\nvar sig Trash in File {}\n\npred delete [f: File] {\n\tf not in Trash\n\tTrash' = Trash + f\n\tFile' = File\n}\n\npred restore [f: File] {\n\tf in Trash\n\tTrash' = Trash - f\n\tFile' = File\n}\n\npred empty {\n\tsome Trash\n\tno Trash'\n\tFile' = File - Trash\n}\n\npred do_nothing {\n\tFile' = File\n\tTrash' = Trash\n}\n\npred restoreEnabled [f:File] {\n f in Trash\n}\n\nfact Behaviour {\n\tno Trash\n\talways {\n//\t\t(some f: File | delete[f] or restore[f]) or empty\n\t\t(some f: File | delete[f] or restore[f]) or empty or do_nothing\n\t}\n} \n\nrun {}\n\nassert restoreAfterDelete {\n\talways (all f : File | restore[f] implies once delete[f])\n}\n\ncheck restoreAfterDelete for 10 steps\ncheck restoreAfterDelete for 1.. steps\n\nassert deleteAll {\n//\talways ((File in Trash and empty) implies always no File)\n\talways ((File in Trash and empty) implies after always no File)\n}\n\ncheck deleteAll\n\ncheck Exercise1 {\n\t-- The set of files never increases\n\talways (File' in File)\n}\n\n\ncheck Exercise2 {\n\t-- The set of files only changes when empty is performed\n\talways (File' != File implies empty)\n}\n\ncheck Exercise3 {\n (always all f : File | not delete[f]) implies always not empty\n}\n\ncheck Exercise4 {\n\t-- Once you have no files you never have files again\n\talways (no File implies always no File)\n}\n\nassert restoreIsPossibleBeforeEmpty {\n -- a deleted file can still be restored if the trash is not emptied\n -- always (all f:File | delete[f] implies (empty releases restoreEnabled[f]))\n -- always (all f:File | delete[f] implies ((empty or restore[f]) releases restoreEnabled[f]))\n always (all f:File | delete[f] implies after ((empty or restore[f]) releases restoreEnabled[f]))\n}\n\ncheck restoreIsPossibleBeforeEmpty for 3 but 1.. steps", "permalink": "gown-corny-mop-bunny", "time": "2024-07-02 21:35:23.811809", "cmd": 3} {"id": 13089, "parent": 7297, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "mud-sneak-book-poser", "time": "2024-06-06 11:13:05.743357", "cmd": 1} {"id": 13502, "parent": 13501, "code": "sig A{}\n\nrun {} for 3", "permalink": "anger-wafer-plated-ankle", "time": "2024-07-02 11:20:31.366853", "cmd": 1} {"id": 13504, "parent": 13503, "code": "sig A {\n s : some A\n}\n\n\n", "permalink": "sudoku-clock-rage-video", "time": "2024-07-02 11:40:08.841086", "cmd": 1} {"id": 13505, "parent": null, "code": "sig A { j: set A}", "permalink": "raging-abide-juicy-guts", "time": "2024-07-02 12:51:24.813719", "cmd": 1} {"id": 13526, "parent": 13525, "code": "var sig File {}\nvar sig Trash in File {}\n\npred delete [f: File] {\n\tf not in Trash\n\tTrash' = Trash + f\n\tFile' = File\n}\n\npred restore [f: File] {\n\tf in Trash\n\tTrash' = Trash - f\n\tFile' = File\n}\n\npred empty {\n\tsome Trash\n\tno Trash'\n\tFile' = File - Trash\n}\n\npred do_nothing {\n\tFile' = File\n\tTrash' = Trash\n}\n\npred restoreEnabled [f:File] {\n f in Trash\n}\n\nfact Behaviour {\n\tno Trash\n\talways {\n//\t\t(some f: File | delete[f] or restore[f]) or empty\n\t\t(some f: File | delete[f] or restore[f]) or empty or do_nothing\n\t}\n} \n\nrun {}\n\nassert restoreAfterDelete {\n\talways (all f : File | restore[f] implies once delete[f])\n}\n\ncheck restoreAfterDelete for 10 steps\ncheck restoreAfterDelete for 1.. steps\n\nassert deleteAll {\n//\talways ((File in Trash and empty) implies always no File)\n\talways ((File in Trash and empty) implies after always no File)\n}\n\ncheck deleteAll\n\ncheck Exercise1 {\n\t-- The set of files never increases\n\talways (File' in File)\n}\n\n\ncheck Exercise2 {\n\t-- The set of files only changes when empty is performed\n\talways (File' != File implies empty)\n}\n\ncheck Exercise3 {\n (always all f : File | not delete[f]) implies always not empty\n}\n\ncheck Exercise4 {\n\t-- Once you have no files you never have files again\n\talways (no File implies always no File)\n}\n\nassert restoreIsPossibleBeforeEmpty {\n -- a deleted file can still be restored if the trash is not emptied\n -- always (all f:File | delete[f] implies (empty releases restoreEnabled[f]))\n -- always (all f:File | delete[f] implies ((empty or restore[f]) releases restoreEnabled[f]))\n always (all f:File | delete[f] implies after ((empty or restore[f]) releases restoreEnabled[f]))\n}\n\ncheck restoreIsPossibleBeforeEmpty for 3 but 1.. steps", "permalink": "deuce-tried-sworn-morse", "time": "2024-07-02 21:22:17.953568", "cmd": 1} {"id": 13528, "parent": 13527, "code": "var sig File {}\nvar sig Trash in File {}\n\npred delete [f: File] {\n\tf not in Trash\n\tTrash' = Trash + f\n\tFile' = File\n}\n\npred restore [f: File] {\n\tf in Trash\n\tTrash' = Trash - f\n\tFile' = File\n}\n\npred empty {\n\tsome Trash\n\tno Trash'\n\tFile' = File - Trash\n}\n\npred do_nothing {\n\tFile' = File\n\tTrash' = Trash\n}\n\npred restoreEnabled [f:File] {\n f in Trash\n}\n\nfact Behaviour {\n\tno Trash\n\talways {\n//\t\t(some f: File | delete[f] or restore[f]) or empty\n\t\t(some f: File | delete[f] or restore[f]) or empty or do_nothing\n\t}\n} \n\nrun {}\n\nassert restoreAfterDelete {\n\talways (all f : File | restore[f] implies once delete[f])\n}\n\ncheck restoreAfterDelete for 10 steps\ncheck restoreAfterDelete for 1.. steps\n\nassert deleteAll {\n//\talways ((File in Trash and empty) implies always no File)\n\talways ((File in Trash and empty) implies after always no File)\n}\n\ncheck deleteAll\n\ncheck Exercise1 {\n\t-- The set of files never increases\n\talways (File' in File)\n}\n\n\ncheck Exercise2 {\n\t-- The set of files only changes when empty is performed\n\talways (File' != File implies empty)\n}\n\ncheck Exercise3 {\n (always all f : File | not delete[f]) implies always not empty\n}\n\ncheck Exercise4 {\n\t-- Once you have no files you never have files again\n\talways (no File implies always no File)\n}\n\nassert restoreIsPossibleBeforeEmpty {\n -- a deleted file can still be restored if the trash is not emptied\n -- always (all f:File | delete[f] implies (empty releases restoreEnabled[f]))\n -- always (all f:File | delete[f] implies ((empty or restore[f]) releases restoreEnabled[f]))\n always (all f:File | delete[f] implies after ((empty or restore[f]) releases restoreEnabled[f]))\n}\n\ncheck restoreIsPossibleBeforeEmpty for 3 but 1.. steps", "permalink": "perm-anemic-reverb-faster", "time": "2024-07-02 21:23:00.733562", "cmd": 9} {"id": 13529, "parent": null, "code": "var sig File {}\nvar sig Trash in File {}\n\npred delete [f: File] {\n\tf not in Trash\n\tTrash' = Trash + f\n\tFile' = File\n}\n\npred restore [f: File] {\n\tf in Trash\n\tTrash' = Trash - f\n\tFile' = File\n}\n\npred empty {\n\tsome Trash\n\tno Trash'\n\tFile' = File - Trash\n}\n\npred do_nothing {\n\tFile' = File\n\tTrash' = Trash\n}\n\npred restoreEnabled [f:File] {\n f in Trash\n}\n\nfact Behaviour {\n\tno Trash\n\talways {\n//\t\t(some f: File | delete[f] or restore[f]) or empty\n\t\t(some f: File | delete[f] or restore[f]) or empty or do_nothing\n\t}\n} \n\nrun {}\n\nassert restoreAfterDelete {\n\talways (all f : File | restore[f] implies once delete[f])\n}\n\ncheck restoreAfterDelete for 10 steps\ncheck restoreAfterDelete for 1.. steps\n\nassert deleteAll {\n//\talways ((File in Trash and empty) implies always no File)\n\talways ((File in Trash and empty) implies after always no File)\n}\n\ncheck deleteAll\n\ncheck Exercise1 {\n\t-- The set of files never increases\n\talways (File' in File)\n}\n\n\ncheck Exercise2 {\n\t-- The set of files only changes when empty is performed\n\talways (File' != File implies empty)\n}\n\ncheck Exercise3 {\n (always all f : File | not delete[f]) implies always not empty\n}\n\ncheck Exercise4 {\n\t-- Once you have no files you never have files again\n\talways (no File implies always no File)\n}\n\nassert restoreIsPossibleBeforeEmpty {\n -- a deleted file can still be restored if the trash is not emptied\n -- always (all f:File | delete[f] implies (empty releases restoreEnabled[f]))\n -- always (all f:File | delete[f] implies ((empty or restore[f]) releases restoreEnabled[f]))\n always (all f:File | delete[f] implies after ((empty or restore[f]) releases restoreEnabled[f]))\n}\n\ncheck restoreIsPossibleBeforeEmpty for 3 but 1.. steps", "permalink": "catchy-afoot-player-dweeb", "time": "2024-07-02 21:23:38.225295", "cmd": 9} {"id": 13537, "parent": 13536, "code": "var sig File {}\nvar sig Trash in File {}\n\npred delete [f: File] {\n\tf not in Trash\n\tTrash' = Trash + f\n\tFile' = File\n}\n\npred restore [f: File] {\n\tf in Trash\n\tTrash' = Trash - f\n\tFile' = File\n}\n\npred empty {\n\tsome Trash\n\tno Trash'\n\tFile' = File - Trash\n}\n\npred do_nothing {\n\tFile' = File\n\tTrash' = Trash\n}\n\npred restoreEnabled [f:File] {\n f in Trash\n}\n\nfact Behaviour {\n\tno Trash\n\talways {\n//\t\t(some f: File | delete[f] or restore[f]) or empty\n\t\t(some f: File | delete[f] or restore[f]) or empty or do_nothing\n\t}\n} \n\nrun {}\n\nassert restoreAfterDelete {\n\talways (all f : File | restore[f] implies once delete[f])\n}\n\ncheck restoreAfterDelete for 10 steps\ncheck restoreAfterDelete for 1.. steps\n\nassert deleteAll {\n//\talways ((File in Trash and empty) implies always no File)\n\talways ((File in Trash and empty) implies after always no File)\n}\n\ncheck deleteAll\n\ncheck Exercise1 {\n\t-- The set of files never increases\n\talways (File' in File)\n}\n\n\ncheck Exercise2 {\n\t-- The set of files only changes when empty is performed\n\talways (File' != File implies empty)\n}\n\ncheck Exercise3 {\n (always all f : File | not delete[f]) implies always not empty\n}\n\ncheck Exercise4 {\n\t-- Once you have no files you never have files again\n\talways (no File implies always no File)\n}\n\nassert restoreIsPossibleBeforeEmpty {\n -- a deleted file can still be restored if the trash is not emptied\n -- always (all f:File | delete[f] implies (empty releases restoreEnabled[f]))\n -- always (all f:File | delete[f] implies ((empty or restore[f]) releases restoreEnabled[f]))\n always (all f:File | delete[f] implies after ((empty or restore[f]) releases restoreEnabled[f]))\n}\n\ncheck restoreIsPossibleBeforeEmpty for 3 but 1.. steps", "permalink": "aloha-royal-neatly-stereo", "time": "2024-07-02 21:37:44.555382", "cmd": 1} {"id": 13539, "parent": 13538, "code": "sig A {}", "permalink": "gallon-resort-map-seduce", "time": "2024-07-02 21:40:26.748713", "cmd": 1} {"id": 13849, "parent": null, "code": "sig List {}\n\nsig Node {}\n\nrun {}", "permalink": "thread-lazily-baggy-lemon", "time": "2024-07-10 07:06:50.224185", "cmd": 1} {"id": 13850, "parent": 13849, "code": "sig List {\n one List\n}\n\nsig Node {}\n\nrun {}", "permalink": "reply-baking-deny-poster", "time": "2024-07-10 07:08:28.375085", "cmd": 1} {"id": 13855, "parent": 13854, "code": "sig Node {\n next: lone Node\n}\n\nsig List {\n header : lone Node\n}\n\nrun {}", "permalink": "legend-harsh-tacky-pogo", "time": "2024-07-10 07:12:31.509109", "cmd": 1} {"id": 13090, "parent": 13089, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "antsy-lagged-shy-easily", "time": "2024-06-06 11:13:20.421812", "cmd": 8} {"id": 13530, "parent": 13529, "code": "var sig File {}\nvar sig Trash in File {}\n\npred delete [f: File] {\n\tf not in Trash\n\tTrash' = Trash + f\n\tFile' = File\n}\n\npred restore [f: File] {\n\tf in Trash\n\tTrash' = Trash - f\n\tFile' = File\n}\n\npred empty {\n\tsome Trash\n\tno Trash'\n\tFile' = File - Trash\n}\n\npred do_nothing {\n\tFile' = File\n\tTrash' = Trash\n}\n\npred restoreEnabled [f:File] {\n f in Trash\n}\n\nfact Behaviour {\n\tno Trash\n\talways {\n//\t\t(some f: File | delete[f] or restore[f]) or empty\n\t\t(some f: File | delete[f] or restore[f]) or empty or do_nothing\n\t}\n} \n\nrun {}\n\nassert restoreAfterDelete {\n\talways (all f : File | restore[f] implies once delete[f])\n}\n\ncheck restoreAfterDelete for 10 steps\ncheck restoreAfterDelete for 1.. steps\n\nassert deleteAll {\n//\talways ((File in Trash and empty) implies always no File)\n\talways ((File in Trash and empty) implies after always no File)\n}\n\ncheck deleteAll\n\ncheck Exercise1 {\n\t-- The set of files never increases\n\talways (File' in File)\n}\n\n\ncheck Exercise2 {\n\t-- The set of files only changes when empty is performed\n\talways (File' != File implies empty)\n}\n\ncheck Exercise3 {\n (always all f : File | not delete[f]) implies always not empty\n}\n\ncheck Exercise4 {\n\t-- Once you have no files you never have files again\n\talways (no File implies always no File)\n}\n\nassert restoreIsPossibleBeforeEmpty {\n -- a deleted file can still be restored if the trash is not emptied\n -- always (all f:File | delete[f] implies (empty releases restoreEnabled[f]))\n -- always (all f:File | delete[f] implies ((empty or restore[f]) releases restoreEnabled[f]))\n always (all f:File | delete[f] implies after ((empty or restore[f]) releases restoreEnabled[f]))\n}\n\ncheck restoreIsPossibleBeforeEmpty for 3 but 1.. steps", "permalink": "spur-easel-smoky-creme", "time": "2024-07-02 21:24:16.408043", "cmd": 9} {"id": 13531, "parent": 13530, "code": "var sig File {}\nvar sig Trash in File {}\n\npred delete [f: File] {\n\tf not in Trash\n\tTrash' = Trash + f\n\tFile' = File\n}\n\npred restore [f: File] {\n\tf in Trash\n\tTrash' = Trash - f\n\tFile' = File\n}\n\npred empty {\n\tsome Trash\n\tno Trash'\n\tFile' = File - Trash\n}\n\npred do_nothing {\n\tFile' = File\n\tTrash' = Trash\n}\n\npred restoreEnabled [f:File] {\n f in Trash\n}\n\nfact Behaviour {\n\tno Trash\n\talways {\n//\t\t(some f: File | delete[f] or restore[f]) or empty\n\t\t(some f: File | delete[f] or restore[f]) or empty or do_nothing\n\t}\n} \n\nrun {}\n\nassert restoreAfterDelete {\n\talways (all f : File | restore[f] implies once delete[f])\n}\n\ncheck restoreAfterDelete for 10 steps\ncheck restoreAfterDelete for 1.. steps\n\nassert deleteAll {\n//\talways ((File in Trash and empty) implies always no File)\n\talways ((File in Trash and empty) implies after always no File)\n}\n\ncheck deleteAll\n\ncheck Exercise1 {\n\t-- The set of files never increases\n\talways (File' in File)\n}\n\n\ncheck Exercise2 {\n\t-- The set of files only changes when empty is performed\n\talways (File' != File implies empty)\n}\n\ncheck Exercise3 {\n (always all f : File | not delete[f]) implies always not empty\n}\n\ncheck Exercise4 {\n\t-- Once you have no files you never have files again\n\talways (no File implies always no File)\n}\n\nassert restoreIsPossibleBeforeEmpty {\n -- a deleted file can still be restored if the trash is not emptied\n -- always (all f:File | delete[f] implies (empty releases restoreEnabled[f]))\n -- always (all f:File | delete[f] implies ((empty or restore[f]) releases restoreEnabled[f]))\n always (all f:File | delete[f] implies after ((empty or restore[f]) releases restoreEnabled[f]))\n}\n\ncheck restoreIsPossibleBeforeEmpty for 3 but 1.. steps", "permalink": "boxer-attic-curve-sleet", "time": "2024-07-02 21:29:24.829033", "cmd": 9} {"id": 13534, "parent": 13533, "code": "var sig File {}\nvar sig Trash in File {}\n\npred delete [f: File] {\n\tf not in Trash\n\tTrash' = Trash + f\n\tFile' = File\n}\n\npred restore [f: File] {\n\tf in Trash\n\tTrash' = Trash - f\n\tFile' = File\n}\n\npred empty {\n\tsome Trash\n\tno Trash'\n\tFile' = File - Trash\n}\n\npred do_nothing {\n\tFile' = File\n\tTrash' = Trash\n}\n\npred restoreEnabled [f:File] {\n f in Trash\n}\n\nfact Behaviour {\n\tno Trash\n\talways {\n//\t\t(some f: File | delete[f] or restore[f]) or empty\n\t\t(some f: File | delete[f] or restore[f]) or empty or do_nothing\n\t}\n} \n\nrun {}\n\nassert restoreAfterDelete {\n\talways (all f : File | restore[f] implies once delete[f])\n}\n\ncheck restoreAfterDelete for 10 steps\ncheck restoreAfterDelete for 1.. steps\n\nassert deleteAll {\n//\talways ((File in Trash and empty) implies always no File)\n\talways ((File in Trash and empty) implies after always no File)\n}\n\ncheck deleteAll\n\ncheck Exercise1 {\n\t-- The set of files never increases\n\talways (File' in File)\n}\n\n\ncheck Exercise2 {\n\t-- The set of files only changes when empty is performed\n\talways (File' != File implies empty)\n}\n\ncheck Exercise3 {\n (always all f : File | not delete[f]) implies always not empty\n}\n\ncheck Exercise4 {\n\t-- Once you have no files you never have files again\n\talways (no File implies always no File)\n}\n\nassert restoreIsPossibleBeforeEmpty {\n -- a deleted file can still be restored if the trash is not emptied\n -- always (all f:File | delete[f] implies (empty releases restoreEnabled[f]))\n -- always (all f:File | delete[f] implies ((empty or restore[f]) releases restoreEnabled[f]))\n always (all f:File | delete[f] implies after ((empty or restore[f]) releases restoreEnabled[f]))\n}\n\ncheck restoreIsPossibleBeforeEmpty for 3 but 1.. steps", "permalink": "ramrod-rage-visor-abide", "time": "2024-07-02 21:35:18.905346", "cmd": 2} {"id": 13536, "parent": 13535, "code": "var sig File {}\nvar sig Trash in File {}\n\npred delete [f: File] {\n\tf not in Trash\n\tTrash' = Trash + f\n\tFile' = File\n}\n\npred restore [f: File] {\n\tf in Trash\n\tTrash' = Trash - f\n\tFile' = File\n}\n\npred empty {\n\tsome Trash\n\tno Trash'\n\tFile' = File - Trash\n}\n\npred do_nothing {\n\tFile' = File\n\tTrash' = Trash\n}\n\npred restoreEnabled [f:File] {\n f in Trash\n}\n\nfact Behaviour {\n\tno Trash\n\talways {\n//\t\t(some f: File | delete[f] or restore[f]) or empty\n\t\t(some f: File | delete[f] or restore[f]) or empty or do_nothing\n\t}\n} \n\nrun {}\n\nassert restoreAfterDelete {\n\talways (all f : File | restore[f] implies once delete[f])\n}\n\ncheck restoreAfterDelete for 10 steps\ncheck restoreAfterDelete for 1.. steps\n\nassert deleteAll {\n//\talways ((File in Trash and empty) implies always no File)\n\talways ((File in Trash and empty) implies after always no File)\n}\n\ncheck deleteAll\n\ncheck Exercise1 {\n\t-- The set of files never increases\n\talways (File' in File)\n}\n\n\ncheck Exercise2 {\n\t-- The set of files only changes when empty is performed\n\talways (File' != File implies empty)\n}\n\ncheck Exercise3 {\n (always all f : File | not delete[f]) implies always not empty\n}\n\ncheck Exercise4 {\n\t-- Once you have no files you never have files again\n\talways (no File implies always no File)\n}\n\nassert restoreIsPossibleBeforeEmpty {\n -- a deleted file can still be restored if the trash is not emptied\n -- always (all f:File | delete[f] implies (empty releases restoreEnabled[f]))\n -- always (all f:File | delete[f] implies ((empty or restore[f]) releases restoreEnabled[f]))\n always (all f:File | delete[f] implies after ((empty or restore[f]) releases restoreEnabled[f]))\n}\n\ncheck restoreIsPossibleBeforeEmpty for 3 but 1.. steps", "permalink": "busboy-wound-replay-dingo", "time": "2024-07-02 21:35:35.546649", "cmd": 1} {"id": 13538, "parent": 13537, "code": "sig A {}", "permalink": "walk-strep-dweeb-salsa", "time": "2024-07-02 21:38:03.491860", "cmd": 1} {"id": 13851, "parent": 13850, "code": "sig List {\n this: one List\n}\n\nsig Node {}\n\nrun {}", "permalink": "aflame-unsnap-ahoy-derby", "time": "2024-07-10 07:08:50.186558", "cmd": 1} {"id": 13852, "parent": 13851, "code": "sig List {\n this: one List\n}\n\nsig Node {}\n\nrun {}", "permalink": "violin-crate-dander-whinny", "time": "2024-07-10 07:08:52.009766", "cmd": 1} {"id": 13854, "parent": 13853, "code": "sig Node {}\n\nsig List {\n header : lone Node\n}\n\nrun {}", "permalink": "slurp-uneasy-outage-eats", "time": "2024-07-10 07:11:20.984542", "cmd": 1} {"id": 13856, "parent": 13855, "code": "sig Node {\n next: lone Node\n}\n\none sig List {\n header : lone Node\n}\n\nrun {}", "permalink": "among-sassy-grunt-tarmac", "time": "2024-07-10 07:13:07.251253", "cmd": 1} {"id": 13857, "parent": 7058, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\nsig Player{\n\n}\n\nsig piano{\n player : one Player\n}\n\nrun {}", "permalink": "drove-rush-ladies-eatery", "time": "2024-07-11 05:38:41.055906", "cmd": 1} {"id": 13861, "parent": 13860, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\nsig Player{\n id : Int,\n age: Int\n\n}\n\nlone sig piano{\n player : one Player\n}\n\nlone \n\nrun {}", "permalink": "cosmic-trio-tidy-motion", "time": "2024-07-11 05:40:09.956816", "cmd": 1} {"id": 13862, "parent": 13861, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\nsig Player{\n id : Int,\n age: Int\n\n}\n\nlone sig piano{\n player : one Player\n}\n\n\nrun {}", "permalink": "user-ramrod-uproot-mobile", "time": "2024-07-11 05:40:14.221117", "cmd": 1} {"id": 13863, "parent": 13862, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\nsig Player{\n id : Int,\n age: Int\n\n}\n\nlone sig piano{\n player : one Player\n}\n\n\nrun {}", "permalink": "goofy-debunk-aging-epic", "time": "2024-07-11 05:40:20.238957", "cmd": 1} {"id": 13864, "parent": 13863, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\nsig Player{\n id : Int,\n age: Int\n\n}\n\nlone sig piano{\n player : one Player\n}\n\n\nrun {}", "permalink": "hubcap-yearly-duvet-sauna", "time": "2024-07-11 05:40:40.860280", "cmd": 1} {"id": 13866, "parent": 7058, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\nsig Player{\n id : Int,\n age: Int\n}\n\nlone sig Piano{\n player : one Player,\n pianoID: Int\n}\n\nsig Violin {\n player: set Player,\n violinID: Int\n}\n\none sig Constructor extends Player {\n leader: one Player,\n experience: Int\n}\n\nfact PlayerRoleConstraint {\n all p: Player | (p in Piano.player) implies (p not in Violin.player)\n}\n\nfact noConstuctorNoOrchestra{\n no Constructor implies no Player\n}\n\n\nrun {} ", "permalink": "scoop-whoops-settle-stilt", "time": "2024-07-11 05:58:12.407980", "cmd": 1} {"id": 13527, "parent": 13526, "code": "var sig File {}\nvar sig Trash in File {}\n\npred delete [f: File] {\n\tf not in Trash\n\tTrash' = Trash + f\n\tFile' = File\n}\n\npred restore [f: File] {\n\tf in Trash\n\tTrash' = Trash - f\n\tFile' = File\n}\n\npred empty {\n\tsome Trash\n\tno Trash'\n\tFile' = File - Trash\n}\n\npred do_nothing {\n\tFile' = File\n\tTrash' = Trash\n}\n\npred restoreEnabled [f:File] {\n f in Trash\n}\n\nfact Behaviour {\n\tno Trash\n\talways {\n//\t\t(some f: File | delete[f] or restore[f]) or empty\n\t\t(some f: File | delete[f] or restore[f]) or empty or do_nothing\n\t}\n} \n\nrun {}\n\nassert restoreAfterDelete {\n\talways (all f : File | restore[f] implies once delete[f])\n}\n\ncheck restoreAfterDelete for 10 steps\ncheck restoreAfterDelete for 1.. steps\n\nassert deleteAll {\n//\talways ((File in Trash and empty) implies always no File)\n\talways ((File in Trash and empty) implies after always no File)\n}\n\ncheck deleteAll\n\ncheck Exercise1 {\n\t-- The set of files never increases\n\talways (File' in File)\n}\n\n\ncheck Exercise2 {\n\t-- The set of files only changes when empty is performed\n\talways (File' != File implies empty)\n}\n\ncheck Exercise3 {\n (always all f : File | not delete[f]) implies always not empty\n}\n\ncheck Exercise4 {\n\t-- Once you have no files you never have files again\n\talways (no File implies always no File)\n}\n\nassert restoreIsPossibleBeforeEmpty {\n -- a deleted file can still be restored if the trash is not emptied\n -- always (all f:File | delete[f] implies (empty releases restoreEnabled[f]))\n -- always (all f:File | delete[f] implies ((empty or restore[f]) releases restoreEnabled[f]))\n always (all f:File | delete[f] implies after ((empty or restore[f]) releases restoreEnabled[f]))\n}\n\ncheck restoreIsPossibleBeforeEmpty for 3 but 1.. steps", "permalink": "rogue-detail-denim-hate", "time": "2024-07-02 21:22:27.302771", "cmd": 2} {"id": 13533, "parent": 13532, "code": "var sig File {}\nvar sig Trash in File {}\n\npred delete [f: File] {\n\tf not in Trash\n\tTrash' = Trash + f\n\tFile' = File\n}\n\npred restore [f: File] {\n\tf in Trash\n\tTrash' = Trash - f\n\tFile' = File\n}\n\npred empty {\n\tsome Trash\n\tno Trash'\n\tFile' = File - Trash\n}\n\npred do_nothing {\n\tFile' = File\n\tTrash' = Trash\n}\n\npred restoreEnabled [f:File] {\n f in Trash\n}\n\nfact Behaviour {\n\tno Trash\n\talways {\n//\t\t(some f: File | delete[f] or restore[f]) or empty\n\t\t(some f: File | delete[f] or restore[f]) or empty or do_nothing\n\t}\n} \n\nrun {}\n\nassert restoreAfterDelete {\n\talways (all f : File | restore[f] implies once delete[f])\n}\n\ncheck restoreAfterDelete for 10 steps\ncheck restoreAfterDelete for 1.. steps\n\nassert deleteAll {\n//\talways ((File in Trash and empty) implies always no File)\n\talways ((File in Trash and empty) implies after always no File)\n}\n\ncheck deleteAll\n\ncheck Exercise1 {\n\t-- The set of files never increases\n\talways (File' in File)\n}\n\n\ncheck Exercise2 {\n\t-- The set of files only changes when empty is performed\n\talways (File' != File implies empty)\n}\n\ncheck Exercise3 {\n (always all f : File | not delete[f]) implies always not empty\n}\n\ncheck Exercise4 {\n\t-- Once you have no files you never have files again\n\talways (no File implies always no File)\n}\n\nassert restoreIsPossibleBeforeEmpty {\n -- a deleted file can still be restored if the trash is not emptied\n -- always (all f:File | delete[f] implies (empty releases restoreEnabled[f]))\n -- always (all f:File | delete[f] implies ((empty or restore[f]) releases restoreEnabled[f]))\n always (all f:File | delete[f] implies after ((empty or restore[f]) releases restoreEnabled[f]))\n}\n\ncheck restoreIsPossibleBeforeEmpty for 3 but 1.. steps", "permalink": "chimp-deed-kabob-gem", "time": "2024-07-02 21:34:50.867561", "cmd": 2} {"id": 13542, "parent": null, "code": "sig A {}", "permalink": "shadow-gilled-claim-same", "time": "2024-07-03 07:48:21.781018", "cmd": 1} {"id": 13548, "parent": 13547, "code": "sig A {}", "permalink": "scurvy-blurry-aptly-catnip", "time": "2024-07-03 07:53:46.069416", "cmd": 1} {"id": 13552, "parent": 13551, "code": "sig A {}", "permalink": "wrench-saline-motive-fever", "time": "2024-07-03 07:56:15.086112", "cmd": 1} {"id": 13554, "parent": 13553, "code": "sig A {}", "permalink": "amigo-mousy-jot-slick", "time": "2024-07-03 07:56:41.509104", "cmd": 1} {"id": 13555, "parent": 13554, "code": "sig A {}", "permalink": "granny-tweed-blank-chill", "time": "2024-07-03 07:56:43.142009", "cmd": 1} {"id": 13558, "parent": 13557, "code": "sig A {}", "permalink": "slogan-anyway-nag-tree", "time": "2024-07-03 07:57:08.249637", "cmd": 1} {"id": 13568, "parent": 13565, "code": "sig A {}", "permalink": "jailer-fester-smock-stupor", "time": "2024-07-03 08:12:29.471372", "cmd": 1} {"id": 13569, "parent": 13565, "code": "sig A {}", "permalink": "nugget-safely-safely-sludge", "time": "2024-07-03 08:12:57.108656", "cmd": 1} {"id": 13571, "parent": null, "code": "sig A {}", "permalink": "babble-rally-blob-vastly", "time": "2024-07-03 09:17:47.488714", "cmd": 1} {"id": 13582, "parent": 13581, "code": "sig Node{\n next: lone Node\n value: one Int\n}\n\n\nsig List {\n header : lone Node\n}\n\nrun {}", "permalink": "hulk-bush-giggle-unkind", "time": "2024-07-03 10:43:15.180144", "cmd": 1} {"id": 13619, "parent": null, "code": "open util/integer\n\n// Alloy model generated for deep embedding\n\none sig FM {\n root: one Feature,\n group: set Feature,\n require: ConstraintNode -> ConstraintNode,\n exclude: ConstraintNode -> ConstraintNode,\n config: set Instance\n}\n\nabstract sig Feature {\n groupCardinality: set Intervall,\n groupInstanceCardinality: set Intervall,\n cardinality: some Intervall,\n parent: lone Feature,\n instances: set Instance\n}\n\nsig Instance {\n feature: one Feature,\n instanceParent: lone Instance\n}\n\nsig Intervall {\n lowerBound: Int,\n upperBound: Int + KleeneStar\n}\n\none sig KleeneStar {}\n\none sig Platoon extends Feature {}\nfact { Platoon.parent = FM; }\nfact { Platoon.cardinality = Intervall[1, 1]; }\none sig AddressingScheme extends Feature {}\nfact { AddressingScheme.parent = Platoon; }\nfact { AddressingScheme.cardinality = Intervall[1, 1]; }\none sig Regular extends Feature {}\nfact { Regular.parent = AddressingScheme; }\nfact { Regular.cardinality = Intervall[0, 1]; }\none sig Compact extends Feature {}\nfact { Compact.parent = AddressingScheme; }\nfact { Compact.cardinality = Intervall[1, 2147483647]; }\nfact {\n all f: Feature | f in FM.group || f = FM.root implies #f.instances >= f.cardinality.lowerBound\n all f: Feature | f in FM.group || f = FM.root implies #f.instances <= f.cardinality.upperBound\n}\n\npred show {}\nrun show for 10 but 7 Int, 0 Feature, 0 ConstraintNode", "permalink": "expand-candy-preppy-pagan", "time": "2024-07-05 09:11:02.141419", "cmd": 1} {"id": 13620, "parent": null, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich ueberschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Regular, Compact extends Feature{}\n\none sig i1, i2, i3, i4, i5, i6, i7, i8 extends Intervall{}\n// one sig c0, c5 extends ConstraintNode{}\n\n/**\n Setting variables\n*/\n\nfact {\n // Platoon\n i1.lowerBound = 1\n i1.upperBound = 1\n Platoon.cardinality = i1\n i2.lowerBound = 4\n i2.upperBound = KleeneStar\n Platoon.groupInstanceCardinality = i2\n i3.lowerBound = 4\n i3.upperBound = 4\n Platoon.groupCardinality = i3\n\n //Adressing Scheme\n AddressingScheme.parent = Platoon\n i4.lowerBound = 1\n i4.upperBound = 1\n AddressingScheme.cardinality = i4\n i5.lowerBound = 1\n i5.upperBound = 1\n AddressingScheme.groupInstanceCardinality = i5\n i6.lowerBound = 1\n i6.upperBound = 1\n AddressingScheme.groupCardinality = i6\n\n //Compact\n Compact.parent = AddressingScheme\n i7.lowerBound = 1\n i7.upperBound = KleeneStar\n Compact.cardinality = i7\n \n\n //Regular\n Regular.parent = AddressingScheme\n i8.lowerBound = 0\n i8.upperBound = 1\n Regular.cardinality = i8\n \n\n \n}\n\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode\n// error with this? have to specify predicate to be true?\n// what is but? further specification, max amount of ints? what is show?\n ", "permalink": "tycoon-gurgle-slang-mutt", "time": "2024-07-05 09:11:06.150006", "cmd": 1} {"id": 13622, "parent": 13621, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich ueberschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Regular, Compact extends Feature{}\n\none sig i1, i2, i3, i4, i5, i6, i7, i8 extends Intervall{}\n// one sig c0, c5 extends ConstraintNode{}\n\n/**\n Setting variables\n*/\n\nfact {\n // Platoon\n i1.lowerBound = 1\n i1.upperBound = 1\n Platoon.cardinality = i1\n i2.lowerBound = 4\n i2.upperBound = KleeneStar\n Platoon.groupInstanceCardinality = i2\n i3.lowerBound = 4\n i3.upperBound = 4\n Platoon.groupCardinality = i3\n\n //Adressing Scheme\n AddressingScheme.parent = Platoon\n i4.lowerBound = 1\n i4.upperBound = 1\n AddressingScheme.cardinality = i4\n i5.lowerBound = 1\n i5.upperBound = 1\n AddressingScheme.groupInstanceCardinality = i5\n i6.lowerBound = 1\n i6.upperBound = 1\n AddressingScheme.groupCardinality = i6\n\n //Compact\n Compact.parent = AddressingScheme\n i7.lowerBound = 1\n i7.upperBound = KleeneStar\n Compact.cardinality = i7\n \n\n //Regular\n Regular.parent = AddressingScheme\n i8.lowerBound = 0\n i8.upperBound = 1\n Regular.cardinality = i8\n \n\n \n}\n\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode\n// error with this? have to specify predicate to be true?\n// what is but? further specification, max amount of ints? what is show?\n ", "permalink": "deed-knelt-flirt-pelvis", "time": "2024-07-05 09:11:19.706476", "cmd": 1} {"id": 13623, "parent": 13622, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich ueberschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Regular, Compact extends Feature{}\n\none sig i1, i2, i3, i4, i5, i6, i7, i8 extends Intervall{}\n// one sig c0, c5 extends ConstraintNode{}\n\n/**\n Setting variables\n*/\n\nfact {\n // Platoon\n i1.lowerBound = 1\n i1.upperBound = 1\n Platoon.cardinality = i1\n i2.lowerBound = 4\n i2.upperBound = KleeneStar\n Platoon.groupInstanceCardinality = i2\n i3.lowerBound = 4\n i3.upperBound = 4\n Platoon.groupCardinality = i3\n\n //Adressing Scheme\n AddressingScheme.parent = Platoon\n i4.lowerBound = 1\n i4.upperBound = 1\n AddressingScheme.cardinality = i4\n i5.lowerBound = 1\n i5.upperBound = 1\n AddressingScheme.groupInstanceCardinality = i5\n i6.lowerBound = 1\n i6.upperBound = 1\n AddressingScheme.groupCardinality = i6\n\n //Compact\n Compact.parent = AddressingScheme\n i7.lowerBound = 1\n i7.upperBound = KleeneStar\n Compact.cardinality = i7\n \n\n //Regular\n Regular.parent = AddressingScheme\n i8.lowerBound = 0\n i8.upperBound = 1\n Regular.cardinality = i8\n \n\n \n}\n\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode\n// error with this? have to specify predicate to be true?\n// what is but? further specification, max amount of ints? what is show?\n ", "permalink": "java-asleep-demote-lazily", "time": "2024-07-05 09:11:23.298439", "cmd": 1} {"id": 13627, "parent": 13623, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich ueberschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Regular, Compact extends Feature{}\n\none sig i1, i2, i3, i4, i5, i6, i7, i8 extends Intervall{}\n// one sig c0, c5 extends ConstraintNode{}\n\n/**\n Setting variables\n*/\n\nfact {\n // Platoon\n i1.lowerBound = 1\n i1.upperBound = 1\n Platoon.cardinality = i1\n i2.lowerBound = 4\n i2.upperBound = KleeneStar\n Platoon.groupInstanceCardinality = i2\n i3.lowerBound = 4\n i3.upperBound = 4\n Platoon.groupCardinality = i3\n\n //Adressing Scheme\n AddressingScheme.parent = Platoon\n i4.lowerBound = 1\n i4.upperBound = 1\n AddressingScheme.cardinality = i4\n i5.lowerBound = 1\n i5.upperBound = 1\n AddressingScheme.groupInstanceCardinality = i5\n i6.lowerBound = 1\n i6.upperBound = 1\n AddressingScheme.groupCardinality = i6\n\n //Compact\n Compact.parent = AddressingScheme\n i7.lowerBound = 1\n i7.upperBound = KleeneStar\n Compact.cardinality = i7\n \n\n //Regular\n Regular.parent = AddressingScheme\n i8.lowerBound = 0\n i8.upperBound = 1\n Regular.cardinality = i8\n \n\n \n}\n\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode\n// error with this? have to specify predicate to be true?\n// what is but? further specification, max amount of ints? what is show?\n ", "permalink": "dosage-thinly-jelly-uncle", "time": "2024-07-05 09:15:26.087446", "cmd": 1} {"id": 13631, "parent": 13630, "code": "\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich ueberschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Regular, Compact extends Feature{}\n\none sig i1, i2, i3, i4, i5, i6, i7, i8 extends Intervall{}\n// one sig c0, c5 extends ConstraintNode{}\n\n/**\n Setting variables\n*/\n\nfact {\n // Platoon\n i1.lowerBound = 1\n i1.upperBound = 1\n Platoon.cardinality = i1\n i2.lowerBound = 4\n i2.upperBound = KleeneStar\n Platoon.groupInstanceCardinality = i2\n i3.lowerBound = 4\n i3.upperBound = 4\n Platoon.groupCardinality = i3\n\n //Adressing Scheme\n AddressingScheme.parent = Platoon\n i4.lowerBound = 1\n i4.upperBound = 1\n AddressingScheme.cardinality = i4\n i5.lowerBound = 1\n i5.upperBound = 1\n AddressingScheme.groupInstanceCardinality = i5\n i6.lowerBound = 1\n i6.upperBound = 1\n AddressingScheme.groupCardinality = i6\n\n //Compact\n Compact.parent = AddressingScheme\n i7.lowerBound = 1\n i7.upperBound = KleeneStar\n Compact.cardinality = i7\n \n\n //Regular\n Regular.parent = AddressingScheme\n i8.lowerBound = 0\n i8.upperBound = 1\n Regular.cardinality = i8\n \n\n \n}\n\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode\n// error with this? have to specify predicate to be true?\n// what is but? further specification, max amount of ints? what is show?\n ", "permalink": "duffel-music-oval-turf", "time": "2024-07-05 09:16:08.356404", "cmd": 1} {"id": 13632, "parent": 13631, "code": "\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich ueberschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Regular, Compact extends Feature{}\n\none sig i1, i2, i3, i4, i5, i6, i7, i8 extends Intervall{}\n// one sig c0, c5 extends ConstraintNode{}\n\n/**\n Setting variables\n*/\n\nfact {\n // Platoon\n i1.lowerBound = 1\n i1.upperBound = 1\n Platoon.cardinality = i1\n i2.lowerBound = 4\n i2.upperBound = KleeneStar\n Platoon.groupInstanceCardinality = i2\n i3.lowerBound = 4\n i3.upperBound = 4\n Platoon.groupCardinality = i3\n\n //Adressing Scheme\n AddressingScheme.parent = Platoon\n i4.lowerBound = 1\n i4.upperBound = 1\n AddressingScheme.cardinality = i4\n i5.lowerBound = 1\n i5.upperBound = 1\n AddressingScheme.groupInstanceCardinality = i5\n i6.lowerBound = 1\n i6.upperBound = 1\n AddressingScheme.groupCardinality = i6\n\n //Compact\n Compact.parent = AddressingScheme\n i7.lowerBound = 1\n i7.upperBound = KleeneStar\n Compact.cardinality = i7\n \n\n //Regular\n Regular.parent = AddressingScheme\n i8.lowerBound = 0\n i8.upperBound = 1\n Regular.cardinality = i8\n \n\n \n}\n\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode\n// error with this? have to specify predicate to be true?\n// what is but? further specification, max amount of ints? what is show?\n ", "permalink": "purse-stage-wager-frill", "time": "2024-07-05 09:16:10.845179", "cmd": 1} {"id": 13634, "parent": 13633, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich ueberschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Regular, Compact extends Feature{}\n\none sig i1, i2, i3, i4, i5, i6, i7, i8 extends Intervall{}\n// one sig c0, c5 extends ConstraintNode{}\n\n/**\n Setting variables\n*/\n\nfact {\n // Platoon\n i1.lowerBound = 1\n i1.upperBound = 1\n Platoon.cardinality = i1\n i2.lowerBound = 4\n i2.upperBound = KleeneStar\n Platoon.groupInstanceCardinality = i2\n i3.lowerBound = 4\n i3.upperBound = 4\n Platoon.groupCardinality = i3\n\n //Adressing Scheme\n AddressingScheme.parent = Platoon\n i4.lowerBound = 1\n i4.upperBound = 1\n AddressingScheme.cardinality = i4\n i5.lowerBound = 1\n i5.upperBound = 1\n AddressingScheme.groupInstanceCardinality = i5\n i6.lowerBound = 1\n i6.upperBound = 1\n AddressingScheme.groupCardinality = i6\n\n //Compact\n Compact.parent = AddressingScheme\n i7.lowerBound = 1\n i7.upperBound = KleeneStar\n Compact.cardinality = i7\n \n\n //Regular\n Regular.parent = AddressingScheme\n i8.lowerBound = 0\n i8.upperBound = 1\n Regular.cardinality = i8\n \n\n \n}\n\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode\n// error with this? have to specify predicate to be true?\n// what is but? further specification, max amount of ints? what is show?\n ", "permalink": "tulip-zen-dubbed-pried", "time": "2024-07-05 09:16:41.591163", "cmd": 1} {"id": 13637, "parent": 13636, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich ueberschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Regular, Compact extends Feature{}\n\none sig i1, i2, i3, i4, i5, i6, i7, i8 extends Intervall{}\n// one sig c0, c5 extends ConstraintNode{}\n\n/**\n Setting variables\n*/\n\nfact {\n // Platoon\n i1.lowerBound = 1\n i1.upperBound = 1\n Platoon.cardinality = i1\n i2.lowerBound = 4\n i2.upperBound = KleeneStar\n Platoon.groupInstanceCardinality = i2\n i3.lowerBound = 4\n i3.upperBound = 4\n Platoon.groupCardinality = i3\n\n //Adressing Scheme\n AddressingScheme.parent = Platoon\n i4.lowerBound = 1\n i4.upperBound = 1\n AddressingScheme.cardinality = i4\n i5.lowerBound = 1\n i5.upperBound = 1\n AddressingScheme.groupInstanceCardinality = i5\n i6.lowerBound = 1\n i6.upperBound = 1\n AddressingScheme.groupCardinality = i6\n\n //Compact\n Compact.parent = AddressingScheme\n i7.lowerBound = 1\n i7.upperBound = KleeneStar\n Compact.cardinality = i7\n \n\n //Regular\n Regular.parent = AddressingScheme\n i8.lowerBound = 0\n i8.upperBound = 1\n Regular.cardinality = i8\n \n\n \n}\n\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode\n// error with this? have to specify predicate to be true?\n// what is but? further specification, max amount of ints? what is show?\n ", "permalink": "chrome-legume-define-unsnap", "time": "2024-07-05 09:18:09.521580", "cmd": 1} {"id": 13543, "parent": 13542, "code": "sig A {}", "permalink": "rake-prissy-batboy-await", "time": "2024-07-03 07:49:21.562332", "cmd": 1} {"id": 13549, "parent": 13548, "code": "sig A {}", "permalink": "kimono-ablaze-aflame-thirty", "time": "2024-07-03 07:55:13.824740", "cmd": 1} {"id": 13605, "parent": null, "code": "sig A{}", "permalink": "stew-elude-bakery-stitch", "time": "2024-07-04 08:23:50.776505", "cmd": 1} {"id": 13628, "parent": 13627, "code": "\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich ueberschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Regular, Compact extends Feature{}\n\none sig i1, i2, i3, i4, i5, i6, i7, i8 extends Intervall{}\n// one sig c0, c5 extends ConstraintNode{}\n\n/**\n Setting variables\n*/\n\nfact {\n // Platoon\n i1.lowerBound = 1\n i1.upperBound = 1\n Platoon.cardinality = i1\n i2.lowerBound = 4\n i2.upperBound = KleeneStar\n Platoon.groupInstanceCardinality = i2\n i3.lowerBound = 4\n i3.upperBound = 4\n Platoon.groupCardinality = i3\n\n //Adressing Scheme\n AddressingScheme.parent = Platoon\n i4.lowerBound = 1\n i4.upperBound = 1\n AddressingScheme.cardinality = i4\n i5.lowerBound = 1\n i5.upperBound = 1\n AddressingScheme.groupInstanceCardinality = i5\n i6.lowerBound = 1\n i6.upperBound = 1\n AddressingScheme.groupCardinality = i6\n\n //Compact\n Compact.parent = AddressingScheme\n i7.lowerBound = 1\n i7.upperBound = KleeneStar\n Compact.cardinality = i7\n \n\n //Regular\n Regular.parent = AddressingScheme\n i8.lowerBound = 0\n i8.upperBound = 1\n Regular.cardinality = i8\n \n\n \n}\n\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode\n// error with this? have to specify predicate to be true?\n// what is but? further specification, max amount of ints? what is show?\n ", "permalink": "amiss-sphinx-watch-engulf", "time": "2024-07-05 09:15:34.923612", "cmd": 1} {"id": 13629, "parent": 13628, "code": "\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich ueberschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Regular, Compact extends Feature{}\n\none sig i1, i2, i3, i4, i5, i6, i7, i8 extends Intervall{}\n// one sig c0, c5 extends ConstraintNode{}\n\n/**\n Setting variables\n*/\n\nfact {\n // Platoon\n i1.lowerBound = 1\n i1.upperBound = 1\n Platoon.cardinality = i1\n i2.lowerBound = 4\n i2.upperBound = KleeneStar\n Platoon.groupInstanceCardinality = i2\n i3.lowerBound = 4\n i3.upperBound = 4\n Platoon.groupCardinality = i3\n\n //Adressing Scheme\n AddressingScheme.parent = Platoon\n i4.lowerBound = 1\n i4.upperBound = 1\n AddressingScheme.cardinality = i4\n i5.lowerBound = 1\n i5.upperBound = 1\n AddressingScheme.groupInstanceCardinality = i5\n i6.lowerBound = 1\n i6.upperBound = 1\n AddressingScheme.groupCardinality = i6\n\n //Compact\n Compact.parent = AddressingScheme\n i7.lowerBound = 1\n i7.upperBound = KleeneStar\n Compact.cardinality = i7\n \n\n //Regular\n Regular.parent = AddressingScheme\n i8.lowerBound = 0\n i8.upperBound = 1\n Regular.cardinality = i8\n \n\n \n}\n\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode\n// error with this? have to specify predicate to be true?\n// what is but? further specification, max amount of ints? what is show?\n ", "permalink": "carton-flick-case-purr", "time": "2024-07-05 09:15:37.754151", "cmd": 1} {"id": 13633, "parent": 13632, "code": "\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich ueberschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Regular, Compact extends Feature{}\n\none sig i1, i2, i3, i4, i5, i6, i7, i8 extends Intervall{}\n// one sig c0, c5 extends ConstraintNode{}\n\n/**\n Setting variables\n*/\n\nfact {\n // Platoon\n i1.lowerBound = 1\n i1.upperBound = 1\n Platoon.cardinality = i1\n i2.lowerBound = 4\n i2.upperBound = KleeneStar\n Platoon.groupInstanceCardinality = i2\n i3.lowerBound = 4\n i3.upperBound = 4\n Platoon.groupCardinality = i3\n\n //Adressing Scheme\n AddressingScheme.parent = Platoon\n i4.lowerBound = 1\n i4.upperBound = 1\n AddressingScheme.cardinality = i4\n i5.lowerBound = 1\n i5.upperBound = 1\n AddressingScheme.groupInstanceCardinality = i5\n i6.lowerBound = 1\n i6.upperBound = 1\n AddressingScheme.groupCardinality = i6\n\n //Compact\n Compact.parent = AddressingScheme\n i7.lowerBound = 1\n i7.upperBound = KleeneStar\n Compact.cardinality = i7\n \n\n //Regular\n Regular.parent = AddressingScheme\n i8.lowerBound = 0\n i8.upperBound = 1\n Regular.cardinality = i8\n \n\n \n}\n\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode\n// error with this? have to specify predicate to be true?\n// what is but? further specification, max amount of ints? what is show?\n ", "permalink": "chatty-banjo-buckle-cabana", "time": "2024-07-05 09:16:19.484429", "cmd": 1} {"id": 13635, "parent": 13634, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich ueberschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Regular, Compact extends Feature{}\n\none sig i1, i2, i3, i4, i5, i6, i7, i8 extends Intervall{}\n// one sig c0, c5 extends ConstraintNode{}\n\n/**\n Setting variables\n*/\n\nfact {\n // Platoon\n i1.lowerBound = 1\n i1.upperBound = 1\n Platoon.cardinality = i1\n i2.lowerBound = 4\n i2.upperBound = KleeneStar\n Platoon.groupInstanceCardinality = i2\n i3.lowerBound = 4\n i3.upperBound = 4\n Platoon.groupCardinality = i3\n\n //Adressing Scheme\n AddressingScheme.parent = Platoon\n i4.lowerBound = 1\n i4.upperBound = 1\n AddressingScheme.cardinality = i4\n i5.lowerBound = 1\n i5.upperBound = 1\n AddressingScheme.groupInstanceCardinality = i5\n i6.lowerBound = 1\n i6.upperBound = 1\n AddressingScheme.groupCardinality = i6\n\n //Compact\n Compact.parent = AddressingScheme\n i7.lowerBound = 1\n i7.upperBound = KleeneStar\n Compact.cardinality = i7\n \n\n //Regular\n Regular.parent = AddressingScheme\n i8.lowerBound = 0\n i8.upperBound = 1\n Regular.cardinality = i8\n \n\n \n}\n\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode\n// error with this? have to specify predicate to be true?\n// what is but? further specification, max amount of ints? what is show?\n ", "permalink": "badge-tiptop-unsold-matron", "time": "2024-07-05 09:17:29.764999", "cmd": 1} {"id": 13636, "parent": 13635, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich ueberschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Regular, Compact extends Feature{}\n\none sig i1, i2, i3, i4, i5, i6, i7, i8 extends Intervall{}\n// one sig c0, c5 extends ConstraintNode{}\n\n/**\n Setting variables\n*/\n\nfact {\n // Platoon\n i1.lowerBound = 1\n i1.upperBound = 1\n Platoon.cardinality = i1\n i2.lowerBound = 4\n i2.upperBound = KleeneStar\n Platoon.groupInstanceCardinality = i2\n i3.lowerBound = 4\n i3.upperBound = 4\n Platoon.groupCardinality = i3\n\n //Adressing Scheme\n AddressingScheme.parent = Platoon\n i4.lowerBound = 1\n i4.upperBound = 1\n AddressingScheme.cardinality = i4\n i5.lowerBound = 1\n i5.upperBound = 1\n AddressingScheme.groupInstanceCardinality = i5\n i6.lowerBound = 1\n i6.upperBound = 1\n AddressingScheme.groupCardinality = i6\n\n //Compact\n Compact.parent = AddressingScheme\n i7.lowerBound = 1\n i7.upperBound = KleeneStar\n Compact.cardinality = i7\n \n\n //Regular\n Regular.parent = AddressingScheme\n i8.lowerBound = 0\n i8.upperBound = 1\n Regular.cardinality = i8\n \n\n \n}\n\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode\n// error with this? have to specify predicate to be true?\n// what is but? further specification, max amount of ints? what is show?\n ", "permalink": "duh-chubby-cone-coerce", "time": "2024-07-05 09:17:32.076732", "cmd": 1} {"id": 13189, "parent": 9379, "code": "module wishList\n\nlone sig Puppy, Doll, PS5, Xbox, DogBasket, Ball, \n Dresses, BarbieGame, DogGame, DollHouse {}\n\nfact dependencies {\n\tone BarbieGame implies one PS5\n\tone DogGame implies one Xbox\n}\n\npred wishes {\n // I wish for a puppy or a doll, and a PS5 or an Xbox. \n\n // If you get me a puppy, I also want a dog basket and \n // a ball.\n\n // If I get the doll, I want dresses for the doll and \n // the PS5 Barbie game. \n\n // If I get the puppy, I don’t want the PS5 since only\n // the Xbox has the dog game I want in that case.\n\n // Only if I get the doll, I want a dollhouse.\n\n}\n\nrun wishes for 1", "permalink": "hazing-swipe-cupped-trance", "time": "2024-06-10 01:49:35.973626", "cmd": 1} {"id": 13194, "parent": null, "code": "sig A{}\nrun {}", "permalink": "truck-dining-mace-exact", "time": "2024-06-10 07:20:47.750532", "cmd": 1} {"id": 13195, "parent": 13194, "code": "sig A{}\nrun {}", "permalink": "clover-boots-trump-duress", "time": "2024-06-10 07:21:20.396271", "cmd": 1} {"id": 13196, "parent": 13195, "code": "sig A{}\nrun {}", "permalink": "veal-geiger-lining-feline", "time": "2024-06-10 09:09:51.257628", "cmd": 1} {"id": 13550, "parent": 13549, "code": "sig A {}", "permalink": "sepia-batch-woof-cobweb", "time": "2024-07-03 07:55:22.185458", "cmd": 1} {"id": 13551, "parent": 13550, "code": "sig A {}", "permalink": "hummus-equate-outlet-jovial", "time": "2024-07-03 07:55:58.272794", "cmd": 1} {"id": 13553, "parent": 13552, "code": "sig A {}", "permalink": "wagon-tingle-thrash-brook", "time": "2024-07-03 07:56:29.948484", "cmd": 1} {"id": 13567, "parent": 13566, "code": "sig A {}", "permalink": "winner-lint-thorn-lumber", "time": "2024-07-03 08:04:31.449890", "cmd": 1} {"id": 13570, "parent": 13565, "code": "sig A {}", "permalink": "hangup-moaner-yin-feeble", "time": "2024-07-03 08:14:28.108032", "cmd": 1} {"id": 13581, "parent": 13580, "code": "sig Node{\n next: lone Node,\n value: one Val\n }\n \nsig Val {}\n\none sig List {\n header : lone Node\n }\n \nfact {\n \n }\n \nrun {}", "permalink": "emu-avoid-axis-reveal", "time": "2024-07-03 10:40:40.195060", "cmd": 1} {"id": 13617, "parent": 13616, "code": "sig A{}", "permalink": "robust-skier-supply-caring", "time": "2024-07-05 08:04:05.496587", "cmd": 1} {"id": 13621, "parent": 13620, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich ueberschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Regular, Compact extends Feature{}\n\none sig i1, i2, i3, i4, i5, i6, i7, i8 extends Intervall{}\n// one sig c0, c5 extends ConstraintNode{}\n\n/**\n Setting variables\n*/\n\nfact {\n // Platoon\n i1.lowerBound = 1\n i1.upperBound = 1\n Platoon.cardinality = i1\n i2.lowerBound = 4\n i2.upperBound = KleeneStar\n Platoon.groupInstanceCardinality = i2\n i3.lowerBound = 4\n i3.upperBound = 4\n Platoon.groupCardinality = i3\n\n //Adressing Scheme\n AddressingScheme.parent = Platoon\n i4.lowerBound = 1\n i4.upperBound = 1\n AddressingScheme.cardinality = i4\n i5.lowerBound = 1\n i5.upperBound = 1\n AddressingScheme.groupInstanceCardinality = i5\n i6.lowerBound = 1\n i6.upperBound = 1\n AddressingScheme.groupCardinality = i6\n\n //Compact\n Compact.parent = AddressingScheme\n i7.lowerBound = 1\n i7.upperBound = KleeneStar\n Compact.cardinality = i7\n \n\n //Regular\n Regular.parent = AddressingScheme\n i8.lowerBound = 0\n i8.upperBound = 1\n Regular.cardinality = i8\n \n\n \n}\n\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode\n// error with this? have to specify predicate to be true?\n// what is but? further specification, max amount of ints? what is show?\n ", "permalink": "fender-scarce-taste-clammy", "time": "2024-07-05 09:11:14.900858", "cmd": 1} {"id": 13624, "parent": 13619, "code": "open util/integer\n\n// Alloy model generated for deep embedding\n\none sig FM {\n root: one Feature,\n group: set Feature,\n require: ConstraintNode -> ConstraintNode,\n exclude: ConstraintNode -> ConstraintNode,\n config: set Instance\n}\n\nabstract sig Feature {\n groupCardinality: set Intervall,\n groupInstanceCardinality: set Intervall,\n cardinality: some Intervall,\n parent: lone Feature,\n instances: set Instance\n}\n\nsig Instance {\n feature: one Feature,\n instanceParent: lone Instance\n}\n\nsig Intervall {\n lowerBound: Int,\n upperBound: Int + KleeneStar\n}\n\none sig KleeneStar {}\n\none sig Platoon extends Feature {}\nfact { Platoon.cardinality = Intervall[1, 1]; }\none sig AddressingScheme extends Feature {}\nfact { AddressingScheme.parent = Platoon; }\nfact { AddressingScheme.cardinality = Intervall[1, 1]; }\none sig Regular extends Feature {}\nfact { Regular.parent = AddressingScheme; }\nfact { Regular.cardinality = Intervall[0, 1]; }\none sig Compact extends Feature {}\nfact { Compact.parent = AddressingScheme; }\nfact { Compact.cardinality = Intervall[1, 2147483647]; }\nfact {\n all f: Feature | f in FM.group || f = FM.root implies #f.instances >= f.cardinality.lowerBound\n all f: Feature | f in FM.group || f = FM.root implies #f.instances <= f.cardinality.upperBound\n}\n\npred show {}\nrun show for 10 but 7 Int, 0 Feature, 0 ConstraintNode", "permalink": "manger-ended-ocean-wheat", "time": "2024-07-05 09:11:44.466915", "cmd": 1} {"id": 13625, "parent": 13624, "code": "open util/integer\n\n// Alloy model generated for deep embedding\n\none sig FM {\n root: one Feature,\n group: set Feature,\n require: ConstraintNode -> ConstraintNode,\n exclude: ConstraintNode -> ConstraintNode,\n config: set Instance\n}\n\nabstract sig Feature {\n groupCardinality: set Intervall,\n groupInstanceCardinality: set Intervall,\n cardinality: some Intervall,\n parent: lone Feature,\n instances: set Instance\n}\n\nsig Instance {\n feature: one Feature,\n instanceParent: lone Instance\n}\n\nsig Intervall {\n lowerBound: Int,\n upperBound: Int + KleeneStar\n}\n\none sig KleeneStar {}\n\none sig Platoon extends Feature {}\nfact { Platoon.cardinality = Intervall[1, 1]; }\none sig AddressingScheme extends Feature {}\nfact { AddressingScheme.parent = Platoon; }\nfact { AddressingScheme.cardinality = Intervall[1, 1]; }\none sig Regular extends Feature {}\nfact { Regular.parent = AddressingScheme; }\nfact { Regular.cardinality = Intervall[0, 1]; }\none sig Compact extends Feature {}\nfact { Compact.parent = AddressingScheme; }\nfact { Compact.cardinality = Intervall[1, 2147483647]; }\nfact {\n all f: Feature | f in FM.group || f = FM.root implies #f.instances >= f.cardinality.lowerBound\n all f: Feature | f in FM.group || f = FM.root implies #f.instances <= f.cardinality.upperBound\n}\n\npred show {}\nrun show for 10 but 7 Int, 0 Feature, 0 ConstraintNode", "permalink": "feline-gargle-risk-sprawl", "time": "2024-07-05 09:11:45.626318", "cmd": 1} {"id": 13626, "parent": 13625, "code": "open util/integer\n\n// Alloy model generated for deep embedding\n\none sig FM {\n root: one Feature,\n group: set Feature,\n require: ConstraintNode -> ConstraintNode,\n exclude: ConstraintNode -> ConstraintNode,\n config: set Instance\n}\n\nabstract sig Feature {\n groupCardinality: set Intervall,\n groupInstanceCardinality: set Intervall,\n cardinality: some Intervall,\n parent: lone Feature,\n instances: set Instance\n}\n\nsig Instance {\n feature: one Feature,\n instanceParent: lone Instance\n}\n\nsig Intervall {\n lowerBound: Int,\n upperBound: Int + KleeneStar\n}\n\none sig KleeneStar {}\n\none sig Platoon extends Feature {}\nfact { Platoon.cardinality = Intervall[1, 1]; }\none sig AddressingScheme extends Feature {}\nfact { AddressingScheme.parent = Platoon; }\nfact { AddressingScheme.cardinality = Intervall[1, 1]; }\none sig Regular extends Feature {}\nfact { Regular.parent = AddressingScheme; }\nfact { Regular.cardinality = Intervall[0, 1]; }\none sig Compact extends Feature {}\nfact { Compact.parent = AddressingScheme; }\nfact { Compact.cardinality = Intervall[1, 2147483647]; }\nfact {\n all f: Feature | f in FM.group || f = FM.root implies #f.instances >= f.cardinality.lowerBound\n all f: Feature | f in FM.group || f = FM.root implies #f.instances <= f.cardinality.upperBound\n}\n\npred show {}\nrun show for 10 but 7 Int, 0 Feature, 0 ConstraintNode", "permalink": "chewy-flick-come-elude", "time": "2024-07-05 09:11:53.127954", "cmd": 1} {"id": 13630, "parent": 13629, "code": "\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich ueberschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Regular, Compact extends Feature{}\n\none sig i1, i2, i3, i4, i5, i6, i7, i8 extends Intervall{}\n// one sig c0, c5 extends ConstraintNode{}\n\n/**\n Setting variables\n*/\n\nfact {\n // Platoon\n i1.lowerBound = 1\n i1.upperBound = 1\n Platoon.cardinality = i1\n i2.lowerBound = 4\n i2.upperBound = KleeneStar\n Platoon.groupInstanceCardinality = i2\n i3.lowerBound = 4\n i3.upperBound = 4\n Platoon.groupCardinality = i3\n\n //Adressing Scheme\n AddressingScheme.parent = Platoon\n i4.lowerBound = 1\n i4.upperBound = 1\n AddressingScheme.cardinality = i4\n i5.lowerBound = 1\n i5.upperBound = 1\n AddressingScheme.groupInstanceCardinality = i5\n i6.lowerBound = 1\n i6.upperBound = 1\n AddressingScheme.groupCardinality = i6\n\n //Compact\n Compact.parent = AddressingScheme\n i7.lowerBound = 1\n i7.upperBound = KleeneStar\n Compact.cardinality = i7\n \n\n //Regular\n Regular.parent = AddressingScheme\n i8.lowerBound = 0\n i8.upperBound = 1\n Regular.cardinality = i8\n \n\n \n}\n\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode\n// error with this? have to specify predicate to be true?\n// what is but? further specification, max amount of ints? what is show?\n ", "permalink": "sketch-stress-smoked-quilt", "time": "2024-07-05 09:15:55.526908", "cmd": 1} {"id": 14019, "parent": 14017, "code": "module featureModel\n\none sig FM {\n root: one Feature,\n group: set Feature,\n require: ConstraintNode -> ConstraintNode,\n exclude: ConstraintNode -> ConstraintNode,\n config: set Instance\n}\n\nabstract sig Feature {\n groupCardinality: set Intervall,\n groupInstanceCardinality: set Intervall,\n cardinality: some Intervall,\n parent: lone Feature,\n instances: set Instance\n}\n\nsig Instance {\n feature: one Feature,\n instanceParent: lone Instance\n}\n\nsig Intervall {\n lowerBound: Int,\n upperBound: Int\n}\n\nabstract sig ConstraintNode {\n feature: one Feature,\n cardinality: some Intervall\n}\n\none sig KleeneStar {}\n\none sig Platoon extends Feature {}\nfact { AddressingScheme.parent = Platoon }\none sig AddressingScheme extends Feature {}\nfact { Absolute.parent = AddressingScheme }\none sig Absolute extends Feature {}\nfact { Relative.parent = AddressingScheme }\none sig Relative extends Feature {}\nfact { Maneuver.parent = Platoon }\none sig Maneuver extends Feature {}\nfact { Cutin.parent = Maneuver }\none sig Cutin extends Feature {}\nfact { Merge.parent = Maneuver }\none sig Merge extends Feature {}\none sig PlatoonfeatureInstanceCard, PlatoongroupInstanceCard, PlatoongroupTypeCard extends Intervall{}\nfact {\nPlatoonfeatureInstanceCard.lowerBound =1\nPlatoonfeatureInstanceCard.upperBound =1\nPlatoongroupInstanceCard.lowerBound =4\nPlatoongroupInstanceCard.upperBound =KleeneStar\nPlatoongroupTypeCard.lowerBound =4\nPlatoongroupTypeCard.upperBound =4\n}\none sig AddressingSchemefeatureInstanceCard, AddressingSchemegroupInstanceCard, AddressingSchemegroupTypeCard extends Intervall{}\nfact {\nAddressingSchemefeatureInstanceCard.lowerBound =1\nAddressingSchemefeatureInstanceCard.upperBound =1\nAddressingSchemegroupInstanceCard.lowerBound =1\nAddressingSchemegroupInstanceCard.upperBound =1\nAddressingSchemegroupTypeCard.lowerBound =1\nAddressingSchemegroupTypeCard.upperBound =1\n}\none sig AbsolutefeatureInstanceCard, AbsolutegroupInstanceCard, AbsolutegroupTypeCard extends Intervall{}\nfact {\nAbsolutefeatureInstanceCard.lowerBound =1\nAbsolutefeatureInstanceCard.upperBound =1\nAbsolutegroupInstanceCard.lowerBound =1\nAbsolutegroupInstanceCard.upperBound =1\nAbsolutegroupTypeCard.lowerBound =1\nAbsolutegroupTypeCard.upperBound =1\n}\none sig RelativefeatureInstanceCard, RelativegroupInstanceCard, RelativegroupTypeCard extends Intervall{}\nfact {\nRelativefeatureInstanceCard.lowerBound =1\nRelativefeatureInstanceCard.upperBound =1\nRelativegroupInstanceCard.lowerBound =1\nRelativegroupInstanceCard.upperBound =1\nRelativegroupTypeCard.lowerBound =1\nRelativegroupTypeCard.upperBound =1\n}\none sig ManeuverfeatureInstanceCard, ManeuvergroupInstanceCard, ManeuvergroupTypeCard extends Intervall{}\nfact {\nManeuverfeatureInstanceCard.lowerBound =1\nManeuverfeatureInstanceCard.upperBound =1\nManeuvergroupInstanceCard.lowerBound =2\nManeuvergroupInstanceCard.upperBound =KleeneStar\nManeuvergroupTypeCard.lowerBound =2\nManeuvergroupTypeCard.upperBound =2\n}\none sig CutinfeatureInstanceCard, CutingroupInstanceCard, CutingroupTypeCard extends Intervall{}\nfact {\nCutinfeatureInstanceCard.lowerBound =1\nCutinfeatureInstanceCard.upperBound =1\nCutingroupInstanceCard.lowerBound =1\nCutingroupInstanceCard.upperBound =1\nCutingroupTypeCard.lowerBound =1\nCutingroupTypeCard.upperBound =1\n}\none sig MergefeatureInstanceCard, MergegroupInstanceCard, MergegroupTypeCard extends Intervall{}\nfact {\nMergefeatureInstanceCard.lowerBound =1\nMergefeatureInstanceCard.upperBound =1\nMergegroupInstanceCard.lowerBound =1\nMergegroupInstanceCard.upperBound =1\nMergegroupTypeCard.lowerBound =1\nMergegroupTypeCard.upperBound =1\n}\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "sitter-navy-false-hasty", "time": "2024-07-25 11:28:00.386547", "cmd": 1} {"id": 14044, "parent": 14043, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich berschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalitat spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalitat spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\none sig Platoon, AddressingScheme, Channels, Movement, Node, Regular, Compact, HighThroughput, Reliable, SlowMoving, FastMoving, Follower, Leader extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25, i26, i27, i28, i29, i30, i31, i32, i33 extends Intervall{}\none sig c0, c1, c2, c3, c4, c5, c6, c7, c8, c9 extends ConstraintNode{}\nfact {\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 4\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 4\ni3.upperBound = KleeneStar\nPlatoon.groupCardinality = i3\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\nMovement.parent = Platoon\ni10.lowerBound = 1\ni10.upperBound = 1\nMovement.cardinality = i10\ni11.lowerBound = 1\ni11.upperBound = 1\nMovement.groupInstanceCardinality = i11\ni12.lowerBound = 1\ni12.upperBound = 1\nMovement.groupCardinality = i12\nNode.parent = Platoon\ni13.lowerBound = 1\ni13.upperBound = KleeneStar\nNode.cardinality = i13\ni14.lowerBound = 1\ni14.upperBound = 1\nNode.groupInstanceCardinality = i14\ni15.lowerBound = 1\ni15.upperBound = 2\nNode.groupCardinality = i15\nRegular.parent = AddressingScheme\ni16.lowerBound = 0\ni16.upperBound = 1\nRegular.cardinality = i16\nCompact.parent = AddressingScheme\ni17.lowerBound = 0\ni17.upperBound = 1\nCompact.cardinality = i17\nHighThroughput.parent = Channels\ni18.lowerBound = 1\ni18.upperBound = 8\nHighThroughput.cardinality = i18\nReliable.parent = Channels\ni19.lowerBound = 1\ni19.upperBound = 32\nReliable.cardinality = i19\nSlowMoving.parent = Movement\ni20.lowerBound = 0\ni20.upperBound = 1\nSlowMoving.cardinality = i20\nFastMoving.parent = Movement\ni21.lowerBound = 0\ni21.upperBound = 1\nFastMoving.cardinality = i21\nFollower.parent = Node\ni22.lowerBound = 0\ni22.upperBound = 1\nFollower.cardinality = i22\nLeader.parent = Node\ni23.lowerBound = 0\ni23.upperBound = 1\nLeader.cardinality = i23\nc0.feature = Compact\ni24.lowerBound = 1\ni24.upperBound = KleeneStar\nc0.cardinality = i24\nc5.feature = HighThroughput\ni25.lowerBound = 10\ni25.upperBound = 20\nc5.cardinality = i25\nc1.feature = HighThroughput\ni26.lowerBound = 1\ni26.upperBound = KleeneStar\nc1.cardinality = i26\nc6.feature = Reliable\ni27.lowerBound = 3\ni27.upperBound = KleeneStar\nc6.cardinality = i27\nc2.feature = FastMoving\ni28.lowerBound = 1\ni28.upperBound = 1\nc2.cardinality = i28\nc7.feature = Reliable\ni29.lowerBound = 2\ni29.upperBound = KleeneStar\nc7.cardinality = i29\nc3.feature = Follower\ni30.lowerBound = 3\ni30.upperBound = KleeneStar\nc3.cardinality = i30\nc8.feature = FastMoving\ni31.lowerBound = 1\ni31.upperBound = KleeneStar\nc8.cardinality = i31\nc4.feature = Platoon\ni32.lowerBound = 1\ni32.upperBound = 1\nc4.cardinality = i32\nc9.feature = Leader\ni33.lowerBound = 1\ni33.upperBound = 1\nc9.cardinality = i33\nFM.require = c2 -> c7 + c4 -> c9 \nFM.exclude = c0 -> c5 + c1 -> c6 + c3 -> c8 \n}\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "basket-woven-dork-spiny", "time": "2024-07-25 12:03:14.331658", "cmd": 1} {"id": 14022, "parent": 14021, "code": "module featureModel\n\none sig FM {\n root: one Feature,\n group: set Feature,\n require: ConstraintNode -> ConstraintNode,\n exclude: ConstraintNode -> ConstraintNode,\n config: set Instance\n}\n\nabstract sig Feature {\n groupCardinality: set Intervall,\n groupInstanceCardinality: set Intervall,\n cardinality: some Intervall,\n parent: lone Feature,\n instances: set Instance\n}\n\nsig Instance {\n feature: one Feature,\n instanceParent: lone Instance\n}\n\nsig Intervall {\n lowerBound: Int,\n upperBound: Int\n}\n\nabstract sig ConstraintNode {\n feature: one Feature,\n cardinality: some Intervall\n}\n\none sig KleeneStar {}\n\none sig Platoon extends Feature {}\nfact { AddressingScheme.parent = Platoon }\none sig AddressingScheme extends Feature {}\none sig PlatoonfeatureInstanceCard, PlatoongroupInstanceCard, PlatoongroupTypeCard extends Intervall{}\nfact {\nPlatoonfeatureInstanceCard.lowerBound =1\nPlatoonfeatureInstanceCard.upperBound =1\nPlatoongroupInstanceCard.lowerBound =4\nPlatoongroupInstanceCard.upperBound =KleeneStar\nPlatoongroupTypeCard.lowerBound =4\nPlatoongroupTypeCard.upperBound =4\n}\none sig AddressingSchemefeatureInstanceCard, AddressingSchemegroupInstanceCard, AddressingSchemegroupTypeCard extends Intervall{}\nfact {\nAddressingSchemefeatureInstanceCard.lowerBound =1\nAddressingSchemefeatureInstanceCard.upperBound =1\nAddressingSchemegroupInstanceCard.lowerBound =1\nAddressingSchemegroupInstanceCard.upperBound =1\nAddressingSchemegroupTypeCard.lowerBound =1\nAddressingSchemegroupTypeCard.upperBound =1\n}", "permalink": "feeble-cursor-friend-mosaic", "time": "2024-07-25 11:29:04.938814", "cmd": 1} {"id": 14025, "parent": 14024, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich ueberschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Regular, Compact extends Feature{}\n\none sig i1, i2, i3, i4, i5, i6, i7, i8 extends Intervall{}\n// one sig c0, c5 extends ConstraintNode{}\n\n/**\n Setting variables\n*/\n\nfact {\n // Platoon\n i1.lowerBound = 1\n i1.upperBound = 1\n Platoon.cardinality = i1\n i2.lowerBound = 4\n i2.upperBound = KleeneStar\n Platoon.groupInstanceCardinality = i2\n i3.lowerBound = 4\n i3.upperBound = 4\n Platoon.groupCardinality = i3\n\n //Adressing Scheme\n AddressingScheme.parent = Platoon\n i4.lowerBound = 1\n i4.upperBound = 1\n AddressingScheme.cardinality = i4\n i5.lowerBound = 1\n i5.upperBound = 1\n AddressingScheme.groupInstanceCardinality = i5\n i6.lowerBound = 1\n i6.upperBound = 1\n AddressingScheme.groupCardinality = i6\n\n //Compact\n Compact.parent = AddressingScheme\n i7.lowerBound = 1\n i7.upperBound = KleeneStar\n Compact.cardinality = i7\n \n\n //Regular\n Regular.parent = AddressingScheme\n i8.lowerBound = 0\n i8.upperBound = 1\n Regular.cardinality = i8\n \n\n \n}\n\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode\n// error with this? have to specify predicate to be true?\n// what is but? further specification, max amount of ints? what is show?\n ", "permalink": "wake-skier-sip-stray", "time": "2024-07-25 11:36:54.153064", "cmd": 1} {"id": 14026, "parent": 14025, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich ueberschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Regular, Compact extends Feature{}\n\none sig i1, i2, i3, i4, i5, i6, i7, i8 extends Intervall{}\n// one sig c0, c5 extends ConstraintNode{}\n\n/**\n Setting variables\n*/\n\nfact {\n // Platoon\n i1.lowerBound = 1\n i1.upperBound = 1\n Platoon.cardinality = i1\n i2.lowerBound = 4\n i2.upperBound = KleeneStar\n Platoon.groupInstanceCardinality = i2\n i3.lowerBound = 4\n i3.upperBound = 4\n Platoon.groupCardinality = i3\n\n //Adressing Scheme\n AddressingScheme.parent = Platoon\n i4.lowerBound = 1\n i4.upperBound = 1\n AddressingScheme.cardinality = i4\n i5.lowerBound = 1\n i5.upperBound = 1\n AddressingScheme.groupInstanceCardinality = i5\n i6.lowerBound = 1\n i6.upperBound = 1\n AddressingScheme.groupCardinality = i6\n\n //Compact\n Compact.parent = AddressingScheme\n i7.lowerBound = 1\n i7.upperBound = KleeneStar\n Compact.cardinality = i7\n \n\n //Regular\n Regular.parent = AddressingScheme\n i8.lowerBound = 0\n i8.upperBound = 1\n Regular.cardinality = i8\n \n\n \n}\n\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode\n// error with this? have to specify predicate to be true?\n// what is but? further specification, max amount of ints? what is show?\n ", "permalink": "woven-numbly-proved-sizzle", "time": "2024-07-25 11:36:59.330427", "cmd": 1} {"id": 14029, "parent": 14028, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich ueberschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Channels, Regular, Compact, HighThroughput, Reliable extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i16, i17, i18, i19, i24, i25 extends Intervall{}\none sig c0, c5 extends ConstraintNode{}\n\n\nfact {\n //Platoon\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 2\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 2\ni3.upperBound = 2\nPlatoon.groupCardinality = i3\n\n//Addressing Scheme\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\n\n//Addressing Scheme Children: Regular, Compact\nRegular.parent = AddressingScheme\ni16.lowerBound = 0\ni16.upperBound = 1\nRegular.cardinality = i16\nCompact.parent = AddressingScheme\ni17.lowerBound = 0\ni17.upperBound = 1\nCompact.cardinality = i17\n\n//Channels\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\n\n//Channels Children: High Throughput, Reliable\nHighThroughput.parent = Channels\ni18.lowerBound = 1\ni18.upperBound = 8\nHighThroughput.cardinality = i18\nReliable.parent = Channels\ni19.lowerBound = 1\ni19.upperBound = 32\nReliable.cardinality = i19\n\n//Cardinality: Compact / High Throughput\nc0.feature = Compact\ni24.lowerBound = 1\ni24.upperBound = KleeneStar\nc0.cardinality = i24\nc5.feature = HighThroughput\ni25.lowerBound = 10\ni25.upperBound = 20\nc5.cardinality = i25\n\nFM.exclude = c0 -> c5\n\n\n\n}\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "geek-ninja-diving-atop", "time": "2024-07-25 11:43:56.081822", "cmd": 1} {"id": 14037, "parent": 14036, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\none sig Platoon, AddressingScheme, Channels, Movement, Node, Regular, Compact, HighThroughput, Reliable, SlowMoving, FastMoving, Follower, Leader extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25, i26, i27, i28, i29, i30, i31, i32, i33 extends Intervall{}\none sig c0, c1, c2, c3, c4, c5, c6, c7, c8, c9 extends ConstraintNode{}\nfact {\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 4\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 4\ni3.upperBound = KleeneStar\nPlatoon.groupCardinality = i3\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\nMovement.parent = Platoon\ni10.lowerBound = 1\ni10.upperBound = 1\nMovement.cardinality = i10\ni11.lowerBound = 1\ni11.upperBound = 1\nMovement.groupInstanceCardinality = i11\ni12.lowerBound = 1\ni12.upperBound = 1\nMovement.groupCardinality = i12\nNode.parent = Platoon\ni13.lowerBound = 1\ni13.upperBound = KleeneStar\nNode.cardinality = i13\ni14.lowerBound = 1\ni14.upperBound = 1\nNode.groupInstanceCardinality = i14\ni15.lowerBound = 1\ni15.upperBound = 2\nNode.groupCardinality = i15\nRegular.parent = AddressingScheme\ni16.lowerBound = 0\ni16.upperBound = 1\nRegular.cardinality = i16\nCompact.parent = AddressingScheme\ni17.lowerBound = 0\ni17.upperBound = 1\nCompact.cardinality = i17\nHighThroughput.parent = Channels\ni18.lowerBound = 1\ni18.upperBound = 8\nHighThroughput.cardinality = i18\nReliable.parent = Channels\ni19.lowerBound = 1\ni19.upperBound = 32\nReliable.cardinality = i19\nSlowMoving.parent = Movement\ni20.lowerBound = 0\ni20.upperBound = 1\nSlowMoving.cardinality = i20\nFastMoving.parent = Movement\ni21.lowerBound = 0\ni21.upperBound = 1\nFastMoving.cardinality = i21\nFollower.parent = Node\ni22.lowerBound = 0\ni22.upperBound = 1\nFollower.cardinality = i22\nLeader.parent = Node\ni23.lowerBound = 0\ni23.upperBound = 1\nLeader.cardinality = i23\nc0.feature = Compact\ni24.lowerBound = 1\ni24.upperBound = KleeneStar\nc0.cardinality = i24\nc5.feature = HighThroughput\ni25.lowerBound = 10\ni25.upperBound = 20\nc5.cardinality = i25\nc1.feature = HighThroughput\ni26.lowerBound = 1\ni26.upperBound = KleeneStar\nc1.cardinality = i26\nc6.feature = Reliable\ni27.lowerBound = 3\ni27.upperBound = KleeneStar\nc6.cardinality = i27\nc2.feature = FastMoving\ni28.lowerBound = 1\ni28.upperBound = 1\nc2.cardinality = i28\nc7.feature = Reliable\ni29.lowerBound = 2\ni29.upperBound = KleeneStar\nc7.cardinality = i29\nc3.feature = Follower\ni30.lowerBound = 3\ni30.upperBound = KleeneStar\nc3.cardinality = i30\nc8.feature = FastMoving\ni31.lowerBound = 1\ni31.upperBound = KleeneStar\nc8.cardinality = i31\nc4.feature = Platoon\ni32.lowerBound = 1\ni32.upperBound = 1\nc4.cardinality = i32\nc9.feature = Leader\ni33.lowerBound = 1\ni33.upperBound = 1\nc9.cardinality = i33\nFM.require = c2 -> c7 + c4 -> c9 \nFM.exclude = c0 -> c5 + c1 -> c6 + c3 -> c8 \n}\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "rift-revise-error-dilute", "time": "2024-07-25 11:52:30.363699", "cmd": 1} {"id": 14038, "parent": 14037, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\none sig Platoon, AddressingScheme, Channels, Movement, Node, Regular, Compact, HighThroughput, Reliable, SlowMoving, FastMoving, Follower, Leader extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25, i26, i27, i28, i29, i30, i31, i32, i33 extends Intervall{}\none sig c0, c1, c2, c3, c4, c5, c6, c7, c8, c9 extends ConstraintNode{}\nfact {\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 4\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 4\ni3.upperBound = KleeneStar\nPlatoon.groupCardinality = i3\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\nMovement.parent = Platoon\ni10.lowerBound = 1\ni10.upperBound = 1\nMovement.cardinality = i10\ni11.lowerBound = 1\ni11.upperBound = 1\nMovement.groupInstanceCardinality = i11\ni12.lowerBound = 1\ni12.upperBound = 1\nMovement.groupCardinality = i12\nNode.parent = Platoon\ni13.lowerBound = 1\ni13.upperBound = KleeneStar\nNode.cardinality = i13\ni14.lowerBound = 1\ni14.upperBound = 1\nNode.groupInstanceCardinality = i14\ni15.lowerBound = 1\ni15.upperBound = 2\nNode.groupCardinality = i15\nRegular.parent = AddressingScheme\ni16.lowerBound = 0\ni16.upperBound = 1\nRegular.cardinality = i16\nCompact.parent = AddressingScheme\ni17.lowerBound = 0\ni17.upperBound = 1\nCompact.cardinality = i17\nHighThroughput.parent = Channels\ni18.lowerBound = 1\ni18.upperBound = 8\nHighThroughput.cardinality = i18\nReliable.parent = Channels\ni19.lowerBound = 1\ni19.upperBound = 32\nReliable.cardinality = i19\nSlowMoving.parent = Movement\ni20.lowerBound = 0\ni20.upperBound = 1\nSlowMoving.cardinality = i20\nFastMoving.parent = Movement\ni21.lowerBound = 0\ni21.upperBound = 1\nFastMoving.cardinality = i21\nFollower.parent = Node\ni22.lowerBound = 0\ni22.upperBound = 1\nFollower.cardinality = i22\nLeader.parent = Node\ni23.lowerBound = 0\ni23.upperBound = 1\nLeader.cardinality = i23\nc0.feature = Compact\ni24.lowerBound = 1\ni24.upperBound = KleeneStar\nc0.cardinality = i24\nc5.feature = HighThroughput\ni25.lowerBound = 10\ni25.upperBound = 20\nc5.cardinality = i25\nc1.feature = HighThroughput\ni26.lowerBound = 1\ni26.upperBound = KleeneStar\nc1.cardinality = i26\nc6.feature = Reliable\ni27.lowerBound = 3\ni27.upperBound = KleeneStar\nc6.cardinality = i27\nc2.feature = FastMoving\ni28.lowerBound = 1\ni28.upperBound = 1\nc2.cardinality = i28\nc7.feature = Reliable\ni29.lowerBound = 2\ni29.upperBound = KleeneStar\nc7.cardinality = i29\nc3.feature = Follower\ni30.lowerBound = 3\ni30.upperBound = KleeneStar\nc3.cardinality = i30\nc8.feature = FastMoving\ni31.lowerBound = 1\ni31.upperBound = KleeneStar\nc8.cardinality = i31\nc4.feature = Platoon\ni32.lowerBound = 1\ni32.upperBound = 1\nc4.cardinality = i32\nc9.feature = Leader\ni33.lowerBound = 1\ni33.upperBound = 1\nc9.cardinality = i33\nFM.require = c2 -> c7 + c4 -> c9 \nFM.exclude = c0 -> c5 + c1 -> c6 + c3 -> c8 \n}\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "until-statue-tummy-trio", "time": "2024-07-25 11:52:31.969613", "cmd": 1} {"id": 14018, "parent": 14017, "code": "module featureModel\n\none sig FM {\n root: one Feature,\n group: set Feature,\n require: ConstraintNode -> ConstraintNode,\n exclude: ConstraintNode -> ConstraintNode,\n config: set Instance\n}\n\nabstract sig Feature {\n groupCardinality: set Intervall,\n groupInstanceCardinality: set Intervall,\n cardinality: some Intervall,\n parent: lone Feature,\n instances: set Instance\n}\n\nsig Instance {\n feature: one Feature,\n instanceParent: lone Instance\n}\n\nsig Intervall {\n lowerBound: Int,\n upperBound: Int\n}\n\nabstract sig ConstraintNode {\n feature: one Feature,\n cardinality: some Intervall\n}\n\none sig KleeneStar {}\n\none sig Platoon extends Feature {}\nfact { AddressingScheme.parent = Platoon }\none sig AddressingScheme extends Feature {}\nfact { Absolute.parent = AddressingScheme }\none sig Absolute extends Feature {}\nfact { Relative.parent = AddressingScheme }\none sig Relative extends Feature {}\nfact { Maneuver.parent = Platoon }\none sig Maneuver extends Feature {}\nfact { Cutin.parent = Maneuver }\none sig Cutin extends Feature {}\nfact { Merge.parent = Maneuver }\none sig Merge extends Feature {}\none sig PlatoonfeatureInstanceCard, PlatoongroupInstanceCard, PlatoongroupTypeCard extends Intervall{}\nfact {\nPlatoonfeatureInstanceCard.lowerBound =1\nPlatoonfeatureInstanceCard.upperBound =1\nPlatoongroupInstanceCard.lowerBound =4\nPlatoongroupInstanceCard.upperBound =KleeneStar\nPlatoongroupTypeCard.lowerBound =4\nPlatoongroupTypeCard.upperBound =4\n}\none sig AddressingSchemefeatureInstanceCard, AddressingSchemegroupInstanceCard, AddressingSchemegroupTypeCard extends Intervall{}\nfact {\nAddressingSchemefeatureInstanceCard.lowerBound =1\nAddressingSchemefeatureInstanceCard.upperBound =1\nAddressingSchemegroupInstanceCard.lowerBound =1\nAddressingSchemegroupInstanceCard.upperBound =1\nAddressingSchemegroupTypeCard.lowerBound =1\nAddressingSchemegroupTypeCard.upperBound =1\n}\none sig AbsolutefeatureInstanceCard, AbsolutegroupInstanceCard, AbsolutegroupTypeCard extends Intervall{}\nfact {\nAbsolutefeatureInstanceCard.lowerBound =1\nAbsolutefeatureInstanceCard.upperBound =1\nAbsolutegroupInstanceCard.lowerBound =1\nAbsolutegroupInstanceCard.upperBound =1\nAbsolutegroupTypeCard.lowerBound =1\nAbsolutegroupTypeCard.upperBound =1\n}\none sig RelativefeatureInstanceCard, RelativegroupInstanceCard, RelativegroupTypeCard extends Intervall{}\nfact {\nRelativefeatureInstanceCard.lowerBound =1\nRelativefeatureInstanceCard.upperBound =1\nRelativegroupInstanceCard.lowerBound =1\nRelativegroupInstanceCard.upperBound =1\nRelativegroupTypeCard.lowerBound =1\nRelativegroupTypeCard.upperBound =1\n}\none sig ManeuverfeatureInstanceCard, ManeuvergroupInstanceCard, ManeuvergroupTypeCard extends Intervall{}\nfact {\nManeuverfeatureInstanceCard.lowerBound =1\nManeuverfeatureInstanceCard.upperBound =1\nManeuvergroupInstanceCard.lowerBound =2\nManeuvergroupInstanceCard.upperBound =KleeneStar\nManeuvergroupTypeCard.lowerBound =2\nManeuvergroupTypeCard.upperBound =2\n}\none sig CutinfeatureInstanceCard, CutingroupInstanceCard, CutingroupTypeCard extends Intervall{}\nfact {\nCutinfeatureInstanceCard.lowerBound =1\nCutinfeatureInstanceCard.upperBound =1\nCutingroupInstanceCard.lowerBound =1\nCutingroupInstanceCard.upperBound =1\nCutingroupTypeCard.lowerBound =1\nCutingroupTypeCard.upperBound =1\n}\none sig MergefeatureInstanceCard, MergegroupInstanceCard, MergegroupTypeCard extends Intervall{}\nfact {\nMergefeatureInstanceCard.lowerBound =1\nMergefeatureInstanceCard.upperBound =1\nMergegroupInstanceCard.lowerBound =1\nMergegroupInstanceCard.upperBound =1\nMergegroupTypeCard.lowerBound =1\nMergegroupTypeCard.upperBound =1\n}", "permalink": "spring-pried-rover-pang", "time": "2024-07-25 11:27:27.475601", "cmd": 1} {"id": 14024, "parent": 14023, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich ueberschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Regular, Compact extends Feature{}\n\none sig i1, i2, i3, i4, i5, i6, i7, i8 extends Intervall{}\n// one sig c0, c5 extends ConstraintNode{}\n\n/**\n Setting variables\n*/\n\nfact {\n // Platoon\n i1.lowerBound = 1\n i1.upperBound = 1\n Platoon.cardinality = i1\n i2.lowerBound = 4\n i2.upperBound = KleeneStar\n Platoon.groupInstanceCardinality = i2\n i3.lowerBound = 4\n i3.upperBound = 4\n Platoon.groupCardinality = i3\n\n //Adressing Scheme\n AddressingScheme.parent = Platoon\n i4.lowerBound = 1\n i4.upperBound = 1\n AddressingScheme.cardinality = i4\n i5.lowerBound = 1\n i5.upperBound = 1\n AddressingScheme.groupInstanceCardinality = i5\n i6.lowerBound = 1\n i6.upperBound = 1\n AddressingScheme.groupCardinality = i6\n\n //Compact\n Compact.parent = AddressingScheme\n i7.lowerBound = 1\n i7.upperBound = KleeneStar\n Compact.cardinality = i7\n \n\n //Regular\n Regular.parent = AddressingScheme\n i8.lowerBound = 0\n i8.upperBound = 1\n Regular.cardinality = i8\n \n\n \n}\n\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode\n// error with this? have to specify predicate to be true?\n// what is but? further specification, max amount of ints? what is show?\n ", "permalink": "voice-lash-aspect-rise", "time": "2024-07-25 11:36:48.493041", "cmd": 1} {"id": 14027, "parent": 14026, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich ueberschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Channels, Regular, Compact, HighThroughput, Reliable extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i16, i17, i18, i19, i24, i25 extends Intervall{}\none sig c0, c5 extends ConstraintNode{}\n\n\nfact {\n //Platoon\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 2\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 2\ni3.upperBound = 2\nPlatoon.groupCardinality = i3\n\n//Addressing Scheme\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\n\n//Addressing Scheme Children: Regular, Compact\nRegular.parent = AddressingScheme\ni16.lowerBound = 0\ni16.upperBound = 1\nRegular.cardinality = i16\nCompact.parent = AddressingScheme\ni17.lowerBound = 0\ni17.upperBound = 1\nCompact.cardinality = i17\n\n//Channels\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\n\n//Channels Children: High Throughput, Reliable\nHighThroughput.parent = Channels\ni18.lowerBound = 1\ni18.upperBound = 8\nHighThroughput.cardinality = i18\nReliable.parent = Channels\ni19.lowerBound = 1\ni19.upperBound = 32\nReliable.cardinality = i19\n\n//Cardinality: Compact / High Throughput\nc0.feature = Compact\ni24.lowerBound = 1\ni24.upperBound = KleeneStar\nc0.cardinality = i24\nc5.feature = HighThroughput\ni25.lowerBound = 10\ni25.upperBound = 20\nc5.cardinality = i25\n\nFM.exclude = c0 -> c5\n\n\n\n}\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "botany-rebate-obtain-delta", "time": "2024-07-25 11:43:39.194933", "cmd": 1} {"id": 14031, "parent": 14030, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\none sig Platoon, AddressingScheme, Channels, Movement, Node, Regular, Compact, HighThroughput, Reliable, SlowMoving, FastMoving, Follower, Leader extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25, i26, i27, i28, i29, i30, i31, i32, i33 extends Intervall{}\none sig c0, c1, c2, c3, c4, c5, c6, c7, c8, c9 extends ConstraintNode{}\nfact {\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 4\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 4\ni3.upperBound = KleeneStar\nPlatoon.groupCardinality = i3\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\nMovement.parent = Platoon\ni10.lowerBound = 1\ni10.upperBound = 1\nMovement.cardinality = i10\ni11.lowerBound = 1\ni11.upperBound = 1\nMovement.groupInstanceCardinality = i11\ni12.lowerBound = 1\ni12.upperBound = 1\nMovement.groupCardinality = i12\nNode.parent = Platoon\ni13.lowerBound = 1\ni13.upperBound = KleeneStar\nNode.cardinality = i13\ni14.lowerBound = 1\ni14.upperBound = 1\nNode.groupInstanceCardinality = i14\ni15.lowerBound = 1\ni15.upperBound = 2\nNode.groupCardinality = i15\nRegular.parent = AddressingScheme\ni16.lowerBound = 0\ni16.upperBound = 1\nRegular.cardinality = i16\nCompact.parent = AddressingScheme\ni17.lowerBound = 0\ni17.upperBound = 1\nCompact.cardinality = i17\nHighThroughput.parent = Channels\ni18.lowerBound = 1\ni18.upperBound = 8\nHighThroughput.cardinality = i18\nReliable.parent = Channels\ni19.lowerBound = 1\ni19.upperBound = 32\nReliable.cardinality = i19\nSlowMoving.parent = Movement\ni20.lowerBound = 0\ni20.upperBound = 1\nSlowMoving.cardinality = i20\nFastMoving.parent = Movement\ni21.lowerBound = 0\ni21.upperBound = 1\nFastMoving.cardinality = i21\nFollower.parent = Node\ni22.lowerBound = 0\ni22.upperBound = 1\nFollower.cardinality = i22\nLeader.parent = Node\ni23.lowerBound = 0\ni23.upperBound = 1\nLeader.cardinality = i23\nc0.feature = Compact\ni24.lowerBound = 1\ni24.upperBound = KleeneStar\nc0.cardinality = i24\nc5.feature = HighThroughput\ni25.lowerBound = 10\ni25.upperBound = 20\nc5.cardinality = i25\nc1.feature = HighThroughput\ni26.lowerBound = 1\ni26.upperBound = KleeneStar\nc1.cardinality = i26\nc6.feature = Reliable\ni27.lowerBound = 3\ni27.upperBound = KleeneStar\nc6.cardinality = i27\nc2.feature = FastMoving\ni28.lowerBound = 1\ni28.upperBound = 1\nc2.cardinality = i28\nc7.feature = Reliable\ni29.lowerBound = 2\ni29.upperBound = KleeneStar\nc7.cardinality = i29\nc3.feature = Follower\ni30.lowerBound = 3\ni30.upperBound = KleeneStar\nc3.cardinality = i30\nc8.feature = FastMoving\ni31.lowerBound = 1\ni31.upperBound = KleeneStar\nc8.cardinality = i31\nc4.feature = Platoon\ni32.lowerBound = 1\ni32.upperBound = 1\nc4.cardinality = i32\nc9.feature = Leader\ni33.lowerBound = 1\ni33.upperBound = 1\nc9.cardinality = i33\nFM.require = c2 -> c7 + c4 -> c9 \nFM.exclude = c0 -> c5 + c1 -> c6 + c3 -> c8 \n}\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "woven-flying-onyx-chuck", "time": "2024-07-25 11:48:29.493810", "cmd": 1} {"id": 14033, "parent": 14032, "code": "module tour/addressBook\n\n// 3 signatures Name, Addr, Book\nsig Name, Addr {}\nsig Book {\n\t// addr maps names to addresses.\n\t// multiple names can be mapped to an address.\n\t// b->n->a\n\taddr: Name -> lone Addr\n}\n\npred show {}\n\n// specifices scope that bounds the search\n// for instances. At most 3 objects in each\n// signature except for book which is\n// limited to one\nrun show for 3 but 1 Book", "permalink": "tipped-spry-slicer-carry", "time": "2024-07-25 11:51:07.798114", "cmd": 1} {"id": 14039, "parent": 14038, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\none sig Platoon, AddressingScheme, Channels, Movement, Node, Regular, Compact, HighThroughput, Reliable, SlowMoving, FastMoving, Follower, Leader extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25, i26, i27, i28, i29, i30, i31, i32, i33 extends Intervall{}\none sig c0, c1, c2, c3, c4, c5, c6, c7, c8, c9 extends ConstraintNode{}\nfact {\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 4\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 4\ni3.upperBound = KleeneStar\nPlatoon.groupCardinality = i3\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\nMovement.parent = Platoon\ni10.lowerBound = 1\ni10.upperBound = 1\nMovement.cardinality = i10\ni11.lowerBound = 1\ni11.upperBound = 1\nMovement.groupInstanceCardinality = i11\ni12.lowerBound = 1\ni12.upperBound = 1\nMovement.groupCardinality = i12\nNode.parent = Platoon\ni13.lowerBound = 1\ni13.upperBound = KleeneStar\nNode.cardinality = i13\ni14.lowerBound = 1\ni14.upperBound = 1\nNode.groupInstanceCardinality = i14\ni15.lowerBound = 1\ni15.upperBound = 2\nNode.groupCardinality = i15\nRegular.parent = AddressingScheme\ni16.lowerBound = 0\ni16.upperBound = 1\nRegular.cardinality = i16\nCompact.parent = AddressingScheme\ni17.lowerBound = 0\ni17.upperBound = 1\nCompact.cardinality = i17\nHighThroughput.parent = Channels\ni18.lowerBound = 1\ni18.upperBound = 8\nHighThroughput.cardinality = i18\nReliable.parent = Channels\ni19.lowerBound = 1\ni19.upperBound = 32\nReliable.cardinality = i19\nSlowMoving.parent = Movement\ni20.lowerBound = 0\ni20.upperBound = 1\nSlowMoving.cardinality = i20\nFastMoving.parent = Movement\ni21.lowerBound = 0\ni21.upperBound = 1\nFastMoving.cardinality = i21\nFollower.parent = Node\ni22.lowerBound = 0\ni22.upperBound = 1\nFollower.cardinality = i22\nLeader.parent = Node\ni23.lowerBound = 0\ni23.upperBound = 1\nLeader.cardinality = i23\nc0.feature = Compact\ni24.lowerBound = 1\ni24.upperBound = KleeneStar\nc0.cardinality = i24\nc5.feature = HighThroughput\ni25.lowerBound = 10\ni25.upperBound = 20\nc5.cardinality = i25\nc1.feature = HighThroughput\ni26.lowerBound = 1\ni26.upperBound = KleeneStar\nc1.cardinality = i26\nc6.feature = Reliable\ni27.lowerBound = 3\ni27.upperBound = KleeneStar\nc6.cardinality = i27\nc2.feature = FastMoving\ni28.lowerBound = 1\ni28.upperBound = 1\nc2.cardinality = i28\nc7.feature = Reliable\ni29.lowerBound = 2\ni29.upperBound = KleeneStar\nc7.cardinality = i29\nc3.feature = Follower\ni30.lowerBound = 3\ni30.upperBound = KleeneStar\nc3.cardinality = i30\nc8.feature = FastMoving\ni31.lowerBound = 1\ni31.upperBound = KleeneStar\nc8.cardinality = i31\nc4.feature = Platoon\ni32.lowerBound = 1\ni32.upperBound = 1\nc4.cardinality = i32\nc9.feature = Leader\ni33.lowerBound = 1\ni33.upperBound = 1\nc9.cardinality = i33\nFM.require = c2 -> c7 + c4 -> c9 \nFM.exclude = c0 -> c5 + c1 -> c6 + c3 -> c8 \n}\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "ebook-spew-smudge-ruckus", "time": "2024-07-25 11:58:34.125439", "cmd": 1} {"id": 14041, "parent": null, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\none sig Platoon, AddressingScheme, Channels, Movement, Node, Regular, Compact, HighThroughput, Reliable, SlowMoving, FastMoving, Follower, Leader extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25, i26, i27, i28, i29, i30, i31, i32, i33 extends Intervall{}\none sig c0, c1, c2, c3, c4, c5, c6, c7, c8, c9 extends ConstraintNode{}\nfact {\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 4\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 4\ni3.upperBound = KleeneStar\nPlatoon.groupCardinality = i3\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\nMovement.parent = Platoon\ni10.lowerBound = 1\ni10.upperBound = 1\nMovement.cardinality = i10\ni11.lowerBound = 1\ni11.upperBound = 1\nMovement.groupInstanceCardinality = i11\ni12.lowerBound = 1\ni12.upperBound = 1\nMovement.groupCardinality = i12\nNode.parent = Platoon\ni13.lowerBound = 1\ni13.upperBound = KleeneStar\nNode.cardinality = i13\ni14.lowerBound = 1\ni14.upperBound = 1\nNode.groupInstanceCardinality = i14\ni15.lowerBound = 1\ni15.upperBound = 2\nNode.groupCardinality = i15\nRegular.parent = AddressingScheme\ni16.lowerBound = 0\ni16.upperBound = 1\nRegular.cardinality = i16\nCompact.parent = AddressingScheme\ni17.lowerBound = 0\ni17.upperBound = 1\nCompact.cardinality = i17\nHighThroughput.parent = Channels\ni18.lowerBound = 1\ni18.upperBound = 8\nHighThroughput.cardinality = i18\nReliable.parent = Channels\ni19.lowerBound = 1\ni19.upperBound = 32\nReliable.cardinality = i19\nSlowMoving.parent = Movement\ni20.lowerBound = 0\ni20.upperBound = 1\nSlowMoving.cardinality = i20\nFastMoving.parent = Movement\ni21.lowerBound = 0\ni21.upperBound = 1\nFastMoving.cardinality = i21\nFollower.parent = Node\ni22.lowerBound = 0\ni22.upperBound = 1\nFollower.cardinality = i22\nLeader.parent = Node\ni23.lowerBound = 0\ni23.upperBound = 1\nLeader.cardinality = i23\nc0.feature = Compact\ni24.lowerBound = 1\ni24.upperBound = KleeneStar\nc0.cardinality = i24\nc5.feature = HighThroughput\ni25.lowerBound = 10\ni25.upperBound = 20\nc5.cardinality = i25\nc1.feature = HighThroughput\ni26.lowerBound = 1\ni26.upperBound = KleeneStar\nc1.cardinality = i26\nc6.feature = Reliable\ni27.lowerBound = 3\ni27.upperBound = KleeneStar\nc6.cardinality = i27\nc2.feature = FastMoving\ni28.lowerBound = 1\ni28.upperBound = 1\nc2.cardinality = i28\nc7.feature = Reliable\ni29.lowerBound = 2\ni29.upperBound = KleeneStar\nc7.cardinality = i29\nc3.feature = Follower\ni30.lowerBound = 3\ni30.upperBound = KleeneStar\nc3.cardinality = i30\nc8.feature = FastMoving\ni31.lowerBound = 1\ni31.upperBound = KleeneStar\nc8.cardinality = i31\nc4.feature = Platoon\ni32.lowerBound = 1\ni32.upperBound = 1\nc4.cardinality = i32\nc9.feature = Leader\ni33.lowerBound = 1\ni33.upperBound = 1\nc9.cardinality = i33\nFM.require = c2 -> c7 + c4 -> c9 \nFM.exclude = c0 -> c5 + c1 -> c6 + c3 -> c8 \n}\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "ascend-eggnog-setup-wrist", "time": "2024-07-25 12:00:58.357459", "cmd": 1} {"id": 14017, "parent": null, "code": "module featureModel\n\none sig FM {\n root: one Feature,\n group: set Feature,\n require: ConstraintNode -> ConstraintNode,\n exclude: ConstraintNode -> ConstraintNode,\n config: set Instance\n}\n\nabstract sig Feature {\n groupCardinality: set Intervall,\n groupInstanceCardinality: set Intervall,\n cardinality: some Intervall,\n parent: lone Feature,\n instances: set Instance\n}\n\nsig Instance {\n feature: one Feature,\n instanceParent: lone Instance\n}\n\nsig Intervall {\n lowerBound: Int,\n upperBound: Int\n}\n\nabstract sig ConstraintNode {\n feature: one Feature,\n cardinality: some Intervall\n}\n\none sig KleeneStar {}\n\none sig Platoon extends Feature {}\nfact { AddressingScheme.parent = Platoon }\none sig AddressingScheme extends Feature {}\nfact { Absolute.parent = AddressingScheme }\none sig Absolute extends Feature {}\nfact { Relative.parent = AddressingScheme }\none sig Relative extends Feature {}\nfact { Maneuver.parent = Platoon }\none sig Maneuver extends Feature {}\nfact { Cutin.parent = Maneuver }\none sig Cutin extends Feature {}\nfact { Merge.parent = Maneuver }\none sig Merge extends Feature {}\none sig PlatoonfeatureInstanceCard, PlatoongroupInstanceCard, PlatoongroupTypeCard extends Intervall{}\nfact {\nPlatoonfeatureInstanceCard.lowerBound =1\nPlatoonfeatureInstanceCard.upperBound =1\nPlatoongroupInstanceCard.lowerBound =4\nPlatoongroupInstanceCard.upperBound =KleeneStar\nPlatoongroupTypeCard.lowerBound =4\nPlatoongroupTypeCard.upperBound =4\n}\none sig AddressingSchemefeatureInstanceCard, AddressingSchemegroupInstanceCard, AddressingSchemegroupTypeCard extends Intervall{}\nfact {\nAddressingSchemefeatureInstanceCard.lowerBound =1\nAddressingSchemefeatureInstanceCard.upperBound =1\nAddressingSchemegroupInstanceCard.lowerBound =1\nAddressingSchemegroupInstanceCard.upperBound =1\nAddressingSchemegroupTypeCard.lowerBound =1\nAddressingSchemegroupTypeCard.upperBound =1\n}\none sig AbsolutefeatureInstanceCard, AbsolutegroupInstanceCard, AbsolutegroupTypeCard extends Intervall{}\nfact {\nAbsolutefeatureInstanceCard.lowerBound =1\nAbsolutefeatureInstanceCard.upperBound =1\nAbsolutegroupInstanceCard.lowerBound =1\nAbsolutegroupInstanceCard.upperBound =1\nAbsolutegroupTypeCard.lowerBound =1\nAbsolutegroupTypeCard.upperBound =1\n}\none sig RelativefeatureInstanceCard, RelativegroupInstanceCard, RelativegroupTypeCard extends Intervall{}\nfact {\nRelativefeatureInstanceCard.lowerBound =1\nRelativefeatureInstanceCard.upperBound =1\nRelativegroupInstanceCard.lowerBound =1\nRelativegroupInstanceCard.upperBound =1\nRelativegroupTypeCard.lowerBound =1\nRelativegroupTypeCard.upperBound =1\n}\none sig ManeuverfeatureInstanceCard, ManeuvergroupInstanceCard, ManeuvergroupTypeCard extends Intervall{}\nfact {\nManeuverfeatureInstanceCard.lowerBound =1\nManeuverfeatureInstanceCard.upperBound =1\nManeuvergroupInstanceCard.lowerBound =2\nManeuvergroupInstanceCard.upperBound =KleeneStar\nManeuvergroupTypeCard.lowerBound =2\nManeuvergroupTypeCard.upperBound =2\n}\none sig CutinfeatureInstanceCard, CutingroupInstanceCard, CutingroupTypeCard extends Intervall{}\nfact {\nCutinfeatureInstanceCard.lowerBound =1\nCutinfeatureInstanceCard.upperBound =1\nCutingroupInstanceCard.lowerBound =1\nCutingroupInstanceCard.upperBound =1\nCutingroupTypeCard.lowerBound =1\nCutingroupTypeCard.upperBound =1\n}\none sig MergefeatureInstanceCard, MergegroupInstanceCard, MergegroupTypeCard extends Intervall{}\nfact {\nMergefeatureInstanceCard.lowerBound =1\nMergefeatureInstanceCard.upperBound =1\nMergegroupInstanceCard.lowerBound =1\nMergegroupInstanceCard.upperBound =1\nMergegroupTypeCard.lowerBound =1\nMergegroupTypeCard.upperBound =1\n}", "permalink": "spiral-ouch-rural-hybrid", "time": "2024-07-25 11:27:05.740226", "cmd": 1} {"id": 14020, "parent": 14019, "code": "module featureModel\n\none sig FM {\n root: one Feature,\n group: set Feature,\n require: ConstraintNode -> ConstraintNode,\n exclude: ConstraintNode -> ConstraintNode,\n config: set Instance\n}\n\nabstract sig Feature {\n groupCardinality: set Intervall,\n groupInstanceCardinality: set Intervall,\n cardinality: some Intervall,\n parent: lone Feature,\n instances: set Instance\n}\n\nsig Instance {\n feature: one Feature,\n instanceParent: lone Instance\n}\n\nsig Intervall {\n lowerBound: Int,\n upperBound: Int\n}\n\nabstract sig ConstraintNode {\n feature: one Feature,\n cardinality: some Intervall\n}\n\none sig KleeneStar {}\n\none sig Platoon extends Feature {}\nfact { AddressingScheme.parent = Platoon }\none sig AddressingScheme extends Feature {}\nfact { Absolute.parent = AddressingScheme }\none sig Absolute extends Feature {}\nfact { Relative.parent = AddressingScheme }\none sig Relative extends Feature {}\nfact { Maneuver.parent = Platoon }\none sig Maneuver extends Feature {}\nfact { Cutin.parent = Maneuver }\none sig Cutin extends Feature {}\nfact { Merge.parent = Maneuver }\none sig Merge extends Feature {}\none sig PlatoonfeatureInstanceCard, PlatoongroupInstanceCard, PlatoongroupTypeCard extends Intervall{}\nfact {\nPlatoonfeatureInstanceCard.lowerBound =1\nPlatoonfeatureInstanceCard.upperBound =1\nPlatoongroupInstanceCard.lowerBound =4\nPlatoongroupInstanceCard.upperBound =KleeneStar\nPlatoongroupTypeCard.lowerBound =4\nPlatoongroupTypeCard.upperBound =4\n}\none sig AddressingSchemefeatureInstanceCard, AddressingSchemegroupInstanceCard, AddressingSchemegroupTypeCard extends Intervall{}\nfact {\nAddressingSchemefeatureInstanceCard.lowerBound =1\nAddressingSchemefeatureInstanceCard.upperBound =1\nAddressingSchemegroupInstanceCard.lowerBound =1\nAddressingSchemegroupInstanceCard.upperBound =1\nAddressingSchemegroupTypeCard.lowerBound =1\nAddressingSchemegroupTypeCard.upperBound =1\n}\none sig AbsolutefeatureInstanceCard, AbsolutegroupInstanceCard, AbsolutegroupTypeCard extends Intervall{}\nfact {\nAbsolutefeatureInstanceCard.lowerBound =1\nAbsolutefeatureInstanceCard.upperBound =1\nAbsolutegroupInstanceCard.lowerBound =1\nAbsolutegroupInstanceCard.upperBound =1\nAbsolutegroupTypeCard.lowerBound =1\nAbsolutegroupTypeCard.upperBound =1\n}\none sig RelativefeatureInstanceCard, RelativegroupInstanceCard, RelativegroupTypeCard extends Intervall{}\nfact {\nRelativefeatureInstanceCard.lowerBound =1\nRelativefeatureInstanceCard.upperBound =1\nRelativegroupInstanceCard.lowerBound =1\nRelativegroupInstanceCard.upperBound =1\nRelativegroupTypeCard.lowerBound =1\nRelativegroupTypeCard.upperBound =1\n}\none sig ManeuverfeatureInstanceCard, ManeuvergroupInstanceCard, ManeuvergroupTypeCard extends Intervall{}\nfact {\nManeuverfeatureInstanceCard.lowerBound =1\nManeuverfeatureInstanceCard.upperBound =1\nManeuvergroupInstanceCard.lowerBound =2\nManeuvergroupInstanceCard.upperBound =KleeneStar\nManeuvergroupTypeCard.lowerBound =2\nManeuvergroupTypeCard.upperBound =2\n}\none sig CutinfeatureInstanceCard, CutingroupInstanceCard, CutingroupTypeCard extends Intervall{}\nfact {\nCutinfeatureInstanceCard.lowerBound =1\nCutinfeatureInstanceCard.upperBound =1\nCutingroupInstanceCard.lowerBound =1\nCutingroupInstanceCard.upperBound =1\nCutingroupTypeCard.lowerBound =1\nCutingroupTypeCard.upperBound =1\n}\none sig MergefeatureInstanceCard, MergegroupInstanceCard, MergegroupTypeCard extends Intervall{}\nfact {\nMergefeatureInstanceCard.lowerBound =1\nMergefeatureInstanceCard.upperBound =1\nMergegroupInstanceCard.lowerBound =1\nMergegroupInstanceCard.upperBound =1\nMergegroupTypeCard.lowerBound =1\nMergegroupTypeCard.upperBound =1\n}\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "cotton-oak-gray-shame", "time": "2024-07-25 11:28:05.789352", "cmd": 1} {"id": 14021, "parent": 14020, "code": "module featureModel\n\none sig FM {\n root: one Feature,\n group: set Feature,\n require: ConstraintNode -> ConstraintNode,\n exclude: ConstraintNode -> ConstraintNode,\n config: set Instance\n}\n\nabstract sig Feature {\n groupCardinality: set Intervall,\n groupInstanceCardinality: set Intervall,\n cardinality: some Intervall,\n parent: lone Feature,\n instances: set Instance\n}\n\nsig Instance {\n feature: one Feature,\n instanceParent: lone Instance\n}\n\nsig Intervall {\n lowerBound: Int,\n upperBound: Int\n}\n\nabstract sig ConstraintNode {\n feature: one Feature,\n cardinality: some Intervall\n}\n\none sig KleeneStar {}\n\none sig Platoon extends Feature {}\nfact { AddressingScheme.parent = Platoon }\none sig AddressingScheme extends Feature {}\nfact { Absolute.parent = AddressingScheme }\none sig Absolute extends Feature {}\nfact { Relative.parent = AddressingScheme }\none sig Relative extends Feature {}\nfact { Maneuver.parent = Platoon }\none sig Maneuver extends Feature {}\nfact { Cutin.parent = Maneuver }\none sig Cutin extends Feature {}\nfact { Merge.parent = Maneuver }\none sig Merge extends Feature {}\none sig PlatoonfeatureInstanceCard, PlatoongroupInstanceCard, PlatoongroupTypeCard extends Intervall{}\nfact {\nPlatoonfeatureInstanceCard.lowerBound =1\nPlatoonfeatureInstanceCard.upperBound =1\nPlatoongroupInstanceCard.lowerBound =4\nPlatoongroupInstanceCard.upperBound =KleeneStar\nPlatoongroupTypeCard.lowerBound =4\nPlatoongroupTypeCard.upperBound =4\n}\none sig AddressingSchemefeatureInstanceCard, AddressingSchemegroupInstanceCard, AddressingSchemegroupTypeCard extends Intervall{}\nfact {\nAddressingSchemefeatureInstanceCard.lowerBound =1\nAddressingSchemefeatureInstanceCard.upperBound =1\nAddressingSchemegroupInstanceCard.lowerBound =1\nAddressingSchemegroupInstanceCard.upperBound =1\nAddressingSchemegroupTypeCard.lowerBound =1\nAddressingSchemegroupTypeCard.upperBound =1\n}\none sig AbsolutefeatureInstanceCard, AbsolutegroupInstanceCard, AbsolutegroupTypeCard extends Intervall{}\nfact {\nAbsolutefeatureInstanceCard.lowerBound =1\nAbsolutefeatureInstanceCard.upperBound =1\nAbsolutegroupInstanceCard.lowerBound =1\nAbsolutegroupInstanceCard.upperBound =1\nAbsolutegroupTypeCard.lowerBound =1\nAbsolutegroupTypeCard.upperBound =1\n}\none sig RelativefeatureInstanceCard, RelativegroupInstanceCard, RelativegroupTypeCard extends Intervall{}\nfact {\nRelativefeatureInstanceCard.lowerBound =1\nRelativefeatureInstanceCard.upperBound =1\nRelativegroupInstanceCard.lowerBound =1\nRelativegroupInstanceCard.upperBound =1\nRelativegroupTypeCard.lowerBound =1\nRelativegroupTypeCard.upperBound =1\n}\none sig ManeuverfeatureInstanceCard, ManeuvergroupInstanceCard, ManeuvergroupTypeCard extends Intervall{}\nfact {\nManeuverfeatureInstanceCard.lowerBound =1\nManeuverfeatureInstanceCard.upperBound =1\nManeuvergroupInstanceCard.lowerBound =2\nManeuvergroupInstanceCard.upperBound =KleeneStar\nManeuvergroupTypeCard.lowerBound =2\nManeuvergroupTypeCard.upperBound =2\n}\none sig CutinfeatureInstanceCard, CutingroupInstanceCard, CutingroupTypeCard extends Intervall{}\nfact {\nCutinfeatureInstanceCard.lowerBound =1\nCutinfeatureInstanceCard.upperBound =1\nCutingroupInstanceCard.lowerBound =1\nCutingroupInstanceCard.upperBound =1\nCutingroupTypeCard.lowerBound =1\nCutingroupTypeCard.upperBound =1\n}\none sig MergefeatureInstanceCard, MergegroupInstanceCard, MergegroupTypeCard extends Intervall{}\nfact {\nMergefeatureInstanceCard.lowerBound =1\nMergefeatureInstanceCard.upperBound =1\nMergegroupInstanceCard.lowerBound =1\nMergegroupInstanceCard.upperBound =1\nMergegroupTypeCard.lowerBound =1\nMergegroupTypeCard.upperBound =1\n}\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "armful-tag-serve-jackal", "time": "2024-07-25 11:28:08.170047", "cmd": 1} {"id": 14023, "parent": 14021, "code": "module featureModel\n\none sig FM {\n root: one Feature,\n group: set Feature,\n require: ConstraintNode -> ConstraintNode,\n exclude: ConstraintNode -> ConstraintNode,\n config: set Instance\n}\n\nabstract sig Feature {\n groupCardinality: set Intervall,\n groupInstanceCardinality: set Intervall,\n cardinality: some Intervall,\n parent: lone Feature,\n instances: set Instance\n}\n\nsig Instance {\n feature: one Feature,\n instanceParent: lone Instance\n}\n\nsig Intervall {\n lowerBound: Int,\n upperBound: Int\n}\n\nabstract sig ConstraintNode {\n feature: one Feature,\n cardinality: some Intervall\n}\n\none sig KleeneStar {}\n\none sig Platoon extends Feature {}\nfact { AddressingScheme.parent = Platoon }\none sig AddressingScheme extends Feature {}\none sig PlatoonfeatureInstanceCard, PlatoongroupInstanceCard, PlatoongroupTypeCard extends Intervall{}\nfact {\nPlatoonfeatureInstanceCard.lowerBound =1\nPlatoonfeatureInstanceCard.upperBound =1\nPlatoongroupInstanceCard.lowerBound =4\nPlatoongroupInstanceCard.upperBound =KleeneStar\nPlatoongroupTypeCard.lowerBound =4\nPlatoongroupTypeCard.upperBound =4\n}\none sig AddressingSchemefeatureInstanceCard, AddressingSchemegroupInstanceCard, AddressingSchemegroupTypeCard extends Intervall{}\nfact {\nAddressingSchemefeatureInstanceCard.lowerBound =1\nAddressingSchemefeatureInstanceCard.upperBound =1\nAddressingSchemegroupInstanceCard.lowerBound =1\nAddressingSchemegroupInstanceCard.upperBound =1\nAddressingSchemegroupTypeCard.lowerBound =1\nAddressingSchemegroupTypeCard.upperBound =1\n}\npred show{}\nrun show", "permalink": "carol-judo-anthem-rice", "time": "2024-07-25 11:31:54.066525", "cmd": 1} {"id": 14028, "parent": 14027, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich ueberschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Channels, Regular, Compact, HighThroughput, Reliable extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i16, i17, i18, i19, i24, i25 extends Intervall{}\none sig c0, c5 extends ConstraintNode{}\n\n\nfact {\n //Platoon\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 2\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 2\ni3.upperBound = 2\nPlatoon.groupCardinality = i3\n\n//Addressing Scheme\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\n\n//Addressing Scheme Children: Regular, Compact\nRegular.parent = AddressingScheme\ni16.lowerBound = 0\ni16.upperBound = 1\nRegular.cardinality = i16\nCompact.parent = AddressingScheme\ni17.lowerBound = 0\ni17.upperBound = 1\nCompact.cardinality = i17\n\n//Channels\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\n\n//Channels Children: High Throughput, Reliable\nHighThroughput.parent = Channels\ni18.lowerBound = 1\ni18.upperBound = 8\nHighThroughput.cardinality = i18\nReliable.parent = Channels\ni19.lowerBound = 1\ni19.upperBound = 32\nReliable.cardinality = i19\n\n//Cardinality: Compact / High Throughput\nc0.feature = Compact\ni24.lowerBound = 1\ni24.upperBound = KleeneStar\nc0.cardinality = i24\nc5.feature = HighThroughput\ni25.lowerBound = 10\ni25.upperBound = 20\nc5.cardinality = i25\n\nFM.exclude = c0 -> c5\n\n\n\n}\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "mockup-tattoo-kabob-aged", "time": "2024-07-25 11:43:47.984361", "cmd": 1} {"id": 14030, "parent": 14029, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich ueberschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Channels, Regular, Compact, HighThroughput, Reliable extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i16, i17, i18, i19, i24, i25 extends Intervall{}\none sig c0, c5 extends ConstraintNode{}\n\n\nfact {\n //Platoon\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 2\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 2\ni3.upperBound = 2\nPlatoon.groupCardinality = i3\n\n//Addressing Scheme\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\n\n//Addressing Scheme Children: Regular, Compact\nRegular.parent = AddressingScheme\ni16.lowerBound = 0\ni16.upperBound = 1\nRegular.cardinality = i16\nCompact.parent = AddressingScheme\ni17.lowerBound = 0\ni17.upperBound = 1\nCompact.cardinality = i17\n\n//Channels\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\n\n//Channels Children: High Throughput, Reliable\nHighThroughput.parent = Channels\ni18.lowerBound = 1\ni18.upperBound = 8\nHighThroughput.cardinality = i18\nReliable.parent = Channels\ni19.lowerBound = 1\ni19.upperBound = 32\nReliable.cardinality = i19\n\n//Cardinality: Compact / High Throughput\nc0.feature = Compact\ni24.lowerBound = 1\ni24.upperBound = KleeneStar\nc0.cardinality = i24\nc5.feature = HighThroughput\ni25.lowerBound = 10\ni25.upperBound = 20\nc5.cardinality = i25\n\nFM.exclude = c0 -> c5\n\n\n\n}\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "choice-neon-wages-primp", "time": "2024-07-25 11:44:17.693213", "cmd": 1} {"id": 14032, "parent": 14031, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\none sig Platoon, AddressingScheme, Channels, Movement, Node, Regular, Compact, HighThroughput, Reliable, SlowMoving, FastMoving, Follower, Leader extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25, i26, i27, i28, i29, i30, i31, i32, i33 extends Intervall{}\none sig c0, c1, c2, c3, c4, c5, c6, c7, c8, c9 extends ConstraintNode{}\nfact {\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 4\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 4\ni3.upperBound = KleeneStar\nPlatoon.groupCardinality = i3\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\nMovement.parent = Platoon\ni10.lowerBound = 1\ni10.upperBound = 1\nMovement.cardinality = i10\ni11.lowerBound = 1\ni11.upperBound = 1\nMovement.groupInstanceCardinality = i11\ni12.lowerBound = 1\ni12.upperBound = 1\nMovement.groupCardinality = i12\nNode.parent = Platoon\ni13.lowerBound = 1\ni13.upperBound = KleeneStar\nNode.cardinality = i13\ni14.lowerBound = 1\ni14.upperBound = 1\nNode.groupInstanceCardinality = i14\ni15.lowerBound = 1\ni15.upperBound = 2\nNode.groupCardinality = i15\nRegular.parent = AddressingScheme\ni16.lowerBound = 0\ni16.upperBound = 1\nRegular.cardinality = i16\nCompact.parent = AddressingScheme\ni17.lowerBound = 0\ni17.upperBound = 1\nCompact.cardinality = i17\nHighThroughput.parent = Channels\ni18.lowerBound = 1\ni18.upperBound = 8\nHighThroughput.cardinality = i18\nReliable.parent = Channels\ni19.lowerBound = 1\ni19.upperBound = 32\nReliable.cardinality = i19\nSlowMoving.parent = Movement\ni20.lowerBound = 0\ni20.upperBound = 1\nSlowMoving.cardinality = i20\nFastMoving.parent = Movement\ni21.lowerBound = 0\ni21.upperBound = 1\nFastMoving.cardinality = i21\nFollower.parent = Node\ni22.lowerBound = 0\ni22.upperBound = 1\nFollower.cardinality = i22\nLeader.parent = Node\ni23.lowerBound = 0\ni23.upperBound = 1\nLeader.cardinality = i23\nc0.feature = Compact\ni24.lowerBound = 1\ni24.upperBound = KleeneStar\nc0.cardinality = i24\nc5.feature = HighThroughput\ni25.lowerBound = 10\ni25.upperBound = 20\nc5.cardinality = i25\nc1.feature = HighThroughput\ni26.lowerBound = 1\ni26.upperBound = KleeneStar\nc1.cardinality = i26\nc6.feature = Reliable\ni27.lowerBound = 3\ni27.upperBound = KleeneStar\nc6.cardinality = i27\nc2.feature = FastMoving\ni28.lowerBound = 1\ni28.upperBound = 1\nc2.cardinality = i28\nc7.feature = Reliable\ni29.lowerBound = 2\ni29.upperBound = KleeneStar\nc7.cardinality = i29\nc3.feature = Follower\ni30.lowerBound = 3\ni30.upperBound = KleeneStar\nc3.cardinality = i30\nc8.feature = FastMoving\ni31.lowerBound = 1\ni31.upperBound = KleeneStar\nc8.cardinality = i31\nc4.feature = Platoon\ni32.lowerBound = 1\ni32.upperBound = 1\nc4.cardinality = i32\nc9.feature = Leader\ni33.lowerBound = 1\ni33.upperBound = 1\nc9.cardinality = i33\nFM.require = c2 -> c7 + c4 -> c9 \nFM.exclude = c0 -> c5 + c1 -> c6 + c3 -> c8 \n}\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "unable-scared-outage-reflex", "time": "2024-07-25 11:48:34.885915", "cmd": 1} {"id": 14034, "parent": 14033, "code": "\none sig Platoon {\n children : set AddressingScheme + Channels + Movement + Member\n} {\n -- feature instance multiplicity\n 1 = # children & AddressingScheme\n 1 = # children & Channels\n 1 = # children & Movement\n # children & Member >= 1\n -- group instance multiplicity\n # children >= 4\n -- group type multiplicity (cannot easily count: enumerate subsets)\n some AddressingScheme and some Channels and some Movement and some Member\n -- example for <3, 4>\n -- (no AddressingScheme and some Channels and some Movement and some Member) or\n -- (some AddressingScheme and no Channels and some Movement and some Member) or\n -- (some AddressingScheme and some Channels and no Movement and some Member) or\n -- (some AddressingScheme and some Channels and some Movement and no Member) or\n -- (some AddressingScheme and some Channels and some Movement and some Member)\n}\n\nsig AddressingScheme {\n children : set Regular + Compact\n} {\n -- feature instance multiplicity\n # children & Regular >= 0\n # children & Regular <= 1\n -- TODO why does swapping order alter result\n # children & Regular >= 0\n # children & Compact <= 1\n -- group instance multiplicity\n # children = 1\n}\n\nsig Channels {}\nsig Movement {}\nsig Member {}\nsig Regular {}\nsig Compact {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 but 5 Int", "permalink": "cloud-cape-depict-zone", "time": "2024-07-25 11:51:51.711180", "cmd": 1} {"id": 14035, "parent": 14034, "code": "// Alloy model generated from Feature model\n\none sig Platoon {\n children: set AddressingScheme + Channels + Movement + Member\n} {\n # children & AddressingScheme >= 1\n # children & AddressingScheme <= 1\n # children & Channels >= 1\n # children & Channels <= 1\n # children & Movement >= 1\n # children & Movement <= 1\n # children & Member >= 1\n # children >= 4\n}\nsig AddressingScheme {\n children: set Regular + Compact\n} {\n # children & Regular >= 0\n # children & Regular <= 1\n # children & Compact >= 0\n # children & Compact <= 1\n # children >= 1\n # children <= 1\n}\nsig Regular {}\n\nsig Compact {}\n\n\nsig Channels {}\n\nsig Movement {}\n\nsig Member {}\n\n\nfact childrenBelongToParent {\n Platoon.children = AddressingScheme + Channels + Movement + Member\n AddressingScheme.children = Regular + Compact\n}\n\nrun {} for 10 ", "permalink": "macaw-hazy-cusp-anew", "time": "2024-07-25 11:52:03.748239", "cmd": 1} {"id": 14036, "parent": 14035, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\none sig Platoon, AddressingScheme, Channels, Movement, Node, Regular, Compact, HighThroughput, Reliable, SlowMoving, FastMoving, Follower, Leader extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25, i26, i27, i28, i29, i30, i31, i32, i33 extends Intervall{}\none sig c0, c1, c2, c3, c4, c5, c6, c7, c8, c9 extends ConstraintNode{}\nfact {\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 4\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 4\ni3.upperBound = KleeneStar\nPlatoon.groupCardinality = i3\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\nMovement.parent = Platoon\ni10.lowerBound = 1\ni10.upperBound = 1\nMovement.cardinality = i10\ni11.lowerBound = 1\ni11.upperBound = 1\nMovement.groupInstanceCardinality = i11\ni12.lowerBound = 1\ni12.upperBound = 1\nMovement.groupCardinality = i12\nNode.parent = Platoon\ni13.lowerBound = 1\ni13.upperBound = KleeneStar\nNode.cardinality = i13\ni14.lowerBound = 1\ni14.upperBound = 1\nNode.groupInstanceCardinality = i14\ni15.lowerBound = 1\ni15.upperBound = 2\nNode.groupCardinality = i15\nRegular.parent = AddressingScheme\ni16.lowerBound = 0\ni16.upperBound = 1\nRegular.cardinality = i16\nCompact.parent = AddressingScheme\ni17.lowerBound = 0\ni17.upperBound = 1\nCompact.cardinality = i17\nHighThroughput.parent = Channels\ni18.lowerBound = 1\ni18.upperBound = 8\nHighThroughput.cardinality = i18\nReliable.parent = Channels\ni19.lowerBound = 1\ni19.upperBound = 32\nReliable.cardinality = i19\nSlowMoving.parent = Movement\ni20.lowerBound = 0\ni20.upperBound = 1\nSlowMoving.cardinality = i20\nFastMoving.parent = Movement\ni21.lowerBound = 0\ni21.upperBound = 1\nFastMoving.cardinality = i21\nFollower.parent = Node\ni22.lowerBound = 0\ni22.upperBound = 1\nFollower.cardinality = i22\nLeader.parent = Node\ni23.lowerBound = 0\ni23.upperBound = 1\nLeader.cardinality = i23\nc0.feature = Compact\ni24.lowerBound = 1\ni24.upperBound = KleeneStar\nc0.cardinality = i24\nc5.feature = HighThroughput\ni25.lowerBound = 10\ni25.upperBound = 20\nc5.cardinality = i25\nc1.feature = HighThroughput\ni26.lowerBound = 1\ni26.upperBound = KleeneStar\nc1.cardinality = i26\nc6.feature = Reliable\ni27.lowerBound = 3\ni27.upperBound = KleeneStar\nc6.cardinality = i27\nc2.feature = FastMoving\ni28.lowerBound = 1\ni28.upperBound = 1\nc2.cardinality = i28\nc7.feature = Reliable\ni29.lowerBound = 2\ni29.upperBound = KleeneStar\nc7.cardinality = i29\nc3.feature = Follower\ni30.lowerBound = 3\ni30.upperBound = KleeneStar\nc3.cardinality = i30\nc8.feature = FastMoving\ni31.lowerBound = 1\ni31.upperBound = KleeneStar\nc8.cardinality = i31\nc4.feature = Platoon\ni32.lowerBound = 1\ni32.upperBound = 1\nc4.cardinality = i32\nc9.feature = Leader\ni33.lowerBound = 1\ni33.upperBound = 1\nc9.cardinality = i33\nFM.require = c2 -> c7 + c4 -> c9 \nFM.exclude = c0 -> c5 + c1 -> c6 + c3 -> c8 \n}\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "slept-bauble-gush-luster", "time": "2024-07-25 11:52:26.341675", "cmd": 1} {"id": 14040, "parent": 14039, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\none sig Platoon, AddressingScheme, Channels, Movement, Node, Regular, Compact, HighThroughput, Reliable, SlowMoving, FastMoving, Follower, Leader extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25, i26, i27, i28, i29, i30, i31, i32, i33 extends Intervall{}\none sig c0, c1, c2, c3, c4, c5, c6, c7, c8, c9 extends ConstraintNode{}\nfact {\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 4\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 4\ni3.upperBound = KleeneStar\nPlatoon.groupCardinality = i3\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\nMovement.parent = Platoon\ni10.lowerBound = 1\ni10.upperBound = 1\nMovement.cardinality = i10\ni11.lowerBound = 1\ni11.upperBound = 1\nMovement.groupInstanceCardinality = i11\ni12.lowerBound = 1\ni12.upperBound = 1\nMovement.groupCardinality = i12\nNode.parent = Platoon\ni13.lowerBound = 1\ni13.upperBound = KleeneStar\nNode.cardinality = i13\ni14.lowerBound = 1\ni14.upperBound = 1\nNode.groupInstanceCardinality = i14\ni15.lowerBound = 1\ni15.upperBound = 2\nNode.groupCardinality = i15\nRegular.parent = AddressingScheme\ni16.lowerBound = 0\ni16.upperBound = 1\nRegular.cardinality = i16\nCompact.parent = AddressingScheme\ni17.lowerBound = 0\ni17.upperBound = 1\nCompact.cardinality = i17\nHighThroughput.parent = Channels\ni18.lowerBound = 1\ni18.upperBound = 8\nHighThroughput.cardinality = i18\nReliable.parent = Channels\ni19.lowerBound = 1\ni19.upperBound = 32\nReliable.cardinality = i19\nSlowMoving.parent = Movement\ni20.lowerBound = 0\ni20.upperBound = 1\nSlowMoving.cardinality = i20\nFastMoving.parent = Movement\ni21.lowerBound = 0\ni21.upperBound = 1\nFastMoving.cardinality = i21\nFollower.parent = Node\ni22.lowerBound = 0\ni22.upperBound = 1\nFollower.cardinality = i22\nLeader.parent = Node\ni23.lowerBound = 0\ni23.upperBound = 1\nLeader.cardinality = i23\nc0.feature = Compact\ni24.lowerBound = 1\ni24.upperBound = KleeneStar\nc0.cardinality = i24\nc5.feature = HighThroughput\ni25.lowerBound = 10\ni25.upperBound = 20\nc5.cardinality = i25\nc1.feature = HighThroughput\ni26.lowerBound = 1\ni26.upperBound = KleeneStar\nc1.cardinality = i26\nc6.feature = Reliable\ni27.lowerBound = 3\ni27.upperBound = KleeneStar\nc6.cardinality = i27\nc2.feature = FastMoving\ni28.lowerBound = 1\ni28.upperBound = 1\nc2.cardinality = i28\nc7.feature = Reliable\ni29.lowerBound = 2\ni29.upperBound = KleeneStar\nc7.cardinality = i29\nc3.feature = Follower\ni30.lowerBound = 3\ni30.upperBound = KleeneStar\nc3.cardinality = i30\nc8.feature = FastMoving\ni31.lowerBound = 1\ni31.upperBound = KleeneStar\nc8.cardinality = i31\nc4.feature = Platoon\ni32.lowerBound = 1\ni32.upperBound = 1\nc4.cardinality = i32\nc9.feature = Leader\ni33.lowerBound = 1\ni33.upperBound = 1\nc9.cardinality = i33\nFM.require = c2 -> c7 + c4 -> c9 \nFM.exclude = c0 -> c5 + c1 -> c6 + c3 -> c8 \n}\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "refuse-unmade-fiddle-grudge", "time": "2024-07-25 11:58:35.574031", "cmd": 1} {"id": 14042, "parent": 14041, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\none sig Platoon, AddressingScheme, Channels, Movement, Node, Regular, Compact, HighThroughput, Reliable, SlowMoving, FastMoving, Follower, Leader extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25, i26, i27, i28, i29, i30, i31, i32, i33 extends Intervall{}\none sig c0, c1, c2, c3, c4, c5, c6, c7, c8, c9 extends ConstraintNode{}\nfact {\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 4\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 4\ni3.upperBound = KleeneStar\nPlatoon.groupCardinality = i3\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\nMovement.parent = Platoon\ni10.lowerBound = 1\ni10.upperBound = 1\nMovement.cardinality = i10\ni11.lowerBound = 1\ni11.upperBound = 1\nMovement.groupInstanceCardinality = i11\ni12.lowerBound = 1\ni12.upperBound = 1\nMovement.groupCardinality = i12\nNode.parent = Platoon\ni13.lowerBound = 1\ni13.upperBound = KleeneStar\nNode.cardinality = i13\ni14.lowerBound = 1\ni14.upperBound = 1\nNode.groupInstanceCardinality = i14\ni15.lowerBound = 1\ni15.upperBound = 2\nNode.groupCardinality = i15\nRegular.parent = AddressingScheme\ni16.lowerBound = 0\ni16.upperBound = 1\nRegular.cardinality = i16\nCompact.parent = AddressingScheme\ni17.lowerBound = 0\ni17.upperBound = 1\nCompact.cardinality = i17\nHighThroughput.parent = Channels\ni18.lowerBound = 1\ni18.upperBound = 8\nHighThroughput.cardinality = i18\nReliable.parent = Channels\ni19.lowerBound = 1\ni19.upperBound = 32\nReliable.cardinality = i19\nSlowMoving.parent = Movement\ni20.lowerBound = 0\ni20.upperBound = 1\nSlowMoving.cardinality = i20\nFastMoving.parent = Movement\ni21.lowerBound = 0\ni21.upperBound = 1\nFastMoving.cardinality = i21\nFollower.parent = Node\ni22.lowerBound = 0\ni22.upperBound = 1\nFollower.cardinality = i22\nLeader.parent = Node\ni23.lowerBound = 0\ni23.upperBound = 1\nLeader.cardinality = i23\nc0.feature = Compact\ni24.lowerBound = 1\ni24.upperBound = KleeneStar\nc0.cardinality = i24\nc5.feature = HighThroughput\ni25.lowerBound = 10\ni25.upperBound = 20\nc5.cardinality = i25\nc1.feature = HighThroughput\ni26.lowerBound = 1\ni26.upperBound = KleeneStar\nc1.cardinality = i26\nc6.feature = Reliable\ni27.lowerBound = 3\ni27.upperBound = KleeneStar\nc6.cardinality = i27\nc2.feature = FastMoving\ni28.lowerBound = 1\ni28.upperBound = 1\nc2.cardinality = i28\nc7.feature = Reliable\ni29.lowerBound = 2\ni29.upperBound = KleeneStar\nc7.cardinality = i29\nc3.feature = Follower\ni30.lowerBound = 3\ni30.upperBound = KleeneStar\nc3.cardinality = i30\nc8.feature = FastMoving\ni31.lowerBound = 1\ni31.upperBound = KleeneStar\nc8.cardinality = i31\nc4.feature = Platoon\ni32.lowerBound = 1\ni32.upperBound = 1\nc4.cardinality = i32\nc9.feature = Leader\ni33.lowerBound = 1\ni33.upperBound = 1\nc9.cardinality = i33\nFM.require = c2 -> c7 + c4 -> c9 \nFM.exclude = c0 -> c5 + c1 -> c6 + c3 -> c8 \n}\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "stack-sugar-gender-stable", "time": "2024-07-25 12:01:07.047961", "cmd": 1} {"id": 14043, "parent": 14042, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich berschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\none sig Platoon, AddressingScheme, Channels, Movement, Node, Regular, Compact, HighThroughput, Reliable, SlowMoving, FastMoving, Follower, Leader extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25, i26, i27, i28, i29, i30, i31, i32, i33 extends Intervall{}\none sig c0, c1, c2, c3, c4, c5, c6, c7, c8, c9 extends ConstraintNode{}\nfact {\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 4\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 4\ni3.upperBound = KleeneStar\nPlatoon.groupCardinality = i3\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\nMovement.parent = Platoon\ni10.lowerBound = 1\ni10.upperBound = 1\nMovement.cardinality = i10\ni11.lowerBound = 1\ni11.upperBound = 1\nMovement.groupInstanceCardinality = i11\ni12.lowerBound = 1\ni12.upperBound = 1\nMovement.groupCardinality = i12\nNode.parent = Platoon\ni13.lowerBound = 1\ni13.upperBound = KleeneStar\nNode.cardinality = i13\ni14.lowerBound = 1\ni14.upperBound = 1\nNode.groupInstanceCardinality = i14\ni15.lowerBound = 1\ni15.upperBound = 2\nNode.groupCardinality = i15\nRegular.parent = AddressingScheme\ni16.lowerBound = 0\ni16.upperBound = 1\nRegular.cardinality = i16\nCompact.parent = AddressingScheme\ni17.lowerBound = 0\ni17.upperBound = 1\nCompact.cardinality = i17\nHighThroughput.parent = Channels\ni18.lowerBound = 1\ni18.upperBound = 8\nHighThroughput.cardinality = i18\nReliable.parent = Channels\ni19.lowerBound = 1\ni19.upperBound = 32\nReliable.cardinality = i19\nSlowMoving.parent = Movement\ni20.lowerBound = 0\ni20.upperBound = 1\nSlowMoving.cardinality = i20\nFastMoving.parent = Movement\ni21.lowerBound = 0\ni21.upperBound = 1\nFastMoving.cardinality = i21\nFollower.parent = Node\ni22.lowerBound = 0\ni22.upperBound = 1\nFollower.cardinality = i22\nLeader.parent = Node\ni23.lowerBound = 0\ni23.upperBound = 1\nLeader.cardinality = i23\nc0.feature = Compact\ni24.lowerBound = 1\ni24.upperBound = KleeneStar\nc0.cardinality = i24\nc5.feature = HighThroughput\ni25.lowerBound = 10\ni25.upperBound = 20\nc5.cardinality = i25\nc1.feature = HighThroughput\ni26.lowerBound = 1\ni26.upperBound = KleeneStar\nc1.cardinality = i26\nc6.feature = Reliable\ni27.lowerBound = 3\ni27.upperBound = KleeneStar\nc6.cardinality = i27\nc2.feature = FastMoving\ni28.lowerBound = 1\ni28.upperBound = 1\nc2.cardinality = i28\nc7.feature = Reliable\ni29.lowerBound = 2\ni29.upperBound = KleeneStar\nc7.cardinality = i29\nc3.feature = Follower\ni30.lowerBound = 3\ni30.upperBound = KleeneStar\nc3.cardinality = i30\nc8.feature = FastMoving\ni31.lowerBound = 1\ni31.upperBound = KleeneStar\nc8.cardinality = i31\nc4.feature = Platoon\ni32.lowerBound = 1\ni32.upperBound = 1\nc4.cardinality = i32\nc9.feature = Leader\ni33.lowerBound = 1\ni33.upperBound = 1\nc9.cardinality = i33\nFM.require = c2 -> c7 + c4 -> c9 \nFM.exclude = c0 -> c5 + c1 -> c6 + c3 -> c8 \n}\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "boxing-spoils-gown-goal", "time": "2024-07-25 12:02:21.430145", "cmd": 1} {"id": 14045, "parent": null, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\none sig Platoon, AddressingScheme, Channels, Movement, Node, Regular, Compact, HighThroughput, Reliable, SlowMoving, FastMoving, Follower, Leader extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25, i26, i27, i28, i29, i30, i31, i32, i33 extends Intervall{}\none sig c0, c1, c2, c3, c4, c5, c6, c7, c8, c9 extends ConstraintNode{}\nfact {\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 4\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 4\ni3.upperBound = KleeneStar\nPlatoon.groupCardinality = i3\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\nMovement.parent = Platoon\ni10.lowerBound = 1\ni10.upperBound = 1\nMovement.cardinality = i10\ni11.lowerBound = 1\ni11.upperBound = 1\nMovement.groupInstanceCardinality = i11\ni12.lowerBound = 1\ni12.upperBound = 1\nMovement.groupCardinality = i12\nNode.parent = Platoon\ni13.lowerBound = 1\ni13.upperBound = KleeneStar\nNode.cardinality = i13\ni14.lowerBound = 1\ni14.upperBound = 1\nNode.groupInstanceCardinality = i14\ni15.lowerBound = 1\ni15.upperBound = 2\nNode.groupCardinality = i15\nRegular.parent = AddressingScheme\ni16.lowerBound = 0\ni16.upperBound = 1\nRegular.cardinality = i16\nCompact.parent = AddressingScheme\ni17.lowerBound = 0\ni17.upperBound = 1\nCompact.cardinality = i17\nHighThroughput.parent = Channels\ni18.lowerBound = 1\ni18.upperBound = 8\nHighThroughput.cardinality = i18\nReliable.parent = Channels\ni19.lowerBound = 1\ni19.upperBound = 32\nReliable.cardinality = i19\nSlowMoving.parent = Movement\ni20.lowerBound = 0\ni20.upperBound = 1\nSlowMoving.cardinality = i20\nFastMoving.parent = Movement\ni21.lowerBound = 0\ni21.upperBound = 1\nFastMoving.cardinality = i21\nFollower.parent = Node\ni22.lowerBound = 0\ni22.upperBound = 1\nFollower.cardinality = i22\nLeader.parent = Node\ni23.lowerBound = 0\ni23.upperBound = 1\nLeader.cardinality = i23\nc0.feature = Compact\ni24.lowerBound = 1\ni24.upperBound = KleeneStar\nc0.cardinality = i24\nc5.feature = HighThroughput\ni25.lowerBound = 10\ni25.upperBound = 20\nc5.cardinality = i25\nc1.feature = HighThroughput\ni26.lowerBound = 1\ni26.upperBound = KleeneStar\nc1.cardinality = i26\nc6.feature = Reliable\ni27.lowerBound = 3\ni27.upperBound = KleeneStar\nc6.cardinality = i27\nc2.feature = FastMoving\ni28.lowerBound = 1\ni28.upperBound = 1\nc2.cardinality = i28\nc7.feature = Reliable\ni29.lowerBound = 2\ni29.upperBound = KleeneStar\nc7.cardinality = i29\nc3.feature = Follower\ni30.lowerBound = 3\ni30.upperBound = KleeneStar\nc3.cardinality = i30\nc8.feature = FastMoving\ni31.lowerBound = 1\ni31.upperBound = KleeneStar\nc8.cardinality = i31\nc4.feature = Platoon\ni32.lowerBound = 1\ni32.upperBound = 1\nc4.cardinality = i32\nc9.feature = Leader\ni33.lowerBound = 1\ni33.upperBound = 1\nc9.cardinality = i33\nFM.require = c2 -> c7 + c4 -> c9 \nFM.exclude = c0 -> c5 + c1 -> c6 + c3 -> c8 \n}\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "booth-eating-scorch-coral", "time": "2024-07-25 15:26:12.643774", "cmd": 1} {"id": 14046, "parent": null, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\none sig Platoon, AddressingScheme, Channels, Movement, Node, Regular, Compact, HighThroughput, Reliable, SlowMoving, FastMoving, Follower, Leader extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25, i26, i27, i28, i29, i30, i31, i32, i33 extends Intervall{}\none sig c0, c1, c2, c3, c4, c5, c6, c7, c8, c9 extends ConstraintNode{}\nfact {\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 4\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 4\ni3.upperBound = KleeneStar\nPlatoon.groupCardinality = i3\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\nMovement.parent = Platoon\ni10.lowerBound = 1\ni10.upperBound = 1\nMovement.cardinality = i10\ni11.lowerBound = 1\ni11.upperBound = 1\nMovement.groupInstanceCardinality = i11\ni12.lowerBound = 1\ni12.upperBound = 1\nMovement.groupCardinality = i12\nNode.parent = Platoon\ni13.lowerBound = 1\ni13.upperBound = KleeneStar\nNode.cardinality = i13\ni14.lowerBound = 1\ni14.upperBound = 1\nNode.groupInstanceCardinality = i14\ni15.lowerBound = 1\ni15.upperBound = 2\nNode.groupCardinality = i15\nRegular.parent = AddressingScheme\ni16.lowerBound = 0\ni16.upperBound = 1\nRegular.cardinality = i16\nCompact.parent = AddressingScheme\ni17.lowerBound = 0\ni17.upperBound = 1\nCompact.cardinality = i17\nHighThroughput.parent = Channels\ni18.lowerBound = 1\ni18.upperBound = 8\nHighThroughput.cardinality = i18\nReliable.parent = Channels\ni19.lowerBound = 1\ni19.upperBound = 32\nReliable.cardinality = i19\nSlowMoving.parent = Movement\ni20.lowerBound = 0\ni20.upperBound = 1\nSlowMoving.cardinality = i20\nFastMoving.parent = Movement\ni21.lowerBound = 0\ni21.upperBound = 1\nFastMoving.cardinality = i21\nFollower.parent = Node\ni22.lowerBound = 0\ni22.upperBound = 1\nFollower.cardinality = i22\nLeader.parent = Node\ni23.lowerBound = 0\ni23.upperBound = 1\nLeader.cardinality = i23\nc0.feature = Compact\ni24.lowerBound = 1\ni24.upperBound = KleeneStar\nc0.cardinality = i24\nc5.feature = HighThroughput\ni25.lowerBound = 10\ni25.upperBound = 20\nc5.cardinality = i25\nc1.feature = HighThroughput\ni26.lowerBound = 1\ni26.upperBound = KleeneStar\nc1.cardinality = i26\nc6.feature = Reliable\ni27.lowerBound = 3\ni27.upperBound = KleeneStar\nc6.cardinality = i27\nc2.feature = FastMoving\ni28.lowerBound = 1\ni28.upperBound = 1\nc2.cardinality = i28\nc7.feature = Reliable\ni29.lowerBound = 2\ni29.upperBound = KleeneStar\nc7.cardinality = i29\nc3.feature = Follower\ni30.lowerBound = 3\ni30.upperBound = KleeneStar\nc3.cardinality = i30\nc8.feature = FastMoving\ni31.lowerBound = 1\ni31.upperBound = KleeneStar\nc8.cardinality = i31\nc4.feature = Platoon\ni32.lowerBound = 1\ni32.upperBound = 1\nc4.cardinality = i32\nc9.feature = Leader\ni33.lowerBound = 1\ni33.upperBound = 1\nc9.cardinality = i33\nFM.require = c2 -> c7 + c4 -> c9 \nFM.exclude = c0 -> c5 + c1 -> c6 + c3 -> c8 \n}\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "perky-chant-wing-comma", "time": "2024-07-25 19:17:15.118469", "cmd": 1} {"id": 14056, "parent": null, "code": "one sig A {}\n\nsig B {\n a : set A -> set B\n\n}", "permalink": "staff-yahoo-scurvy-ivy", "time": "2024-07-25 21:57:04.017832", "cmd": 1} {"id": 14057, "parent": 14056, "code": "sig A {}\n\nsig B {\n a : set A -> set B\n\n}", "permalink": "rename-halved-policy-excuse", "time": "2024-07-25 21:58:38.610765", "cmd": 1} {"id": 14058, "parent": 14057, "code": "sig A {\n a : set A -> set B\n\n}\n\nsig B {\n a : set A -> set B\n\n}", "permalink": "pout-slit-washer-anchor", "time": "2024-07-25 21:59:10.521511", "cmd": 1} {"id": 14059, "parent": null, "code": "module examples/puzzles/handshake\n\n/*\n * Alloy model of the Halmos handshake problem\n *\n * Hilary and Jocelyn are married. They invite four couples who are friends for dinner. When\n * they arrive, they shake hands with each other. Nobody shakes hands with him or herself\n * or with his or her spouse. After there has been some handshaking, Jocelyn jumps up on\n * a chair and says \"Stop shaking hands!\", and then asks how many hands each person has\n * shaken. All the answers are different. How many hands has Hilary shaken?\n *\n * The Alloy model represents the problem as a set of constraints. Properties of the spouse\n * relationship and of handshaking in general are given as facts. The particular situation\n * is cast as a function.\n *\n * There are 9 people answering, and all answers are different. Nobody can shake more than\n * 8 hands. So answers must be 0..8. The one (p8 say) who answered 8 has shaken everybody's\n * hand except for his or her own, and his or her spouse's. Now consider the person who shook\n * 0 hands (p0 say). The persons p0 and p8 are distinct. If they are not married, then p8 cannot\n * have shaken 8 hands, because he or she did not shake the hand of p0 or of his or her spouse.\n * So p8's spouse to p0. Now imagine Jocelyn asking the question again, with p0 and p8 out of\n * the room, and excluding hand shakes with them. Since p8 shook hands with everyone else\n * except p0 and p8, everyone gives an answer one smaller than they did before, giving 0..6.\n * The argument now applies recursively. So Hilary is left alone, having shaken 4 hands.\n *\n * author: Daniel Jackson, 11/15/01\n */\n\nsig Person {spouse: Person, shaken: set Person}\none sig Jocelyn, Hilary extends Person {}\n\nfact ShakingProtocol {\n // nobody shakes own or spouse's hand\n all p: Person | no (p + p.spouse) & p.shaken\n // if p shakes q, q shakes p\n all p, q: Person | p in q.shaken => q in p.shaken\n }\n\nfact Spouses {\n all p, q: Person | p!=q => {\n // if q is p's spouse, p is q's spouse\n p.spouse = q => q.spouse = p\n // no spouse sharing\n p.spouse != q.spouse\n }\n all p: Person {\n // a person is his or her spouse's spouse\n p.spouse.spouse = p\n // nobody is his or her own spouse\n p != p.spouse\n }\n }\n\npred Puzzle {\n // everyone but Jocelyn has shaken a different number of hands\n all p,q: Person - Jocelyn | p!=q => #p.shaken != #q.shaken\n // Hilary's spouse is Jocelyn\n Hilary.spouse = Jocelyn\n }\n\nrun Puzzle for exactly 10 Person, 5 int expect 1\nP12: run Puzzle for exactly 12 Person, 5 int expect 1\nP14: run Puzzle for exactly 14 Person, 5 int expect 1\nP16: run Puzzle for exactly 16 Person, 6 int expect 1", "permalink": "canon-onion-tingly-crafty", "time": "2024-07-26 08:18:51.001967", "cmd": 1} {"id": 14060, "parent": 14059, "code": "module examples/puzzles/handshake\n\n/*\n * Alloy model of the Halmos handshake problem\n *\n * Hilary and Jocelyn are married. They invite four couples who are friends for dinner. When\n * they arrive, they shake hands with each other. Nobody shakes hands with him or herself\n * or with his or her spouse. After there has been some handshaking, Jocelyn jumps up on\n * a chair and says \"Stop shaking hands!\", and then asks how many hands each person has\n * shaken. All the answers are different. How many hands has Hilary shaken?\n *\n * The Alloy model represents the problem as a set of constraints. Properties of the spouse\n * relationship and of handshaking in general are given as facts. The particular situation\n * is cast as a function.\n *\n * There are 9 people answering, and all answers are different. Nobody can shake more than\n * 8 hands. So answers must be 0..8. The one (p8 say) who answered 8 has shaken everybody's\n * hand except for his or her own, and his or her spouse's. Now consider the person who shook\n * 0 hands (p0 say). The persons p0 and p8 are distinct. If they are not married, then p8 cannot\n * have shaken 8 hands, because he or she did not shake the hand of p0 or of his or her spouse.\n * So p8's spouse to p0. Now imagine Jocelyn asking the question again, with p0 and p8 out of\n * the room, and excluding hand shakes with them. Since p8 shook hands with everyone else\n * except p0 and p8, everyone gives an answer one smaller than they did before, giving 0..6.\n * The argument now applies recursively. So Hilary is left alone, having shaken 4 hands.\n *\n * author: Daniel Jackson, 11/15/01\n */\n\nsig Person {spouse: Person, shaken: set Person}\none sig Jocelyn, Hilary extends Person {}\n\nfact ShakingProtocol {\n // nobody shakes own or spouse's hand\n all p: Person | no (p + p.spouse) & p.shaken\n // if p shakes q, q shakes p\n all p, q: Person | p in q.shaken => q in p.shaken\n }\n\nfact Spouses {\n all p, q: Person | p!=q => {\n // if q is p's spouse, p is q's spouse\n p.spouse = q => q.spouse = p\n // no spouse sharing\n p.spouse != q.spouse\n }\n all p: Person {\n // a person is his or her spouse's spouse\n p.spouse.spouse = p\n // nobody is his or her own spouse\n p != p.spouse\n }\n }\n\npred Puzzle {\n // everyone but Jocelyn has shaken a different number of hands\n all p,q: Person - Jocelyn | p!=q => #p.shaken != #q.shaken\n // Hilary's spouse is Jocelyn\n Hilary.spouse = Jocelyn\n }\n\nrun Puzzle for exactly 10 Person, 5 int expect 1\nP12: run Puzzle for exactly 12 Person, 5 int expect 1\nP14: run Puzzle for exactly 14 Person, 5 int expect 1\nP16: run Puzzle for exactly 16 Person, 6 int expect 1", "permalink": "mooned-gauze-value-pupil", "time": "2024-07-26 08:19:06.026403", "cmd": 1} {"id": 14061, "parent": 14060, "code": "module examples/puzzles/handshake\n\n/*\n * Alloy model of the Halmos handshake problem\n *\n * Hilary and Jocelyn are married. They invite four couples who are friends for dinner. When\n * they arrive, they shake hands with each other. Nobody shakes hands with him or herself\n * or with his or her spouse. After there has been some handshaking, Jocelyn jumps up on\n * a chair and says \"Stop shaking hands!\", and then asks how many hands each person has\n * shaken. All the answers are different. How many hands has Hilary shaken?\n *\n * The Alloy model represents the problem as a set of constraints. Properties of the spouse\n * relationship and of handshaking in general are given as facts. The particular situation\n * is cast as a function.\n *\n * There are 9 people answering, and all answers are different. Nobody can shake more than\n * 8 hands. So answers must be 0..8. The one (p8 say) who answered 8 has shaken everybody's\n * hand except for his or her own, and his or her spouse's. Now consider the person who shook\n * 0 hands (p0 say). The persons p0 and p8 are distinct. If they are not married, then p8 cannot\n * have shaken 8 hands, because he or she did not shake the hand of p0 or of his or her spouse.\n * So p8's spouse to p0. Now imagine Jocelyn asking the question again, with p0 and p8 out of\n * the room, and excluding hand shakes with them. Since p8 shook hands with everyone else\n * except p0 and p8, everyone gives an answer one smaller than they did before, giving 0..6.\n * The argument now applies recursively. So Hilary is left alone, having shaken 4 hands.\n *\n * author: Daniel Jackson, 11/15/01\n */\n\nsig Person {spouse: Person, shaken: set Person}\none sig Jocelyn, Hilary extends Person {}\n\nfact ShakingProtocol {\n // nobody shakes own or spouse's hand\n all p: Person | no (p + p.spouse) & p.shaken\n // if p shakes q, q shakes p\n all p, q: Person | p in q.shaken => q in p.shaken\n }\n\nfact Spouses {\n all p, q: Person | p!=q => {\n // if q is p's spouse, p is q's spouse\n p.spouse = q => q.spouse = p\n // no spouse sharing\n p.spouse != q.spouse\n }\n all p: Person {\n // a person is his or her spouse's spouse\n p.spouse.spouse = p\n // nobody is his or her own spouse\n p != p.spouse\n }\n }\n\npred Puzzle {\n // everyone but Jocelyn has shaken a different number of hands\n all p,q: Person - Jocelyn | p!=q => #p.shaken != #q.shaken\n // Hilary's spouse is Jocelyn\n Hilary.spouse = Jocelyn\n }\n\nrun Puzzle for exactly 10 Person, 5 int\nP12: run Puzzle for exactly 12 Person, 5 int expect 1\nP14: run Puzzle for exactly 14 Person, 5 int expect 1\nP16: run Puzzle for exactly 16 Person, 6 int expect 1", "permalink": "radish-banner-barn-marry", "time": "2024-07-26 08:19:58.620705", "cmd": 1} {"id": 14062, "parent": 14061, "code": "module examples/puzzles/handshake\n\n/*\n * Alloy model of the Halmos handshake problem\n *\n * Hilary and Jocelyn are married. They invite four couples who are friends for dinner. When\n * they arrive, they shake hands with each other. Nobody shakes hands with him or herself\n * or with his or her spouse. After there has been some handshaking, Jocelyn jumps up on\n * a chair and says \"Stop shaking hands!\", and then asks how many hands each person has\n * shaken. All the answers are different. How many hands has Hilary shaken?\n *\n * The Alloy model represents the problem as a set of constraints. Properties of the spouse\n * relationship and of handshaking in general are given as facts. The particular situation\n * is cast as a function.\n *\n * There are 9 people answering, and all answers are different. Nobody can shake more than\n * 8 hands. So answers must be 0..8. The one (p8 say) who answered 8 has shaken everybody's\n * hand except for his or her own, and his or her spouse's. Now consider the person who shook\n * 0 hands (p0 say). The persons p0 and p8 are distinct. If they are not married, then p8 cannot\n * have shaken 8 hands, because he or she did not shake the hand of p0 or of his or her spouse.\n * So p8's spouse to p0. Now imagine Jocelyn asking the question again, with p0 and p8 out of\n * the room, and excluding hand shakes with them. Since p8 shook hands with everyone else\n * except p0 and p8, everyone gives an answer one smaller than they did before, giving 0..6.\n * The argument now applies recursively. So Hilary is left alone, having shaken 4 hands.\n *\n * author: Daniel Jackson, 11/15/01\n */\n\nsig Person {spouse: Person, shaken: set Person}\none sig Jocelyn, Hilary extends Person {}\n\nfact ShakingProtocol {\n // nobody shakes own or spouse's hand\n all p: Person | no (p + p.spouse) & p.shaken\n // if p shakes q, q shakes p\n all p, q: Person | p in q.shaken => q in p.shaken\n }\n\nfact Spouses {\n all p, q: Person | p!=q => {\n // if q is p's spouse, p is q's spouse\n p.spouse = q => q.spouse = p\n // no spouse sharing\n p.spouse != q.spouse\n }\n all p: Person {\n // a person is his or her spouse's spouse\n p.spouse.spouse = p\n // nobody is his or her own spouse\n p != p.spouse\n }\n }\n\npred Puzzle {\n // everyone but Jocelyn has shaken a different number of hands\n all p,q: Person - Jocelyn | p!=q => #p.shaken != #q.shaken\n // Hilary's spouse is Jocelyn\n Hilary.spouse = Jocelyn\n }", "permalink": "native-ounce-stung-boned", "time": "2024-07-26 08:21:04.208772", "cmd": 1} {"id": 14063, "parent": 14062, "code": "module examples/puzzles/handshake\n\n/*\n * Alloy model of the Halmos handshake problem\n *\n * Hilary and Jocelyn are married. They invite four couples who are friends for dinner. When\n * they arrive, they shake hands with each other. Nobody shakes hands with him or herself\n * or with his or her spouse. After there has been some handshaking, Jocelyn jumps up on\n * a chair and says \"Stop shaking hands!\", and then asks how many hands each person has\n * shaken. All the answers are different. How many hands has Hilary shaken?\n *\n * The Alloy model represents the problem as a set of constraints. Properties of the spouse\n * relationship and of handshaking in general are given as facts. The particular situation\n * is cast as a function.\n *\n * There are 9 people answering, and all answers are different. Nobody can shake more than\n * 8 hands. So answers must be 0..8. The one (p8 say) who answered 8 has shaken everybody's\n * hand except for his or her own, and his or her spouse's. Now consider the person who shook\n * 0 hands (p0 say). The persons p0 and p8 are distinct. If they are not married, then p8 cannot\n * have shaken 8 hands, because he or she did not shake the hand of p0 or of his or her spouse.\n * So p8's spouse to p0. Now imagine Jocelyn asking the question again, with p0 and p8 out of\n * the room, and excluding hand shakes with them. Since p8 shook hands with everyone else\n * except p0 and p8, everyone gives an answer one smaller than they did before, giving 0..6.\n * The argument now applies recursively. So Hilary is left alone, having shaken 4 hands.\n *\n * author: Daniel Jackson, 11/15/01\n */\n\nsig Person {spouse: Person, shaken: set Person}\none sig Jocelyn, Hilary extends Person {}", "permalink": "raft-shun-panda-spill", "time": "2024-07-26 08:21:54.735361", "cmd": 1} {"id": 14064, "parent": 14063, "code": "module examples/puzzles/handshake\n\n/*\n * Alloy model of the Halmos handshake problem\n *\n * Hilary and Jocelyn are married. They invite four couples who are friends for dinner. When\n * they arrive, they shake hands with each other. Nobody shakes hands with him or herself\n * or with his or her spouse. After there has been some handshaking, Jocelyn jumps up on\n * a chair and says \"Stop shaking hands!\", and then asks how many hands each person has\n * shaken. All the answers are different. How many hands has Hilary shaken?\n *\n * The Alloy model represents the problem as a set of constraints. Properties of the spouse\n * relationship and of handshaking in general are given as facts. The particular situation\n * is cast as a function.\n *\n * There are 9 people answering, and all answers are different. Nobody can shake more than\n * 8 hands. So answers must be 0..8. The one (p8 say) who answered 8 has shaken everybody's\n * hand except for his or her own, and his or her spouse's. Now consider the person who shook\n * 0 hands (p0 say). The persons p0 and p8 are distinct. If they are not married, then p8 cannot\n * have shaken 8 hands, because he or she did not shake the hand of p0 or of his or her spouse.\n * So p8's spouse to p0. Now imagine Jocelyn asking the question again, with p0 and p8 out of\n * the room, and excluding hand shakes with them. Since p8 shook hands with everyone else\n * except p0 and p8, everyone gives an answer one smaller than they did before, giving 0..6.\n * The argument now applies recursively. So Hilary is left alone, having shaken 4 hands.\n *\n * author: Daniel Jackson, 11/15/01\n */\n\nsig Person {spouse: Person, shaken: set Person}", "permalink": "disk-crust-cosmic-filler", "time": "2024-07-26 08:22:11.429095", "cmd": 1} {"id": 14065, "parent": 14064, "code": "module examples/puzzles/handshake\n\n/*\n * Alloy model of the Halmos handshake problem\n *\n * Hilary and Jocelyn are married. They invite four couples who are friends for dinner. When\n * they arrive, they shake hands with each other. Nobody shakes hands with him or herself\n * or with his or her spouse. After there has been some handshaking, Jocelyn jumps up on\n * a chair and says \"Stop shaking hands!\", and then asks how many hands each person has\n * shaken. All the answers are different. How many hands has Hilary shaken?\n *\n * The Alloy model represents the problem as a set of constraints. Properties of the spouse\n * relationship and of handshaking in general are given as facts. The particular situation\n * is cast as a function.\n *\n * There are 9 people answering, and all answers are different. Nobody can shake more than\n * 8 hands. So answers must be 0..8. The one (p8 say) who answered 8 has shaken everybody's\n * hand except for his or her own, and his or her spouse's. Now consider the person who shook\n * 0 hands (p0 say). The persons p0 and p8 are distinct. If they are not married, then p8 cannot\n * have shaken 8 hands, because he or she did not shake the hand of p0 or of his or her spouse.\n * So p8's spouse to p0. Now imagine Jocelyn asking the question again, with p0 and p8 out of\n * the room, and excluding hand shakes with them. Since p8 shook hands with everyone else\n * except p0 and p8, everyone gives an answer one smaller than they did before, giving 0..6.\n * The argument now applies recursively. So Hilary is left alone, having shaken 4 hands.\n *\n * author: Daniel Jackson, 11/15/01\n */\n\nsig Person {spouse: Person, shaken: set Person}\none sig Jocelyn, Hilary extends Person {}", "permalink": "gaffe-wagon-grower-dart", "time": "2024-07-26 08:22:22.929988", "cmd": 1} {"id": 14066, "parent": 14065, "code": "module examples/puzzles/handshake\n\n/*\n * Alloy model of the Halmos handshake problem\n *\n * Hilary and Jocelyn are married. They invite four couples who are friends for dinner. When\n * they arrive, they shake hands with each other. Nobody shakes hands with him or herself\n * or with his or her spouse. After there has been some handshaking, Jocelyn jumps up on\n * a chair and says \"Stop shaking hands!\", and then asks how many hands each person has\n * shaken. All the answers are different. How many hands has Hilary shaken?\n *\n * The Alloy model represents the problem as a set of constraints. Properties of the spouse\n * relationship and of handshaking in general are given as facts. The particular situation\n * is cast as a function.\n *\n * There are 9 people answering, and all answers are different. Nobody can shake more than\n * 8 hands. So answers must be 0..8. The one (p8 say) who answered 8 has shaken everybody's\n * hand except for his or her own, and his or her spouse's. Now consider the person who shook\n * 0 hands (p0 say). The persons p0 and p8 are distinct. If they are not married, then p8 cannot\n * have shaken 8 hands, because he or she did not shake the hand of p0 or of his or her spouse.\n * So p8's spouse to p0. Now imagine Jocelyn asking the question again, with p0 and p8 out of\n * the room, and excluding hand shakes with them. Since p8 shook hands with everyone else\n * except p0 and p8, everyone gives an answer one smaller than they did before, giving 0..6.\n * The argument now applies recursively. So Hilary is left alone, having shaken 4 hands.\n *\n * author: Daniel Jackson, 11/15/01\n */\n\nsig Person {spouse: Person, shaken: set Person}\nsig Jocelyn, Hilary extends Person {}", "permalink": "attic-dreary-cache-await", "time": "2024-07-26 08:22:32.723283", "cmd": 1} {"id": 14067, "parent": 14066, "code": "module examples/puzzles/handshake\n\n/*\n * Alloy model of the Halmos handshake problem\n *\n * Hilary and Jocelyn are married. They invite four couples who are friends for dinner. When\n * they arrive, they shake hands with each other. Nobody shakes hands with him or herself\n * or with his or her spouse. After there has been some handshaking, Jocelyn jumps up on\n * a chair and says \"Stop shaking hands!\", and then asks how many hands each person has\n * shaken. All the answers are different. How many hands has Hilary shaken?\n *\n * The Alloy model represents the problem as a set of constraints. Properties of the spouse\n * relationship and of handshaking in general are given as facts. The particular situation\n * is cast as a function.\n *\n * There are 9 people answering, and all answers are different. Nobody can shake more than\n * 8 hands. So answers must be 0..8. The one (p8 say) who answered 8 has shaken everybody's\n * hand except for his or her own, and his or her spouse's. Now consider the person who shook\n * 0 hands (p0 say). The persons p0 and p8 are distinct. If they are not married, then p8 cannot\n * have shaken 8 hands, because he or she did not shake the hand of p0 or of his or her spouse.\n * So p8's spouse to p0. Now imagine Jocelyn asking the question again, with p0 and p8 out of\n * the room, and excluding hand shakes with them. Since p8 shook hands with everyone else\n * except p0 and p8, everyone gives an answer one smaller than they did before, giving 0..6.\n * The argument now applies recursively. So Hilary is left alone, having shaken 4 hands.\n *\n * author: Daniel Jackson, 11/15/01\n */\n\nsig Person {spouse: Person, shaken: set Person}\nsig Jocelyn extends Person {}", "permalink": "syrup-owl-usual-giddy", "time": "2024-07-26 08:22:43.348480", "cmd": 1} {"id": 14068, "parent": 14067, "code": "module examples/puzzles/handshake\n\n/*\n * Alloy model of the Halmos handshake problem\n *\n * Hilary and Jocelyn are married. They invite four couples who are friends for dinner. When\n * they arrive, they shake hands with each other. Nobody shakes hands with him or herself\n * or with his or her spouse. After there has been some handshaking, Jocelyn jumps up on\n * a chair and says \"Stop shaking hands!\", and then asks how many hands each person has\n * shaken. All the answers are different. How many hands has Hilary shaken?\n *\n * The Alloy model represents the problem as a set of constraints. Properties of the spouse\n * relationship and of handshaking in general are given as facts. The particular situation\n * is cast as a function.\n *\n * There are 9 people answering, and all answers are different. Nobody can shake more than\n * 8 hands. So answers must be 0..8. The one (p8 say) who answered 8 has shaken everybody's\n * hand except for his or her own, and his or her spouse's. Now consider the person who shook\n * 0 hands (p0 say). The persons p0 and p8 are distinct. If they are not married, then p8 cannot\n * have shaken 8 hands, because he or she did not shake the hand of p0 or of his or her spouse.\n * So p8's spouse to p0. Now imagine Jocelyn asking the question again, with p0 and p8 out of\n * the room, and excluding hand shakes with them. Since p8 shook hands with everyone else\n * except p0 and p8, everyone gives an answer one smaller than they did before, giving 0..6.\n * The argument now applies recursively. So Hilary is left alone, having shaken 4 hands.\n *\n * author: Daniel Jackson, 11/15/01\n */\n\nsig Person {spouse: Person, shaken: set Person}\nsig jghfcv extends Person {}", "permalink": "bunch-jigsaw-creole-move", "time": "2024-07-26 08:22:53.427649", "cmd": 1} {"id": 14069, "parent": 14068, "code": "module examples/puzzles/handshake\n\n/*\n * Alloy model of the Halmos handshake problem\n *\n * Hilary and Jocelyn are married. They invite four couples who are friends for dinner. When\n * they arrive, they shake hands with each other. Nobody shakes hands with him or herself\n * or with his or her spouse. After there has been some handshaking, Jocelyn jumps up on\n * a chair and says \"Stop shaking hands!\", and then asks how many hands each person has\n * shaken. All the answers are different. How many hands has Hilary shaken?\n *\n * The Alloy model represents the problem as a set of constraints. Properties of the spouse\n * relationship and of handshaking in general are given as facts. The particular situation\n * is cast as a function.\n *\n * There are 9 people answering, and all answers are different. Nobody can shake more than\n * 8 hands. So answers must be 0..8. The one (p8 say) who answered 8 has shaken everybody's\n * hand except for his or her own, and his or her spouse's. Now consider the person who shook\n * 0 hands (p0 say). The persons p0 and p8 are distinct. If they are not married, then p8 cannot\n * have shaken 8 hands, because he or she did not shake the hand of p0 or of his or her spouse.\n * So p8's spouse to p0. Now imagine Jocelyn asking the question again, with p0 and p8 out of\n * the room, and excluding hand shakes with them. Since p8 shook hands with everyone else\n * except p0 and p8, everyone gives an answer one smaller than they did before, giving 0..6.\n * The argument now applies recursively. So Hilary is left alone, having shaken 4 hands.\n *\n * author: Daniel Jackson, 11/15/01\n */\n\nsig Person {spouse: Person, shaken: set Person}\nsig fcxgt, Hilary extends Person {}", "permalink": "camera-zen-gazing-anyway", "time": "2024-07-26 08:23:02.530281", "cmd": 1} {"id": 14070, "parent": 14069, "code": "module examples/puzzles/handshake\n\n/*\n * Alloy model of the Halmos handshake problem\n *\n * Hilary and Jocelyn are married. They invite four couples who are friends for dinner. When\n * they arrive, they shake hands with each other. Nobody shakes hands with him or herself\n * or with his or her spouse. After there has been some handshaking, Jocelyn jumps up on\n * a chair and says \"Stop shaking hands!\", and then asks how many hands each person has\n * shaken. All the answers are different. How many hands has Hilary shaken?\n *\n * The Alloy model represents the problem as a set of constraints. Properties of the spouse\n * relationship and of handshaking in general are given as facts. The particular situation\n * is cast as a function.\n *\n * There are 9 people answering, and all answers are different. Nobody can shake more than\n * 8 hands. So answers must be 0..8. The one (p8 say) who answered 8 has shaken everybody's\n * hand except for his or her own, and his or her spouse's. Now consider the person who shook\n * 0 hands (p0 say). The persons p0 and p8 are distinct. If they are not married, then p8 cannot\n * have shaken 8 hands, because he or she did not shake the hand of p0 or of his or her spouse.\n * So p8's spouse to p0. Now imagine Jocelyn asking the question again, with p0 and p8 out of\n * the room, and excluding hand shakes with them. Since p8 shook hands with everyone else\n * except p0 and p8, everyone gives an answer one smaller than they did before, giving 0..6.\n * The argument now applies recursively. So Hilary is left alone, having shaken 4 hands.\n *\n * author: Daniel Jackson, 11/15/01\n */\n\nsig Person {spouse: Person, shaken: set Person}\nsig fcxgt, bv extends Person {}", "permalink": "pupil-refute-winter-upside", "time": "2024-07-26 08:23:05.107416", "cmd": 1} {"id": 14071, "parent": 14070, "code": "module examples/puzzles/handshake\n\n/*\n * Alloy model of the Halmos handshake problem\n *\n * Hilary and Jocelyn are married. They invite four couples who are friends for dinner. When\n * they arrive, they shake hands with each other. Nobody shakes hands with him or herself\n * or with his or her spouse. After there has been some handshaking, Jocelyn jumps up on\n * a chair and says \"Stop shaking hands!\", and then asks how many hands each person has\n * shaken. All the answers are different. How many hands has Hilary shaken?\n *\n * The Alloy model represents the problem as a set of constraints. Properties of the spouse\n * relationship and of handshaking in general are given as facts. The particular situation\n * is cast as a function.\n *\n * There are 9 people answering, and all answers are different. Nobody can shake more than\n * 8 hands. So answers must be 0..8. The one (p8 say) who answered 8 has shaken everybody's\n * hand except for his or her own, and his or her spouse's. Now consider the person who shook\n * 0 hands (p0 say). The persons p0 and p8 are distinct. If they are not married, then p8 cannot\n * have shaken 8 hands, because he or she did not shake the hand of p0 or of his or her spouse.\n * So p8's spouse to p0. Now imagine Jocelyn asking the question again, with p0 and p8 out of\n * the room, and excluding hand shakes with them. Since p8 shook hands with everyone else\n * except p0 and p8, everyone gives an answer one smaller than they did before, giving 0..6.\n * The argument now applies recursively. So Hilary is left alone, having shaken 4 hands.\n *\n * author: Daniel Jackson, 11/15/01\n */\n\nsig Person {spouse: Person, shaken: set Person}\none sig fcxgt, bv extends Person {}", "permalink": "stir-dawn-sadly-race", "time": "2024-07-26 08:23:18.074225", "cmd": 1} {"id": 14072, "parent": 14071, "code": "module examples/puzzles/handshake\n\n/*\n * Alloy model of the Halmos handshake problem\n *\n * Hilary and Jocelyn are married. They invite four couples who are friends for dinner. When\n * they arrive, they shake hands with each other. Nobody shakes hands with him or herself\n * or with his or her spouse. After there has been some handshaking, Jocelyn jumps up on\n * a chair and says \"Stop shaking hands!\", and then asks how many hands each person has\n * shaken. All the answers are different. How many hands has Hilary shaken?\n *\n * The Alloy model represents the problem as a set of constraints. Properties of the spouse\n * relationship and of handshaking in general are given as facts. The particular situation\n * is cast as a function.\n *\n * There are 9 people answering, and all answers are different. Nobody can shake more than\n * 8 hands. So answers must be 0..8. The one (p8 say) who answered 8 has shaken everybody's\n * hand except for his or her own, and his or her spouse's. Now consider the person who shook\n * 0 hands (p0 say). The persons p0 and p8 are distinct. If they are not married, then p8 cannot\n * have shaken 8 hands, because he or she did not shake the hand of p0 or of his or her spouse.\n * So p8's spouse to p0. Now imagine Jocelyn asking the question again, with p0 and p8 out of\n * the room, and excluding hand shakes with them. Since p8 shook hands with everyone else\n * except p0 and p8, everyone gives an answer one smaller than they did before, giving 0..6.\n * The argument now applies recursively. So Hilary is left alone, having shaken 4 hands.\n *\n * author: Daniel Jackson, 11/15/01\n */\n\nsig Person {spouse: Person, shaken: set Person}\none sig fcxgt, bv extends Person {}", "permalink": "ferry-uproar-blank-say", "time": "2024-07-26 08:23:26.488552", "cmd": 1} {"id": 14073, "parent": 14072, "code": "module examples/puzzles/handshake\n\n/*\n * Alloy model of the Halmos handshake problem\n *\n * Hilary and Jocelyn are married. They invite four couples who are friends for dinner. When\n * they arrive, they shake hands with each other. Nobody shakes hands with him or herself\n * or with his or her spouse. After there has been some handshaking, Jocelyn jumps up on\n * a chair and says \"Stop shaking hands!\", and then asks how many hands each person has\n * shaken. All the answers are different. How many hands has Hilary shaken?\n *\n * The Alloy model represents the problem as a set of constraints. Properties of the spouse\n * relationship and of handshaking in general are given as facts. The particular situation\n * is cast as a function.\n *\n * There are 9 people answering, and all answers are different. Nobody can shake more than\n * 8 hands. So answers must be 0..8. The one (p8 say) who answered 8 has shaken everybody's\n * hand except for his or her own, and his or her spouse's. Now consider the person who shook\n * 0 hands (p0 say). The persons p0 and p8 are distinct. If they are not married, then p8 cannot\n * have shaken 8 hands, because he or she did not shake the hand of p0 or of his or her spouse.\n * So p8's spouse to p0. Now imagine Jocelyn asking the question again, with p0 and p8 out of\n * the room, and excluding hand shakes with them. Since p8 shook hands with everyone else\n * except p0 and p8, everyone gives an answer one smaller than they did before, giving 0..6.\n * The argument now applies recursively. So Hilary is left alone, having shaken 4 hands.\n *\n * author: Daniel Jackson, 11/15/01\n */\n\nsig Person {spouse: Person, shaken: set Person}\none sig fcxgtbv extends Person {}", "permalink": "anemia-gummy-nappy-system", "time": "2024-07-26 08:23:32.476660", "cmd": 1} {"id": 14074, "parent": null, "code": "open util/integer\n\n// Alloy model generated for deep embedding\n\none sig FM {\n root: one Feature,\n group: set Feature,\n require: ConstraintNode -> ConstraintNode,\n exclude: ConstraintNode -> ConstraintNode,\n config: set Instance\n}\n\nabstract sig Feature {\n groupCardinality: set Intervall,\n groupInstanceCardinality: set Intervall,\n cardinality: some Intervall,\n parent: lone Feature,\n instances: set Instance\n}\n\nsig Instance {\n feature: one Feature,\n instanceParent: lone Instance\n}\n\nsig Intervall {\n lowerBound: Int,\n upperBound: Int + KleeneStar\n}\n\nabstract sig ConstraintNode {\n feature: one Feature,\n cardinality: some Intervall\n}\n\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n f = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n one i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n one i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n one i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n one i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\nfact intervallPositive {\n all i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\nfact intervallIsAttribute {\n all i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\nfact noClustering {\n all i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n all i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n all i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n all i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n (i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\nfact rootTree {\n all f: Feature | FM.root in f.*parent\n all f: FM.root | no f.parent\n all f: Feature - FM.root | one f.parent\n no f: Feature | f in f.^parent\n}\n\nfact configuration {\n all i: Instance | i in FM.config\n}\n\nfact root{\n all f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n all f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n all f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n all f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint {\n all i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n all c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n\nfact groupCardinalityConstraint {\n all i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\nfact groupInstanceCardinalityConstraint {\n all i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent {\n all i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n all i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n all i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n\nfact requireConstraint {\n all f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n all c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)]\n}\n\nfact excludeConstraint {\n all f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n all c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)])\n}\n\none sig Platoon, AddressingScheme, Regular, Compact extends Feature {}\n\none sig i1, i2, i3, i4, i5, i6, i7, i8 extends Intervall {}\n\nfact {\n i1.lowerBound = 1\n i1.upperBound = 1\n Platoon.cardinality = i1\n i2.lowerBound = 0\n i2.upperBound = KleeneStar\n Platoon.groupInstanceCardinality = i2\n i3.lowerBound = 1\n i3.upperBound = 1\n AddressingScheme.cardinality = i3\n i4.lowerBound = 0\n i4.upperBound = KleeneStar\n AddressingScheme.groupInstanceCardinality = i4\n AddressingScheme.parent = Platoon\n i5.lowerBound = 0\n i5.upperBound = 1\n Regular.cardinality = i5\n i6.lowerBound = 0\n i6.upperBound = KleeneStar\n Regular.groupInstanceCardinality = i6\n Regular.parent = AddressingScheme\n i7.lowerBound = 1\n i7.upperBound = KleeneStar\n Compact.cardinality = i7\n i8.lowerBound = 0\n i8.upperBound = KleeneStar\n Compact.groupInstanceCardinality = i8\n Compact.parent = AddressingScheme\n}\n\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "lake-huddle-delay-pointy", "time": "2024-07-26 08:24:15.235190", "cmd": 1} {"id": 14075, "parent": 14074, "code": "open util/integer\n\n// Alloy model generated for deep embedding\n\none sig FM {\n root: one Feature,\n group: set Feature,\n require: ConstraintNode -> ConstraintNode,\n exclude: ConstraintNode -> ConstraintNode,\n config: set Instance\n}\n\nabstract sig Feature {\n groupCardinality: set Intervall,\n groupInstanceCardinality: set Intervall,\n cardinality: some Intervall,\n parent: lone Feature,\n instances: set Instance\n}\n\nsig Instance {\n feature: one Feature,\n instanceParent: lone Instance\n}\n\nsig Intervall {\n lowerBound: Int,\n upperBound: Int + KleeneStar\n}\n\nabstract sig ConstraintNode {\n feature: one Feature,\n cardinality: some Intervall\n}\n\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n f = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n one i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n one i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n one i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n one i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\nfact intervallPositive {\n all i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\nfact intervallIsAttribute {\n all i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\nfact noClustering {\n all i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n all i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n all i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n all i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n (i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\nfact rootTree {\n all f: Feature | FM.root in f.*parent\n all f: FM.root | no f.parent\n all f: Feature - FM.root | one f.parent\n no f: Feature | f in f.^parent\n}\n\nfact configuration {\n all i: Instance | i in FM.config\n}\n\nfact root{\n all f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n all f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n all f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n all f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint {\n all i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n all c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n\nfact groupCardinalityConstraint {\n all i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\nfact groupInstanceCardinalityConstraint {\n all i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent {\n all i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n all i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n all i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n\nfact requireConstraint {\n all f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n all c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)]\n}\n\nfact excludeConstraint {\n all f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n all c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)])\n}\n\none sig Platoon, AddressingScheme, Regular, Compact extends Feature {}\n\none sig i1, i2, i3, i4, i5, i6, i7, i8 extends Intervall {}\nfact {\n // Platoon\n i1.lowerBound = 1\n i1.upperBound = 1\n Platoon.cardinality = i1\n i2.lowerBound = 4\n i2.upperBound = KleeneStar\n Platoon.groupInstanceCardinality = i2\n i3.lowerBound = 4\n i3.upperBound = 4\n Platoon.groupCardinality = i3\n\n //Adressing Scheme\n AddressingScheme.parent = Platoon\n i4.lowerBound = 1\n i4.upperBound = 1\n AddressingScheme.cardinality = i4\n i5.lowerBound = 1\n i5.upperBound = 1\n AddressingScheme.groupInstanceCardinality = i5\n i6.lowerBound = 1\n i6.upperBound = 1\n AddressingScheme.groupCardinality = i6\n\n //Compact\n Compact.parent = AddressingScheme\n i7.lowerBound = 1\n i7.upperBound = KleeneStar\n Compact.cardinality = i7\n \n\n //Regular\n Regular.parent = AddressingScheme\n i8.lowerBound = 0\n i8.upperBound = 1\n Regular.cardinality = i8\n \n\n \n}\n\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "twelve-spud-mom-empty", "time": "2024-07-26 08:24:57.275317", "cmd": 1} {"id": 14076, "parent": 14075, "code": "open util/integer\n\n// Alloy model generated for deep embedding\n\none sig FM {\n root: one Feature,\n group: set Feature,\n require: ConstraintNode -> ConstraintNode,\n exclude: ConstraintNode -> ConstraintNode,\n config: set Instance\n}\n\nabstract sig Feature {\n groupCardinality: set Intervall,\n groupInstanceCardinality: set Intervall,\n cardinality: some Intervall,\n parent: lone Feature,\n instances: set Instance\n}\n\nsig Instance {\n feature: one Feature,\n instanceParent: lone Instance\n}\n\nsig Intervall {\n lowerBound: Int,\n upperBound: Int + KleeneStar\n}\n\nabstract sig ConstraintNode {\n feature: one Feature,\n cardinality: some Intervall\n}\n\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n f = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n one i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n one i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n one i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n one i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\nfact intervallPositive {\n all i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\nfact intervallIsAttribute {\n all i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\nfact noClustering {\n all i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n all i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n all i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n all i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n (i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\nfact rootTree {\n all f: Feature | FM.root in f.*parent\n all f: FM.root | no f.parent\n all f: Feature - FM.root | one f.parent\n no f: Feature | f in f.^parent\n}\n\nfact configuration {\n all i: Instance | i in FM.config\n}\n\nfact root{\n all f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n all f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n all f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n all f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint {\n all i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n all c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n\nfact groupCardinalityConstraint {\n all i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\nfact groupInstanceCardinalityConstraint {\n all i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent {\n all i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n all i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n all i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n\nfact requireConstraint {\n all f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n all c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)]\n}\n\nfact excludeConstraint {\n all f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n all c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)])\n}\n\none sig Platoon, AddressingScheme, Regular, Compact extends Feature {}\n\none sig i1, i2, i3, i4, i5, i6, i7, i8 extends Intervall {}\nfact {\n // Platoon\n i1.lowerBound = 1\n i1.upperBound = 1\n Platoon.cardinality = i1\n i2.lowerBound = 4\n i2.upperBound = KleeneStar\n Platoon.groupInstanceCardinality = i2\n i3.lowerBound = 4\n i3.upperBound = 4\n Platoon.groupCardinality = i3\n\n //Adressing Scheme\n AddressingScheme.parent = Platoon\n i4.lowerBound = 1\n i4.upperBound = 1\n AddressingScheme.cardinality = i4\n i5.lowerBound = 1\n i5.upperBound = 1\n AddressingScheme.groupInstanceCardinality = i5\n i6.lowerBound = 1\n i6.upperBound = 1\n AddressingScheme.groupCardinality = i6\n\n //Compact\n Compact.parent = AddressingScheme\n i7.lowerBound = 1\n i7.upperBound = KleeneStar\n Compact.cardinality = i7\n \n\n //Regular\n Regular.parent = AddressingScheme\n i8.lowerBound = 0\n i8.upperBound = 1\n Regular.cardinality = i8\n \n\n \n}\n\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "steep-ogle-dean-revoke", "time": "2024-07-26 08:25:03.110618", "cmd": 1} {"id": 14077, "parent": 14076, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich ueberschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Regular, Compact extends Feature{}\n\none sig i1, i2, i3, i4, i5, i6, i7, i8 extends Intervall{}\n// one sig c0, c5 extends ConstraintNode{}\n\n/**\n Setting variables\n*/\n\nfact {\n // Platoon\n i1.lowerBound = 1\n i1.upperBound = 1\n Platoon.cardinality = i1\n i2.lowerBound = 4\n i2.upperBound = KleeneStar\n Platoon.groupInstanceCardinality = i2\n i3.lowerBound = 4\n i3.upperBound = 4\n Platoon.groupCardinality = i3\n\n //Adressing Scheme\n AddressingScheme.parent = Platoon\n i4.lowerBound = 1\n i4.upperBound = 1\n AddressingScheme.cardinality = i4\n i5.lowerBound = 1\n i5.upperBound = 1\n AddressingScheme.groupInstanceCardinality = i5\n i6.lowerBound = 1\n i6.upperBound = 1\n AddressingScheme.groupCardinality = i6\n\n //Compact\n Compact.parent = AddressingScheme\n i7.lowerBound = 1\n i7.upperBound = KleeneStar\n Compact.cardinality = i7\n \n\n //Regular\n Regular.parent = AddressingScheme\n i8.lowerBound = 0\n i8.upperBound = 1\n Regular.cardinality = i8\n \n\n \n}\n\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode\n// error with this? have to specify predicate to be true?\n// what is but? further specification, max amount of ints? what is show?\n ", "permalink": "dangle-reheat-muck-petite", "time": "2024-07-26 08:25:16.868851", "cmd": 1} {"id": 14078, "parent": 14077, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich ueberschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\n\n//Setting variables\none sig Platoon, AddressingScheme, Regular, Compact extends Feature{}\n\none sig i1, i2, i3, i4, i5, i6, i7, i8 extends Intervall{}\n// one sig c0, c5 extends ConstraintNode{}\n\n/**\n Setting variables\n*/\n\nfact {\n // Platoon\n i1.lowerBound = 1\n i1.upperBound = 1\n Platoon.cardinality = i1\n i2.lowerBound = 4\n i2.upperBound = KleeneStar\n Platoon.groupInstanceCardinality = i2\n i3.lowerBound = 4\n i3.upperBound = 4\n Platoon.groupCardinality = i3\n\n //Adressing Scheme\n AddressingScheme.parent = Platoon\n i4.lowerBound = 1\n i4.upperBound = 1\n AddressingScheme.cardinality = i4\n i5.lowerBound = 1\n i5.upperBound = 1\n AddressingScheme.groupInstanceCardinality = i5\n i6.lowerBound = 1\n i6.upperBound = 1\n AddressingScheme.groupCardinality = i6\n\n //Compact\n Compact.parent = AddressingScheme\n i7.lowerBound = 1\n i7.upperBound = KleeneStar\n Compact.cardinality = i7\n \n\n //Regular\n Regular.parent = AddressingScheme\n i8.lowerBound = 0\n i8.upperBound = 1\n Regular.cardinality = i8\n \n\n \n}\n\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode\n// error with this? have to specify predicate to be true?\n// what is but? further specification, max amount of ints? what is show?\n ", "permalink": "halved-deploy-hybrid-pledge", "time": "2024-07-26 08:25:21.210535", "cmd": 1} {"id": 14079, "parent": 14073, "code": "module examples/puzzles/handshake\n\n/*\n * Alloy model of the Halmos handshake problem\n *\n * Hilary and Jocelyn are married. They invite four couples who are friends for dinner. When\n * they arrive, they shake hands with each other. Nobody shakes hands with him or herself\n * or with his or her spouse. After there has been some handshaking, Jocelyn jumps up on\n * a chair and says \"Stop shaking hands!\", and then asks how many hands each person has\n * shaken. All the answers are different. How many hands has Hilary shaken?\n *\n * The Alloy model represents the problem as a set of constraints. Properties of the spouse\n * relationship and of handshaking in general are given as facts. The particular situation\n * is cast as a function.\n *\n * There are 9 people answering, and all answers are different. Nobody can shake more than\n * 8 hands. So answers must be 0..8. The one (p8 say) who answered 8 has shaken everybody's\n * hand except for his or her own, and his or her spouse's. Now consider the person who shook\n * 0 hands (p0 say). The persons p0 and p8 are distinct. If they are not married, then p8 cannot\n * have shaken 8 hands, because he or she did not shake the hand of p0 or of his or her spouse.\n * So p8's spouse to p0. Now imagine Jocelyn asking the question again, with p0 and p8 out of\n * the room, and excluding hand shakes with them. Since p8 shook hands with everyone else\n * except p0 and p8, everyone gives an answer one smaller than they did before, giving 0..6.\n * The argument now applies recursively. So Hilary is left alone, having shaken 4 hands.\n *\n * author: Daniel Jackson, 11/15/01\n */\n\nsig Person {spouse: Person, shaken: set Person}\nsig fcxgtbv extends Person {}", "permalink": "blurt-posh-april-tumble", "time": "2024-07-26 08:25:51.620487", "cmd": 1} {"id": 14080, "parent": 14079, "code": "module examples/puzzles/handshake\n\n/*\n * Alloy model of the Halmos handshake problem\n *\n * Hilary and Jocelyn are married. They invite four couples who are friends for dinner. When\n * they arrive, they shake hands with each other. Nobody shakes hands with him or herself\n * or with his or her spouse. After there has been some handshaking, Jocelyn jumps up on\n * a chair and says \"Stop shaking hands!\", and then asks how many hands each person has\n * shaken. All the answers are different. How many hands has Hilary shaken?\n *\n * The Alloy model represents the problem as a set of constraints. Properties of the spouse\n * relationship and of handshaking in general are given as facts. The particular situation\n * is cast as a function.\n *\n * There are 9 people answering, and all answers are different. Nobody can shake more than\n * 8 hands. So answers must be 0..8. The one (p8 say) who answered 8 has shaken everybody's\n * hand except for his or her own, and his or her spouse's. Now consider the person who shook\n * 0 hands (p0 say). The persons p0 and p8 are distinct. If they are not married, then p8 cannot\n * have shaken 8 hands, because he or she did not shake the hand of p0 or of his or her spouse.\n * So p8's spouse to p0. Now imagine Jocelyn asking the question again, with p0 and p8 out of\n * the room, and excluding hand shakes with them. Since p8 shook hands with everyone else\n * except p0 and p8, everyone gives an answer one smaller than they did before, giving 0..6.\n * The argument now applies recursively. So Hilary is left alone, having shaken 4 hands.\n *\n * author: Daniel Jackson, 11/15/01\n */\n\nsig Person {spouse: Person, shaken: set Person}\nsig fcxgtbv extends Person {}", "permalink": "bauble-equate-parka-gecko", "time": "2024-07-26 08:26:58.330599", "cmd": 1} {"id": 14081, "parent": 14078, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\none sig Platoon, AddressingScheme, Channels, Movement, Node, Regular, Compact, HighThroughput, Reliable, SlowMoving, FastMoving, Follower, Leader extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25, i26, i27, i28, i29, i30, i31, i32, i33 extends Intervall{}\none sig c0, c1, c2, c3, c4, c5, c6, c7, c8, c9 extends ConstraintNode{}\nfact {\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 4\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 4\ni3.upperBound = KleeneStar\nPlatoon.groupCardinality = i3\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\nMovement.parent = Platoon\ni10.lowerBound = 1\ni10.upperBound = 1\nMovement.cardinality = i10\ni11.lowerBound = 1\ni11.upperBound = 1\nMovement.groupInstanceCardinality = i11\ni12.lowerBound = 1\ni12.upperBound = 1\nMovement.groupCardinality = i12\nNode.parent = Platoon\ni13.lowerBound = 1\ni13.upperBound = KleeneStar\nNode.cardinality = i13\ni14.lowerBound = 1\ni14.upperBound = 1\nNode.groupInstanceCardinality = i14\ni15.lowerBound = 1\ni15.upperBound = 2\nNode.groupCardinality = i15\nRegular.parent = AddressingScheme\ni16.lowerBound = 0\ni16.upperBound = 1\nRegular.cardinality = i16\nCompact.parent = AddressingScheme\ni17.lowerBound = 0\ni17.upperBound = 1\nCompact.cardinality = i17\nHighThroughput.parent = Channels\ni18.lowerBound = 1\ni18.upperBound = 8\nHighThroughput.cardinality = i18\nReliable.parent = Channels\ni19.lowerBound = 1\ni19.upperBound = 32\nReliable.cardinality = i19\nSlowMoving.parent = Movement\ni20.lowerBound = 0\ni20.upperBound = 1\nSlowMoving.cardinality = i20\nFastMoving.parent = Movement\ni21.lowerBound = 0\ni21.upperBound = 1\nFastMoving.cardinality = i21\nFollower.parent = Node\ni22.lowerBound = 0\ni22.upperBound = 1\nFollower.cardinality = i22\nLeader.parent = Node\ni23.lowerBound = 0\ni23.upperBound = 1\nLeader.cardinality = i23\nc0.feature = Compact\ni24.lowerBound = 1\ni24.upperBound = KleeneStar\nc0.cardinality = i24\nc5.feature = HighThroughput\ni25.lowerBound = 10\ni25.upperBound = 20\nc5.cardinality = i25\nc1.feature = HighThroughput\ni26.lowerBound = 1\ni26.upperBound = KleeneStar\nc1.cardinality = i26\nc6.feature = Reliable\ni27.lowerBound = 3\ni27.upperBound = KleeneStar\nc6.cardinality = i27\nc2.feature = FastMoving\ni28.lowerBound = 1\ni28.upperBound = 1\nc2.cardinality = i28\nc7.feature = Reliable\ni29.lowerBound = 2\ni29.upperBound = KleeneStar\nc7.cardinality = i29\nc3.feature = Follower\ni30.lowerBound = 3\ni30.upperBound = KleeneStar\nc3.cardinality = i30\nc8.feature = FastMoving\ni31.lowerBound = 1\ni31.upperBound = KleeneStar\nc8.cardinality = i31\nc4.feature = Platoon\ni32.lowerBound = 1\ni32.upperBound = 1\nc4.cardinality = i32\nc9.feature = Leader\ni33.lowerBound = 1\ni33.upperBound = 1\nc9.cardinality = i33\nFM.require = c2 -> c7 + c4 -> c9 \nFM.exclude = c0 -> c5 + c1 -> c6 + c3 -> c8 \n}\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "shone-sphinx-proven-cure", "time": "2024-07-26 08:35:11.025070", "cmd": 1} {"id": 14083, "parent": 14082, "code": "module examples/puzzles/handshake\n\n/*\n * Alloy model of the Halmos handshake problem\n *\n * Hilary and Jocelyn are married. They invite four couples who are friends for dinner. When\n * they arrive, they shake hands with each other. Nobody shakes hands with him or herself\n * or with his or her spouse. After there has been some handshaking, Jocelyn jumps up on\n * a chair and says \"Stop shaking hands!\", and then asks how many hands each person has\n * shaken. All the answers are different. How many hands has Hilary shaken?\n *\n * The Alloy model represents the problem as a set of constraints. Properties of the spouse\n * relationship and of handshaking in general are given as facts. The particular situation\n * is cast as a function.\n *\n * There are 9 people answering, and all answers are different. Nobody can shake more than\n * 8 hands. So answers must be 0..8. The one (p8 say) who answered 8 has shaken everybody's\n * hand except for his or her own, and his or her spouse's. Now consider the person who shook\n * 0 hands (p0 say). The persons p0 and p8 are distinct. If they are not married, then p8 cannot\n * have shaken 8 hands, because he or she did not shake the hand of p0 or of his or her spouse.\n * So p8's spouse to p0. Now imagine Jocelyn asking the question again, with p0 and p8 out of\n * the room, and excluding hand shakes with them. Since p8 shook hands with everyone else\n * except p0 and p8, everyone gives an answer one smaller than they did before, giving 0..6.\n * The argument now applies recursively. So Hilary is left alone, having shaken 4 hands.\n *\n * author: Daniel Jackson, 11/15/01\n */\n\nsig Person {spouse: Person, shaken: set Person}\none sig Jocelyn, Hilary extends Person {}\n\nfact ShakingProtocol {\n // nobody shakes own or spouse's hand\n all p: Person | no (p + p.spouse) & p.shaken\n // if p shakes q, q shakes p\n all p, q: Person | p in q.shaken => q in p.shaken\n }\n\nfact Spouses {\n all p, q: Person | p!=q => {\n // if q is p's spouse, p is q's spouse\n p.spouse = q => q.spouse = p\n // no spouse sharing\n p.spouse != q.spouse\n }\n all p: Person {\n // a person is his or her spouse's spouse\n p.spouse.spouse = p\n // nobody is his or her own spouse\n p != p.spouse\n }\n }\n\npred Puzzle {\n // everyone but Jocelyn has shaken a different number of hands\n all p,q: Person - Jocelyn | p!=q => #p.shaken != #q.shaken\n // Hilary's spouse is Jocelyn\n Hilary.spouse = Jocelyn\n }\n\nrun Puzzle for exactly 1000 Person, 15 int", "permalink": "tremor-drench-lego-attach", "time": "2024-07-26 08:36:50.982350", "cmd": 1} {"id": 14087, "parent": 14081, "code": "open util/integer\n\n// Alloy model generated for deep embedding\n\none sig FM {\n root: one Feature,\n group: set Feature,\n require: ConstraintNode -> ConstraintNode,\n exclude: ConstraintNode -> ConstraintNode,\n config: set Instance\n}\n\nabstract sig Feature {\n groupCardinality: set Intervall,\n groupInstanceCardinality: set Intervall,\n cardinality: some Intervall,\n parent: lone Feature,\n instances: set Instance\n}\n\nsig Instance {\n feature: one Feature,\n instanceParent: lone Instance\n}\n\nsig Intervall {\n lowerBound: Int,\n upperBound: Int + KleeneStar\n}\n\nabstract sig ConstraintNode {\n feature: one Feature,\n cardinality: some Intervall\n}\n\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n f = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n one i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n one i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n one i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n one i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\nfact intervallPositive {\n all i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\nfact intervallIsAttribute {\n all i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\nfact noClustering {\n all i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n all i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n all i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n all i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n (i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\nfact rootTree {\n all f: Feature | FM.root in f.*parent\n all f: FM.root | no f.parent\n all f: Feature - FM.root | one f.parent\n no f: Feature | f in f.^parent\n}\n\nfact configuration {\n all i: Instance | i in FM.config\n}\n\nfact root{\n all f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n all f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n all f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n all f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint {\n all i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n all c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n\nfact groupCardinalityConstraint {\n all i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\nfact groupInstanceCardinalityConstraint {\n all i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent {\n all i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n all i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n all i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n\nfact requireConstraint {\n all f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n all c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)]\n}\n\nfact excludeConstraint {\n all f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n all c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)])\n}\n\none sig Platoon, AddressingScheme, Regular, Compact, Channels, HighThroughput, Reliable, Movement, SlowMoving, FastMoving, Node, Follower, Leader extends Feature {}\n\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25, i26, i27, i28, i29, i30, i31, i32, i33, i34, i35, i36, i37, i38, i39 extends Intervall {}\n\none sig c0, c1, c2, c3, c4, c5, c6, c7, c8, c9 extends ConstraintNode {}\n\nfact {\n i1.lowerBound = 1\n i1.upperBound = 1\n Platoon.cardinality = i1\n i2.lowerBound = 0\n i2.upperBound = KleeneStar\n Platoon.groupInstanceCardinality = i2\n i3.lowerBound = 0\n i3.upperBound = KleeneStar\n Platoon.groupCardinality = i3\n\n i4.lowerBound = 1\n i4.upperBound = 1\n AddressingScheme.cardinality = i4\n i5.lowerBound = 0\n i5.upperBound = KleeneStar\n AddressingScheme.groupInstanceCardinality = i5\n i6.lowerBound = 0\n i6.upperBound = KleeneStar\n AddressingScheme.groupCardinality = i6\n AddressingScheme.parent = Platoon\n\n i7.lowerBound = 0\n i7.upperBound = 1\n Regular.cardinality = i7\n i8.lowerBound = 0\n i8.upperBound = KleeneStar\n Regular.groupInstanceCardinality = i8\n i9.lowerBound = 0\n i9.upperBound = KleeneStar\n Regular.groupCardinality = i9\n Regular.parent = AddressingScheme\n\n i10.lowerBound = 1\n i10.upperBound = KleeneStar\n Compact.cardinality = i10\n i11.lowerBound = 0\n i11.upperBound = KleeneStar\n Compact.groupInstanceCardinality = i11\n i12.lowerBound = 0\n i12.upperBound = KleeneStar\n Compact.groupCardinality = i12\n Compact.parent = AddressingScheme\n\n i13.lowerBound = 1\n i13.upperBound = KleeneStar\n Channels.cardinality = i13\n i14.lowerBound = 0\n i14.upperBound = KleeneStar\n Channels.groupInstanceCardinality = i14\n i15.lowerBound = 0\n i15.upperBound = KleeneStar\n Channels.groupCardinality = i15\n Channels.parent = Platoon\n\n i16.lowerBound = 1\n i16.upperBound = 8\n HighThroughput.cardinality = i16\n i17.lowerBound = 0\n i17.upperBound = KleeneStar\n HighThroughput.groupInstanceCardinality = i17\n i18.lowerBound = 0\n i18.upperBound = KleeneStar\n HighThroughput.groupCardinality = i18\n HighThroughput.parent = Channels\n\n i19.lowerBound = 1\n i19.upperBound = 32\n Reliable.cardinality = i19\n i20.lowerBound = 0\n i20.upperBound = KleeneStar\n Reliable.groupInstanceCardinality = i20\n i21.lowerBound = 0\n i21.upperBound = KleeneStar\n Reliable.groupCardinality = i21\n Reliable.parent = Channels\n\n i22.lowerBound = 1\n i22.upperBound = 1\n Movement.cardinality = i22\n i23.lowerBound = 0\n i23.upperBound = KleeneStar\n Movement.groupInstanceCardinality = i23\n i24.lowerBound = 0\n i24.upperBound = KleeneStar\n Movement.groupCardinality = i24\n Movement.parent = Platoon\n\n i25.lowerBound = 0\n i25.upperBound = 1\n SlowMoving.cardinality = i25\n i26.lowerBound = 0\n i26.upperBound = KleeneStar\n SlowMoving.groupInstanceCardinality = i26\n i27.lowerBound = 0\n i27.upperBound = KleeneStar\n SlowMoving.groupCardinality = i27\n SlowMoving.parent = Movement\n\n i28.lowerBound = 0\n i28.upperBound = 1\n FastMoving.cardinality = i28\n i29.lowerBound = 0\n i29.upperBound = KleeneStar\n FastMoving.groupInstanceCardinality = i29\n i30.lowerBound = 0\n i30.upperBound = KleeneStar\n FastMoving.groupCardinality = i30\n FastMoving.parent = Movement\n i31.lowerBound = 1\n i31.upperBound = KleeneStar\n Node.cardinality = i31\n i32.lowerBound = 0\n i32.upperBound = KleeneStar\n Node.groupInstanceCardinality = i32\n i33.lowerBound = 0\n i33.upperBound = KleeneStar\n Node.groupCardinality = i33\n Node.parent = Platoon\n i34.lowerBound = 0\n i34.upperBound = 1\n Follower.cardinality = i34\n i35.lowerBound = 0\n i35.upperBound = KleeneStar\n Follower.groupInstanceCardinality = i35\n i36.lowerBound = 0\n i36.upperBound = KleeneStar\n Follower.groupCardinality = i36\n Follower.parent = Node\n i37.lowerBound = 0\n i37.upperBound = 1\n Leader.cardinality = i37\n i38.lowerBound = 0\n i38.upperBound = KleeneStar\n Leader.groupInstanceCardinality = i38\n i39.lowerBound = 0\n i39.upperBound = KleeneStar\n Leader.groupCardinality = i39\n Leader.parent = Node\n}\n\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "jimmy-blush-clad-dander", "time": "2024-07-26 08:41:44.159912", "cmd": 1} {"id": 14089, "parent": 14045, "code": "open util/integer\n\n/**\n\tMeta-model\n*/\n\none sig FM {\n\troot: one Feature,\n\tgroup: set Feature,\n\trequire: ConstraintNode -> ConstraintNode,\n\texclude: ConstraintNode -> ConstraintNode,\n\tconfig: set Instance\n}\nabstract sig Feature{\n\tgroupCardinality: set Intervall,\n\tgroupInstanceCardinality: set Intervall,\n\tcardinality: some Intervall,\n\tparent: lone Feature,\n\tinstances: set Instance\n}\nsig Instance {\n\tfeature: one Feature,\n\tinstanceParent: lone Instance\n}\nsig Intervall {\n\tlowerBound: Int,\n\tupperBound: Int + KleeneStar\n}\nabstract sig ConstraintNode {\n\tfeature: one Feature,\n\tcardinality: some Intervall\n}\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n\tf = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n\tone i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n\tone i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n//Intervall constraints\n\nfact intervallPositive {\n\tall i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\n//wenn zwei Intervalle die gleichen Grenzen haben, ist es das gleiche Intervall\n//fact noEqualIntervall {\n//\tall i, j: Intervall | i.lowerBound = j.lowerBound && i.upperBound = j.upperBound implies i=j\n//}\n\n//kein intervall lose im FM\nfact intervallIsAttribute {\n\tall i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\n\n//keine sich überschneidenden oder direkt angrenzenden Intervalle\nfact noClustering {\n\tall i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n\tall i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n\t(i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\n//FM constaints\n\nfact rootTree {\n\tall f: Feature | FM.root in f.*parent\t//genau 1 root!!\n\tall f: FM.root | no f.parent\n\tall f: Feature - FM.root | one f.parent\n\tno f: Feature | f in f.^parent\t//zyklenfrei\n}\n\nfact configuration {\n\tall i: Instance | i in FM.config\n}\n\n//root muss im FM aktiv sein\nfact root{\n\tall f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n\tall f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n\tall f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n\tall f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint{\n\tall i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n\tall c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n// in Gruppe sind mindestens/maximal so viele Features aktiv, wie Gruppenkardinalität spezifiziert\nfact groupCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\n// in Gruppe sind mindestens/maximal so viele Instances aktiv, wie Gruppeninstanzkardinalität spezifiziert\nfact groupInstanceCardinalityConstraint {\n\tall i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent{\n\tall i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n\tall i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n\tall i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n// Require edges\nfact requireConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)] \n}\n// Exclude edges\nfact excludeConstraint {\n\tall f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n\tall c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)]) \n}\none sig Platoon, AddressingScheme, Channels, Movement, Node, Regular, Compact, HighThroughput, Reliable, SlowMoving, FastMoving, Follower, Leader extends Feature{}\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25, i26, i27, i28, i29, i30, i31, i32, i33 extends Intervall{}\none sig c0, c1, c2, c3, c4, c5, c6, c7, c8, c9 extends ConstraintNode{}\nfact {\ni1.lowerBound = 1\ni1.upperBound = 1\nPlatoon.cardinality = i1\ni2.lowerBound = 4\ni2.upperBound = KleeneStar\nPlatoon.groupInstanceCardinality = i2\ni3.lowerBound = 4\ni3.upperBound = KleeneStar\nPlatoon.groupCardinality = i3\nAddressingScheme.parent = Platoon\ni4.lowerBound = 1\ni4.upperBound = 1\nAddressingScheme.cardinality = i4\ni5.lowerBound = 1\ni5.upperBound = 1\nAddressingScheme.groupInstanceCardinality = i5\ni6.lowerBound = 1\ni6.upperBound = 1\nAddressingScheme.groupCardinality = i6\nChannels.parent = Platoon\ni7.lowerBound = 1\ni7.upperBound = KleeneStar\nChannels.cardinality = i7\ni8.lowerBound = 1\ni8.upperBound = KleeneStar\nChannels.groupInstanceCardinality = i8\ni9.lowerBound = 1\ni9.upperBound = KleeneStar\nChannels.groupCardinality = i9\nMovement.parent = Platoon\ni10.lowerBound = 1\ni10.upperBound = 1\nMovement.cardinality = i10\ni11.lowerBound = 1\ni11.upperBound = 1\nMovement.groupInstanceCardinality = i11\ni12.lowerBound = 1\ni12.upperBound = 1\nMovement.groupCardinality = i12\nNode.parent = Platoon\ni13.lowerBound = 1\ni13.upperBound = KleeneStar\nNode.cardinality = i13\ni14.lowerBound = 1\ni14.upperBound = 1\nNode.groupInstanceCardinality = i14\ni15.lowerBound = 1\ni15.upperBound = 2\nNode.groupCardinality = i15\nRegular.parent = AddressingScheme\ni16.lowerBound = 0\ni16.upperBound = 1\nRegular.cardinality = i16\nCompact.parent = AddressingScheme\ni17.lowerBound = 0\ni17.upperBound = 1\nCompact.cardinality = i17\nHighThroughput.parent = Channels\ni18.lowerBound = 1\ni18.upperBound = 8\nHighThroughput.cardinality = i18\nReliable.parent = Channels\ni19.lowerBound = 1\ni19.upperBound = 32\nReliable.cardinality = i19\nSlowMoving.parent = Movement\ni20.lowerBound = 0\ni20.upperBound = 1\nSlowMoving.cardinality = i20\nFastMoving.parent = Movement\ni21.lowerBound = 0\ni21.upperBound = 1\nFastMoving.cardinality = i21\nFollower.parent = Node\ni22.lowerBound = 0\ni22.upperBound = 1\nFollower.cardinality = i22\nLeader.parent = Node\ni23.lowerBound = 0\ni23.upperBound = 1\nLeader.cardinality = i23\nc0.feature = Compact\ni24.lowerBound = 1\ni24.upperBound = KleeneStar\nc0.cardinality = i24\nc5.feature = HighThroughput\ni25.lowerBound = 10\ni25.upperBound = 20\nc5.cardinality = i25\nc1.feature = HighThroughput\ni26.lowerBound = 1\ni26.upperBound = KleeneStar\nc1.cardinality = i26\nc6.feature = Reliable\ni27.lowerBound = 3\ni27.upperBound = KleeneStar\nc6.cardinality = i27\nc2.feature = FastMoving\ni28.lowerBound = 1\ni28.upperBound = 1\nc2.cardinality = i28\nc7.feature = Reliable\ni29.lowerBound = 2\ni29.upperBound = KleeneStar\nc7.cardinality = i29\nc3.feature = Follower\ni30.lowerBound = 3\ni30.upperBound = KleeneStar\nc3.cardinality = i30\nc8.feature = FastMoving\ni31.lowerBound = 1\ni31.upperBound = KleeneStar\nc8.cardinality = i31\nc4.feature = Platoon\ni32.lowerBound = 1\ni32.upperBound = 1\nc4.cardinality = i32\nc9.feature = Leader\ni33.lowerBound = 1\ni33.upperBound = 1\nc9.cardinality = i33\nFM.require = c2 -> c7 + c4 -> c9 \nFM.exclude = c0 -> c5 + c1 -> c6 + c3 -> c8 \n}\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "alto-casket-gopher-curdle", "time": "2024-07-26 09:04:21.828409", "cmd": 1} {"id": 14082, "parent": 14079, "code": "module examples/puzzles/handshake\n\n/*\n * Alloy model of the Halmos handshake problem\n *\n * Hilary and Jocelyn are married. They invite four couples who are friends for dinner. When\n * they arrive, they shake hands with each other. Nobody shakes hands with him or herself\n * or with his or her spouse. After there has been some handshaking, Jocelyn jumps up on\n * a chair and says \"Stop shaking hands!\", and then asks how many hands each person has\n * shaken. All the answers are different. How many hands has Hilary shaken?\n *\n * The Alloy model represents the problem as a set of constraints. Properties of the spouse\n * relationship and of handshaking in general are given as facts. The particular situation\n * is cast as a function.\n *\n * There are 9 people answering, and all answers are different. Nobody can shake more than\n * 8 hands. So answers must be 0..8. The one (p8 say) who answered 8 has shaken everybody's\n * hand except for his or her own, and his or her spouse's. Now consider the person who shook\n * 0 hands (p0 say). The persons p0 and p8 are distinct. If they are not married, then p8 cannot\n * have shaken 8 hands, because he or she did not shake the hand of p0 or of his or her spouse.\n * So p8's spouse to p0. Now imagine Jocelyn asking the question again, with p0 and p8 out of\n * the room, and excluding hand shakes with them. Since p8 shook hands with everyone else\n * except p0 and p8, everyone gives an answer one smaller than they did before, giving 0..6.\n * The argument now applies recursively. So Hilary is left alone, having shaken 4 hands.\n *\n * author: Daniel Jackson, 11/15/01\n */\n\nsig Person {spouse: Person, shaken: set Person}\none sig Jocelyn, Hilary extends Person {}\n\nfact ShakingProtocol {\n // nobody shakes own or spouse's hand\n all p: Person | no (p + p.spouse) & p.shaken\n // if p shakes q, q shakes p\n all p, q: Person | p in q.shaken => q in p.shaken\n }\n\nfact Spouses {\n all p, q: Person | p!=q => {\n // if q is p's spouse, p is q's spouse\n p.spouse = q => q.spouse = p\n // no spouse sharing\n p.spouse != q.spouse\n }\n all p: Person {\n // a person is his or her spouse's spouse\n p.spouse.spouse = p\n // nobody is his or her own spouse\n p != p.spouse\n }\n }\n\npred Puzzle {\n // everyone but Jocelyn has shaken a different number of hands\n all p,q: Person - Jocelyn | p!=q => #p.shaken != #q.shaken\n // Hilary's spouse is Jocelyn\n Hilary.spouse = Jocelyn\n }\n\nrun Puzzle for exactly 1000 Person, 15 int", "permalink": "tartar-change-reword-pueblo", "time": "2024-07-26 08:36:41.520219", "cmd": 1} {"id": 14084, "parent": 14082, "code": "module examples/puzzles/handshake\n\n/*\n * Alloy model of the Halmos handshake problem\n *\n * Hilary and Jocelyn are married. They invite four couples who are friends for dinner. When\n * they arrive, they shake hands with each other. Nobody shakes hands with him or herself\n * or with his or her spouse. After there has been some handshaking, Jocelyn jumps up on\n * a chair and says \"Stop shaking hands!\", and then asks how many hands each person has\n * shaken. All the answers are different. How many hands has Hilary shaken?\n *\n * The Alloy model represents the problem as a set of constraints. Properties of the spouse\n * relationship and of handshaking in general are given as facts. The particular situation\n * is cast as a function.\n *\n * There are 9 people answering, and all answers are different. Nobody can shake more than\n * 8 hands. So answers must be 0..8. The one (p8 say) who answered 8 has shaken everybody's\n * hand except for his or her own, and his or her spouse's. Now consider the person who shook\n * 0 hands (p0 say). The persons p0 and p8 are distinct. If they are not married, then p8 cannot\n * have shaken 8 hands, because he or she did not shake the hand of p0 or of his or her spouse.\n * So p8's spouse to p0. Now imagine Jocelyn asking the question again, with p0 and p8 out of\n * the room, and excluding hand shakes with them. Since p8 shook hands with everyone else\n * except p0 and p8, everyone gives an answer one smaller than they did before, giving 0..6.\n * The argument now applies recursively. So Hilary is left alone, having shaken 4 hands.\n *\n * author: Daniel Jackson, 11/15/01\n */\n\nsig Person {spouse: Person, shaken: set Person}\none sig Jocelyn, Hilary extends Person {}\n\nfact ShakingProtocol {\n // nobody shakes own or spouse's hand\n all p: Person | no (p + p.spouse) & p.shaken\n // if p shakes q, q shakes p\n all p, q: Person | p in q.shaken => q in p.shaken\n }\n\nfact Spouses {\n all p, q: Person | p!=q => {\n // if q is p's spouse, p is q's spouse\n p.spouse = q => q.spouse = p\n // no spouse sharing\n p.spouse != q.spouse\n }\n all p: Person {\n // a person is his or her spouse's spouse\n p.spouse.spouse = p\n // nobody is his or her own spouse\n p != p.spouse\n }\n }\n\npred Puzzle {\n // everyone but Jocelyn has shaken a different number of hands\n all p,q: Person - Jocelyn | p!=q => #p.shaken != #q.shaken\n // Hilary's spouse is Jocelyn\n Hilary.spouse = Jocelyn\n }\n\nrun Puzzle for exactly 1000 Person, 15 int", "permalink": "mutual-void-groovy-bundle", "time": "2024-07-26 08:36:56.291215", "cmd": 1} {"id": 14088, "parent": 14081, "code": "open util/integer\n\n// Alloy model generated for deep embedding\n\none sig FM {\n root: one Feature,\n group: set Feature,\n require: ConstraintNode -> ConstraintNode,\n exclude: ConstraintNode -> ConstraintNode,\n config: set Instance\n}\n\nabstract sig Feature {\n groupCardinality: set Intervall,\n groupInstanceCardinality: set Intervall,\n cardinality: some Intervall,\n parent: lone Feature,\n instances: set Instance\n}\n\nsig Instance {\n feature: one Feature,\n instanceParent: lone Instance\n}\n\nsig Intervall {\n lowerBound: Int,\n upperBound: Int + KleeneStar\n}\n\nabstract sig ConstraintNode {\n feature: one Feature,\n cardinality: some Intervall\n}\n\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n f = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n one i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n one i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n one i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n one i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\nfact intervallPositive {\n all i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\nfact intervallIsAttribute {\n all i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\nfact noClustering {\n all i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n all i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n all i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n all i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n (i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\nfact rootTree {\n all f: Feature | FM.root in f.*parent\n all f: FM.root | no f.parent\n all f: Feature - FM.root | one f.parent\n no f: Feature | f in f.^parent\n}\n\nfact configuration {\n all i: Instance | i in FM.config\n}\n\nfact root{\n all f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n all f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n all f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n all f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint {\n all i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n all c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n\nfact groupCardinalityConstraint {\n all i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\nfact groupInstanceCardinalityConstraint {\n all i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent {\n all i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n all i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n all i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n\nfact requireConstraint {\n all f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n all c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)]\n}\n\nfact excludeConstraint {\n all f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n all c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)])\n}\n\none sig Platoon, AddressingScheme, Regular, Compact, Channels, HighThroughput, Reliable, Movement, SlowMoving, FastMoving, Node, Follower, Leader extends Feature {}\n\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25, i26, i27, i28, i29, i30, i31, i32, i33, i34, i35, i36, i37, i38, i39 extends Intervall {}\n\none sig c0, c1, c2, c3, c4, c5, c6, c7, c8, c9 extends ConstraintNode {}\n\nfact {\n i1.lowerBound = 1\n i1.upperBound = 1\n Platoon.cardinality = i1\n i2.lowerBound = 0\n i2.upperBound = KleeneStar\n Platoon.groupInstanceCardinality = i2\n i3.lowerBound = 0\n i3.upperBound = KleeneStar\n Platoon.groupCardinality = i3\n\n i4.lowerBound = 1\n i4.upperBound = 1\n AddressingScheme.cardinality = i4\n i5.lowerBound = 0\n i5.upperBound = KleeneStar\n AddressingScheme.groupInstanceCardinality = i5\n i6.lowerBound = 0\n i6.upperBound = KleeneStar\n AddressingScheme.groupCardinality = i6\n AddressingScheme.parent = Platoon\n\n i7.lowerBound = 0\n i7.upperBound = 1\n Regular.cardinality = i7\n i8.lowerBound = 0\n i8.upperBound = KleeneStar\n Regular.groupInstanceCardinality = i8\n i9.lowerBound = 0\n i9.upperBound = KleeneStar\n Regular.groupCardinality = i9\n Regular.parent = AddressingScheme\n\n i10.lowerBound = 1\n i10.upperBound = KleeneStar\n Compact.cardinality = i10\n i11.lowerBound = 0\n i11.upperBound = KleeneStar\n Compact.groupInstanceCardinality = i11\n i12.lowerBound = 0\n i12.upperBound = KleeneStar\n Compact.groupCardinality = i12\n Compact.parent = AddressingScheme\n\n i13.lowerBound = 1\n i13.upperBound = KleeneStar\n Channels.cardinality = i13\n i14.lowerBound = 0\n i14.upperBound = KleeneStar\n Channels.groupInstanceCardinality = i14\n i15.lowerBound = 0\n i15.upperBound = KleeneStar\n Channels.groupCardinality = i15\n Channels.parent = Platoon\n\n i16.lowerBound = 1\n i16.upperBound = 8\n HighThroughput.cardinality = i16\n i17.lowerBound = 0\n i17.upperBound = KleeneStar\n HighThroughput.groupInstanceCardinality = i17\n i18.lowerBound = 0\n i18.upperBound = KleeneStar\n HighThroughput.groupCardinality = i18\n HighThroughput.parent = Channels\n\n i19.lowerBound = 1\n i19.upperBound = 32\n Reliable.cardinality = i19\n i20.lowerBound = 0\n i20.upperBound = KleeneStar\n Reliable.groupInstanceCardinality = i20\n i21.lowerBound = 0\n i21.upperBound = KleeneStar\n Reliable.groupCardinality = i21\n Reliable.parent = Channels\n\n i22.lowerBound = 1\n i22.upperBound = 1\n Movement.cardinality = i22\n i23.lowerBound = 0\n i23.upperBound = KleeneStar\n Movement.groupInstanceCardinality = i23\n i24.lowerBound = 0\n i24.upperBound = KleeneStar\n Movement.groupCardinality = i24\n Movement.parent = Platoon\n\n i25.lowerBound = 0\n i25.upperBound = 1\n SlowMoving.cardinality = i25\n i26.lowerBound = 0\n i26.upperBound = KleeneStar\n SlowMoving.groupInstanceCardinality = i26\n i27.lowerBound = 0\n i27.upperBound = KleeneStar\n SlowMoving.groupCardinality = i27\n SlowMoving.parent = Movement\n\n i28.lowerBound = 0\n i28.upperBound = 1\n FastMoving.cardinality = i28\n i29.lowerBound = 0\n i29.upperBound = KleeneStar\n FastMoving.groupInstanceCardinality = i29\n i30.lowerBound = 0\n i30.upperBound = KleeneStar\n FastMoving.groupCardinality = i30\n FastMoving.parent = Movement\n i31.lowerBound = 1\n i31.upperBound = KleeneStar\n Node.cardinality = i31\n i32.lowerBound = 0\n i32.upperBound = KleeneStar\n Node.groupInstanceCardinality = i32\n i33.lowerBound = 0\n i33.upperBound = KleeneStar\n Node.groupCardinality = i33\n Node.parent = Platoon\n i34.lowerBound = 0\n i34.upperBound = 1\n Follower.cardinality = i34\n i35.lowerBound = 0\n i35.upperBound = KleeneStar\n Follower.groupInstanceCardinality = i35\n i36.lowerBound = 0\n i36.upperBound = KleeneStar\n Follower.groupCardinality = i36\n Follower.parent = Node\n i37.lowerBound = 0\n i37.upperBound = 1\n Leader.cardinality = i37\n i38.lowerBound = 0\n i38.upperBound = KleeneStar\n Leader.groupInstanceCardinality = i38\n i39.lowerBound = 0\n i39.upperBound = KleeneStar\n Leader.groupCardinality = i39\n Leader.parent = Node\n}\n\npred show{}\nrun show for 10 but 7 int, 0 Feature, 0 ConstraintNode", "permalink": "femur-bath-fox-fang", "time": "2024-07-26 08:52:42.682365", "cmd": 1} {"id": 14085, "parent": 14082, "code": "module examples/puzzles/handshake\n\n/*\n * Alloy model of the Halmos handshake problem\n *\n * Hilary and Jocelyn are married. They invite four couples who are friends for dinner. When\n * they arrive, they shake hands with each other. Nobody shakes hands with him or herself\n * or with his or her spouse. After there has been some handshaking, Jocelyn jumps up on\n * a chair and says \"Stop shaking hands!\", and then asks how many hands each person has\n * shaken. All the answers are different. How many hands has Hilary shaken?\n *\n * The Alloy model represents the problem as a set of constraints. Properties of the spouse\n * relationship and of handshaking in general are given as facts. The particular situation\n * is cast as a function.\n *\n * There are 9 people answering, and all answers are different. Nobody can shake more than\n * 8 hands. So answers must be 0..8. The one (p8 say) who answered 8 has shaken everybody's\n * hand except for his or her own, and his or her spouse's. Now consider the person who shook\n * 0 hands (p0 say). The persons p0 and p8 are distinct. If they are not married, then p8 cannot\n * have shaken 8 hands, because he or she did not shake the hand of p0 or of his or her spouse.\n * So p8's spouse to p0. Now imagine Jocelyn asking the question again, with p0 and p8 out of\n * the room, and excluding hand shakes with them. Since p8 shook hands with everyone else\n * except p0 and p8, everyone gives an answer one smaller than they did before, giving 0..6.\n * The argument now applies recursively. So Hilary is left alone, having shaken 4 hands.\n *\n * author: Daniel Jackson, 11/15/01\n */\n\nsig Person {spouse: Person, shaken: set Person}\none sig Jocelyn, Hilary extends Person {}\n\nfact ShakingProtocol {\n // nobody shakes own or spouse's hand\n all p: Person | no (p + p.spouse) & p.shaken\n // if p shakes q, q shakes p\n all p, q: Person | p in q.shaken => q in p.shaken\n }\n\nfact Spouses {\n all p, q: Person | p!=q => {\n // if q is p's spouse, p is q's spouse\n p.spouse = q => q.spouse = p\n // no spouse sharing\n p.spouse != q.spouse\n }\n all p: Person {\n // a person is his or her spouse's spouse\n p.spouse.spouse = p\n // nobody is his or her own spouse\n p != p.spouse\n }\n }\n\npred Puzzle {\n // everyone but Jocelyn has shaken a different number of hands\n all p,q: Person - Jocelyn | p!=q => #p.shaken != #q.shaken\n // Hilary's spouse is Jocelyn\n Hilary.spouse = Jocelyn\n }\n\nrun Puzzle for exactly 1000 Person, 15 int", "permalink": "cozily-comply-sporty-giggly", "time": "2024-07-26 08:37:21.953934", "cmd": 1} {"id": 14086, "parent": 14082, "code": "module examples/puzzles/handshake\n\n/*\n * Alloy model of the Halmos handshake problem\n *\n * Hilary and Jocelyn are married. They invite four couples who are friends for dinner. When\n * they arrive, they shake hands with each other. Nobody shakes hands with him or herself\n * or with his or her spouse. After there has been some handshaking, Jocelyn jumps up on\n * a chair and says \"Stop shaking hands!\", and then asks how many hands each person has\n * shaken. All the answers are different. How many hands has Hilary shaken?\n *\n * The Alloy model represents the problem as a set of constraints. Properties of the spouse\n * relationship and of handshaking in general are given as facts. The particular situation\n * is cast as a function.\n *\n * There are 9 people answering, and all answers are different. Nobody can shake more than\n * 8 hands. So answers must be 0..8. The one (p8 say) who answered 8 has shaken everybody's\n * hand except for his or her own, and his or her spouse's. Now consider the person who shook\n * 0 hands (p0 say). The persons p0 and p8 are distinct. If they are not married, then p8 cannot\n * have shaken 8 hands, because he or she did not shake the hand of p0 or of his or her spouse.\n * So p8's spouse to p0. Now imagine Jocelyn asking the question again, with p0 and p8 out of\n * the room, and excluding hand shakes with them. Since p8 shook hands with everyone else\n * except p0 and p8, everyone gives an answer one smaller than they did before, giving 0..6.\n * The argument now applies recursively. So Hilary is left alone, having shaken 4 hands.\n *\n * author: Daniel Jackson, 11/15/01\n */\n\nsig Person {spouse: Person, shaken: set Person}\none sig Jocelyn, Hilary extends Person {}\n\nfact ShakingProtocol {\n // nobody shakes own or spouse's hand\n all p: Person | no (p + p.spouse) & p.shaken\n // if p shakes q, q shakes p\n all p, q: Person | p in q.shaken => q in p.shaken\n }\n\nfact Spouses {\n all p, q: Person | p!=q => {\n // if q is p's spouse, p is q's spouse\n p.spouse = q => q.spouse = p\n // no spouse sharing\n p.spouse != q.spouse\n }\n all p: Person {\n // a person is his or her spouse's spouse\n p.spouse.spouse = p\n // nobody is his or her own spouse\n p != p.spouse\n }\n }\n\npred Puzzle {\n // everyone but Jocelyn has shaken a different number of hands\n all p,q: Person - Jocelyn | p!=q => #p.shaken != #q.shaken\n // Hilary's spouse is Jocelyn\n Hilary.spouse = Jocelyn\n }\n\nrun Puzzle for exactly 1000 Person, 15 int", "permalink": "precut-attire-reflux-nest", "time": "2024-07-26 08:38:41.704827", "cmd": 1} {"id": 14090, "parent": 14082, "code": "module examples/puzzles/handshake\n\n/*\n * Alloy model of the Halmos handshake problem\n *\n * Hilary and Jocelyn are married. They invite four couples who are friends for dinner. When\n * they arrive, they shake hands with each other. Nobody shakes hands with him or herself\n * or with his or her spouse. After there has been some handshaking, Jocelyn jumps up on\n * a chair and says \"Stop shaking hands!\", and then asks how many hands each person has\n * shaken. All the answers are different. How many hands has Hilary shaken?\n *\n * The Alloy model represents the problem as a set of constraints. Properties of the spouse\n * relationship and of handshaking in general are given as facts. The particular situation\n * is cast as a function.\n *\n * There are 9 people answering, and all answers are different. Nobody can shake more than\n * 8 hands. So answers must be 0..8. The one (p8 say) who answered 8 has shaken everybody's\n * hand except for his or her own, and his or her spouse's. Now consider the person who shook\n * 0 hands (p0 say). The persons p0 and p8 are distinct. If they are not married, then p8 cannot\n * have shaken 8 hands, because he or she did not shake the hand of p0 or of his or her spouse.\n * So p8's spouse to p0. Now imagine Jocelyn asking the question again, with p0 and p8 out of\n * the room, and excluding hand shakes with them. Since p8 shook hands with everyone else\n * except p0 and p8, everyone gives an answer one smaller than they did before, giving 0..6.\n * The argument now applies recursively. So Hilary is left alone, having shaken 4 hands.\n *\n * author: Daniel Jackson, 11/15/01\n */\n\nsig Person {spouse: Person, shaken: set Person}\none sig Jocelyn, Hilary extends Person {}\n\nfact ShakingProtocol {\n // nobody shakes own or spouse's hand\n all p: Person | no (p + p.spouse) & p.shaken\n // if p shakes q, q shakes p\n all p, q: Person | p in q.shaken => q in p.shaken\n }\n\nfact Spouses {\n all p, q: Person | p!=q => {\n // if q is p's spouse, p is q's spouse\n p.spouse = q => q.spouse = p\n // no spouse sharing\n p.spouse != q.spouse\n }\n all p: Person {\n // a person is his or her spouse's spouse\n p.spouse.spouse = p\n // nobody is his or her own spouse\n p != p.spouse\n }\n }\n\npred Puzzle {\n // everyone but Jocelyn has shaken a different number of hands\n all p,q: Person - Jocelyn | p!=q => #p.shaken != #q.shaken\n // Hilary's spouse is Jocelyn\n Hilary.spouse = Jocelyn\n }\n\nrun Puzzle for exactly 1000 Person, 15 int", "permalink": "scared-blurt-versus-clover", "time": "2024-07-26 09:07:01.549495", "cmd": 1} {"id": 14091, "parent": 14087, "code": "open util/integer\n\n// Alloy model generated for deep embedding\n\none sig FM {\n root: one Feature,\n group: set Feature,\n require: ConstraintNode -> ConstraintNode,\n exclude: ConstraintNode -> ConstraintNode,\n config: set Instance\n}\n\nabstract sig Feature {\n groupCardinality: set Intervall,\n groupInstanceCardinality: set Intervall,\n cardinality: some Intervall,\n parent: lone Feature,\n instances: set Instance\n}\n\nsig Instance {\n feature: one Feature,\n instanceParent: lone Instance\n}\n\nsig Intervall {\n lowerBound: Int,\n upperBound: Int + KleeneStar\n}\n\nabstract sig ConstraintNode {\n feature: one Feature,\n cardinality: some Intervall\n}\n\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n f = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n one i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n one i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n one i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n one i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\nfact intervallPositive {\n all i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\nfact intervallIsAttribute {\n all i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\nfact noClustering {\n all i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n all i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n all i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n all i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n (i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\nfact rootTree {\n all f: Feature | FM.root in f.*parent\n all f: FM.root | no f.parent\n all f: Feature - FM.root | one f.parent\n no f: Feature | f in f.^parent\n}\n\nfact configuration {\n all i: Instance | i in FM.config\n}\n\nfact root{\n all f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n all f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n all f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n all f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint {\n all i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n all c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n\nfact groupCardinalityConstraint {\n all i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\nfact groupInstanceCardinalityConstraint {\n all i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent {\n all i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n all i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n all i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n\nfact requireConstraint {\n all f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n all c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)]\n}\n\nfact excludeConstraint {\n all f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n all c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)])\n}\n\none sig Platoon, AddressingScheme, Regular, Compact, Channels, HighThroughput, Reliable, Movement, SlowMoving, FastMoving, Node, Follower, Leader extends Feature {}\n\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25, i26, i27, i28, i29, i30, i31, i32, i33, i34, i35, i36, i37, i38, i39 extends Intervall {}\n\nfact {\n i1.lowerBound = 1\n i1.upperBound = 1\n Platoon.cardinality = i1\n i2.lowerBound = 0\n i2.upperBound = KleeneStar\n Platoon.groupInstanceCardinality = i2\n i3.lowerBound = 0\n i3.upperBound = KleeneStar\n Platoon.groupCardinality = i3\n AddressingScheme.parent = Platoon\n i4.lowerBound = 1\n i4.upperBound = 1\n AddressingScheme.cardinality = i4\n i5.lowerBound = 1\n i5.upperBound = 1\n AddressingScheme.groupInstanceCardinality = i5\n i6.lowerBound = 1\n i6.upperBound = 1\n AddressingScheme.groupCardinality = i6\n Regular.parent = AddressingScheme\n i7.lowerBound = 0\n i7.upperBound = 1\n Regular.cardinality = i7\n i8.lowerBound = 0\n i8.upperBound = KleeneStar\n Regular.groupInstanceCardinality = i8\n i9.lowerBound = 0\n i9.upperBound = KleeneStar\n Regular.groupCardinality = i9\n Compact.parent = AddressingScheme\n i10.lowerBound = 0\n i10.upperBound = 1\n Compact.cardinality = i10\n i11.lowerBound = 0\n i11.upperBound = KleeneStar\n Compact.groupInstanceCardinality = i11\n i12.lowerBound = 0\n i12.upperBound = KleeneStar\n Compact.groupCardinality = i12\n Channels.parent = Platoon\n i13.lowerBound = 1\n i13.upperBound = KleeneStar\n Channels.cardinality = i13\n i14.lowerBound = 1\n i14.upperBound = KleeneStar\n Channels.groupInstanceCardinality = i14\n i15.lowerBound = 1\n i15.upperBound = KleeneStar\n Channels.groupCardinality = i15\n HighThroughput.parent = Channels\n i16.lowerBound = 1\n i16.upperBound = 8\n HighThroughput.cardinality = i16\n i17.lowerBound = 0\n i17.upperBound = KleeneStar\n HighThroughput.groupInstanceCardinality = i17\n i18.lowerBound = 0\n i18.upperBound = KleeneStar\n HighThroughput.groupCardinality = i18\n Reliable.parent = Channels\n i19.lowerBound = 1\n i19.upperBound = 32\n Reliable.cardinality = i19\n i20.lowerBound = 0\n i20.upperBound = KleeneStar\n Reliable.groupInstanceCardinality = i20\n i21.lowerBound = 0\n i21.upperBound = KleeneStar\n Reliable.groupCardinality = i21\n Movement.parent = Platoon\n i22.lowerBound = 1\n i22.upperBound = 1\n Movement.cardinality = i22\n i23.lowerBound = 1\n i23.upperBound = 1\n Movement.groupInstanceCardinality = i23\n i24.lowerBound = 1\n i24.upperBound = 1\n Movement.groupCardinality = i24\n SlowMoving.parent = Movement\n i25.lowerBound = 0\n i25.upperBound = 1\n SlowMoving.cardinality = i25\n i26.lowerBound = 0\n i26.upperBound = KleeneStar\n SlowMoving.groupInstanceCardinality = i26\n i27.lowerBound = 0\n i27.upperBound = KleeneStar\n SlowMoving.groupCardinality = i27\n FastMoving.parent = Movement\n i28.lowerBound = 0\n i28.upperBound = 1\n FastMoving.cardinality = i28\n i29.lowerBound = 0\n i29.upperBound = KleeneStar\n FastMoving.groupInstanceCardinality = i29\n i30.lowerBound = 0\n i30.upperBound = KleeneStar\n FastMoving.groupCardinality = i30\n Node.parent = Platoon\n i31.lowerBound = 1\n i31.upperBound = KleeneStar\n Node.cardinality = i31\n i32.lowerBound = 1\n i32.upperBound = KleeneStar\n Node.groupInstanceCardinality = i32\n i33.lowerBound = 1\n i33.upperBound = 2\n Node.groupCardinality = i33\n Follower.parent = Node\n i34.lowerBound = 0\n i34.upperBound = 1\n Follower.cardinality = i34\n i35.lowerBound = 0\n i35.upperBound = KleeneStar\n Follower.groupInstanceCardinality = i35\n i36.lowerBound = 0\n i36.upperBound = KleeneStar\n Follower.groupCardinality = i36\n Leader.parent = Node\n i37.lowerBound = 0\n i37.upperBound = 1\n Leader.cardinality = i37\n i38.lowerBound = 0\n i38.upperBound = KleeneStar\n Leader.groupInstanceCardinality = i38\n i39.lowerBound = 0\n i39.upperBound = KleeneStar\n Leader.groupCardinality = i39\n}\n\npred show{}\nrun show ", "permalink": "scuba-tamer-salad-curry", "time": "2024-07-26 10:23:36.758319", "cmd": 1} {"id": 14092, "parent": 14091, "code": "open util/integer\n\n// Alloy model generated for deep embedding\n\none sig FM {\n root: one Feature,\n group: set Feature,\n require: ConstraintNode -> ConstraintNode,\n exclude: ConstraintNode -> ConstraintNode,\n config: set Instance\n}\n\nabstract sig Feature {\n groupCardinality: set Intervall,\n groupInstanceCardinality: set Intervall,\n cardinality: some Intervall,\n parent: lone Feature,\n instances: set Instance\n}\n\nsig Instance {\n feature: one Feature,\n instanceParent: lone Instance\n}\n\nsig Intervall {\n lowerBound: Int,\n upperBound: Int + KleeneStar\n}\n\nabstract sig ConstraintNode {\n feature: one Feature,\n cardinality: some Intervall\n}\n\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n f = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n one i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n one i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n one i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n one i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\nfact intervallPositive {\n all i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\nfact intervallIsAttribute {\n all i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\nfact noClustering {\n all i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n all i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n all i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n all i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n (i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\nfact rootTree {\n all f: Feature | FM.root in f.*parent\n all f: FM.root | no f.parent\n all f: Feature - FM.root | one f.parent\n no f: Feature | f in f.^parent\n}\n\nfact configuration {\n all i: Instance | i in FM.config\n}\n\nfact root{\n all f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n all f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n all f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n all f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint {\n all i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n all c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n\nfact groupCardinalityConstraint {\n all i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\nfact groupInstanceCardinalityConstraint {\n all i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent {\n all i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n all i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n all i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n\nfact requireConstraint {\n all f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n all c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)]\n}\n\nfact excludeConstraint {\n all f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n all c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)])\n}\n\none sig RootFeature, FeatureA, FeatureD, FeatureB, FeatureC extends Feature {}\n\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15 extends Intervall {}\n\nfact {\n i1.lowerBound = 1\n i1.upperBound = 1\n RootFeature.cardinality = i1\n i2.lowerBound = 1\n i2.upperBound = 1\n RootFeature.groupInstanceCardinality = i2\n i3.lowerBound = 1\n i3.upperBound = 1\n RootFeature.groupCardinality = i3\n FeatureA.parent = RootFeature\n i4.lowerBound = 1\n i4.upperBound = 1\n FeatureA.cardinality = i4\n i5.lowerBound = 1\n i5.upperBound = 2\n FeatureA.groupInstanceCardinality = i5\n i6.lowerBound = 1\n i6.upperBound = 2\n FeatureA.groupCardinality = i6\n FeatureD.parent = FeatureA\n i7.lowerBound = 0\n i7.upperBound = 2\n FeatureD.cardinality = i7\n i8.lowerBound = 0\n i8.upperBound = 1\n FeatureD.groupInstanceCardinality = i8\n i9.lowerBound = 0\n i9.upperBound = 1\n FeatureD.groupCardinality = i9\n FeatureB.parent = RootFeature\n i10.lowerBound = 1\n i10.upperBound = 2\n FeatureB.cardinality = i10\n i11.lowerBound = 0\n i11.upperBound = 1\n FeatureB.groupInstanceCardinality = i11\n i12.lowerBound = 0\n i12.upperBound = 1\n FeatureB.groupCardinality = i12\n FeatureC.parent = RootFeature\n i13.lowerBound = 0\n i13.upperBound = 1\n FeatureC.cardinality = i13\n i14.lowerBound = 0\n i14.upperBound = 1\n FeatureC.groupInstanceCardinality = i14\n i15.lowerBound = 0\n i15.upperBound = 1\n FeatureC.groupCardinality = i15\n}\n\npred show{}\nrun show ", "permalink": "album-lid-grid-lemon", "time": "2024-07-26 10:33:21.264679", "cmd": 1} {"id": 14093, "parent": 14092, "code": "open util/integer\n\n// Alloy model generated for deep embedding\n\none sig FM {\n root: one Feature,\n group: set Feature,\n require: ConstraintNode -> ConstraintNode,\n exclude: ConstraintNode -> ConstraintNode,\n config: set Instance\n}\n\nabstract sig Feature {\n groupCardinality: set Intervall,\n groupInstanceCardinality: set Intervall,\n cardinality: some Intervall,\n parent: lone Feature,\n instances: set Instance\n}\n\nsig Instance {\n feature: one Feature,\n instanceParent: lone Instance\n}\n\nsig Intervall {\n lowerBound: Int,\n upperBound: Int + KleeneStar\n}\n\nabstract sig ConstraintNode {\n feature: one Feature,\n cardinality: some Intervall\n}\n\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n f = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n one i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n one i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n one i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n one i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\nfact intervallPositive {\n all i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\nfact intervallIsAttribute {\n all i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\nfact noClustering {\n all i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n all i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n all i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n all i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n (i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\nfact rootTree {\n all f: Feature | FM.root in f.*parent\n all f: FM.root | no f.parent\n all f: Feature - FM.root | one f.parent\n no f: Feature | f in f.^parent\n}\n\nfact configuration {\n all i: Instance | i in FM.config\n}\n\nfact root{\n all f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n all f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n all f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n all f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint {\n all i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n all c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n\nfact groupCardinalityConstraint {\n all i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\nfact groupInstanceCardinalityConstraint {\n all i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent {\n all i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n all i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n all i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n\nfact requireConstraint {\n all f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n all c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)]\n}\n\nfact excludeConstraint {\n all f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n all c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)])\n}\n\none sig RootFeature, FeatureA, FeatureD, FeatureB, FeatureC extends Feature {}\n\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15 extends Intervall {}\n\nfact {\n i1.lowerBound = 1\n i1.upperBound = 1\n RootFeature.cardinality = i1\n i2.lowerBound = 1\n i2.upperBound = 1\n RootFeature.groupInstanceCardinality = i2\n i3.lowerBound = 1\n i3.upperBound = 1\n RootFeature.groupCardinality = i3\n FeatureA.parent = RootFeature\n i4.lowerBound = 1\n i4.upperBound = 1\n FeatureA.cardinality = i4\n i5.lowerBound = 1\n i5.upperBound = 2\n FeatureA.groupInstanceCardinality = i5\n i6.lowerBound = 1\n i6.upperBound = 2\n FeatureA.groupCardinality = i6\n FeatureD.parent = FeatureA\n i7.lowerBound = 0\n i7.upperBound = 2\n FeatureD.cardinality = i7\n i8.lowerBound = 0\n i8.upperBound = 1\n FeatureD.groupInstanceCardinality = i8\n i9.lowerBound = 0\n i9.upperBound = 1\n FeatureD.groupCardinality = i9\n FeatureB.parent = RootFeature\n i10.lowerBound = 1\n i10.upperBound = 2\n FeatureB.cardinality = i10\n i11.lowerBound = 0\n i11.upperBound = 1\n FeatureB.groupInstanceCardinality = i11\n i12.lowerBound = 0\n i12.upperBound = 1\n FeatureB.groupCardinality = i12\n FeatureC.parent = RootFeature\n i13.lowerBound = 0\n i13.upperBound = 1\n FeatureC.cardinality = i13\n i14.lowerBound = 0\n i14.upperBound = 1\n FeatureC.groupInstanceCardinality = i14\n i15.lowerBound = 0\n i15.upperBound = 1\n FeatureC.groupCardinality = i15\n}\n\npred show{}\nrun show ", "permalink": "fever-tyke-evil-data", "time": "2024-07-26 10:33:25.142362", "cmd": 1} {"id": 14094, "parent": 14090, "code": "module examples/puzzles/handshake\n\n/*\n * Alloy model of the Halmos handshake problem\n *\n * Hilary and Jocelyn are married. They invite four couples who are friends for dinner. When\n * they arrive, they shake hands with each other. Nobody shakes hands with him or herself\n * or with his or her spouse. After there has been some handshaking, Jocelyn jumps up on\n * a chair and says \"Stop shaking hands!\", and then asks how many hands each person has\n * shaken. All the answers are different. How many hands has Hilary shaken?\n *\n * The Alloy model represents the problem as a set of constraints. Properties of the spouse\n * relationship and of handshaking in general are given as facts. The particular situation\n * is cast as a function.\n *\n * There are 9 people answering, and all answers are different. Nobody can shake more than\n * 8 hands. So answers must be 0..8. The one (p8 say) who answered 8 has shaken everybody's\n * hand except for his or her own, and his or her spouse's. Now consider the person who shook\n * 0 hands (p0 say). The persons p0 and p8 are distinct. If they are not married, then p8 cannot\n * have shaken 8 hands, because he or she did not shake the hand of p0 or of his or her spouse.\n * So p8's spouse to p0. Now imagine Jocelyn asking the question again, with p0 and p8 out of\n * the room, and excluding hand shakes with them. Since p8 shook hands with everyone else\n * except p0 and p8, everyone gives an answer one smaller than they did before, giving 0..6.\n * The argument now applies recursively. So Hilary is left alone, having shaken 4 hands.\n *\n * author: Daniel Jackson, 11/15/01\n */\n\nsig Person {spouse: Person, shaken: set Person}\none sig Jocelyn, Hilary extends Person {}\n\nfact ShakingProtocol {\n // nobody shakes own or spouse's hand\n all p: Person | no (p + p.spouse) & p.shaken\n // if p shakes q, q shakes p\n all p, q: Person | p in q.shaken => q in p.shaken\n }\n\nfact Spouses {\n all p, q: Person | p!=q => {\n // if q is p's spouse, p is q's spouse\n p.spouse = q => q.spouse = p\n // no spouse sharing\n p.spouse != q.spouse\n }\n all p: Person {\n // a person is his or her spouse's spouse\n p.spouse.spouse = p\n // nobody is his or her own spouse\n p != p.spouse\n }\n }\n\npred Puzzle {\n // everyone but Jocelyn has shaken a different number of hands\n all p,q: Person - Jocelyn | p!=q => #p.shaken != #q.shaken\n // Hilary's spouse is Jocelyn\n Hilary.spouse = Jocelyn\n }\n\nrun Puzzle for exactly 1000 Person, 15 int", "permalink": "filled-apache-duller-thrash", "time": "2024-07-26 10:45:06.964531", "cmd": 1} {"id": 14095, "parent": 14094, "code": "module examples/puzzles/handshake\n\n/*\n * Alloy model of the Halmos handshake problem\n *\n * Hilary and Jocelyn are married. They invite four couples who are friends for dinner. When\n * they arrive, they shake hands with each other. Nobody shakes hands with him or herself\n * or with his or her spouse. After there has been some handshaking, Jocelyn jumps up on\n * a chair and says \"Stop shaking hands!\", and then asks how many hands each person has\n * shaken. All the answers are different. How many hands has Hilary shaken?\n *\n * The Alloy model represents the problem as a set of constraints. Properties of the spouse\n * relationship and of handshaking in general are given as facts. The particular situation\n * is cast as a function.\n *\n * There are 9 people answering, and all answers are different. Nobody can shake more than\n * 8 hands. So answers must be 0..8. The one (p8 say) who answered 8 has shaken everybody's\n * hand except for his or her own, and his or her spouse's. Now consider the person who shook\n * 0 hands (p0 say). The persons p0 and p8 are distinct. If they are not married, then p8 cannot\n * have shaken 8 hands, because he or she did not shake the hand of p0 or of his or her spouse.\n * So p8's spouse to p0. Now imagine Jocelyn asking the question again, with p0 and p8 out of\n * the room, and excluding hand shakes with them. Since p8 shook hands with everyone else\n * except p0 and p8, everyone gives an answer one smaller than they did before, giving 0..6.\n * The argument now applies recursively. So Hilary is left alone, having shaken 4 hands.\n *\n * author: Daniel Jackson, 11/15/01\n */\n\nsig Person {spouse: Person, shaken: set Person}\none sig Jocelyn, Hilary extends Person {}\n\nfact ShakingProtocol {\n // nobody shakes own or spouse's hand\n all p: Person | no (p + p.spouse) & p.shaken\n // if p shakes q, q shakes p\n all p, q: Person | p in q.shaken => q in p.shaken\n }\n\nfact Spouses {\n all p, q: Person | p!=q => {\n // if q is p's spouse, p is q's spouse\n p.spouse = q => q.spouse = p\n // no spouse sharing\n p.spouse != q.spouse\n }\n all p: Person {\n // a person is his or her spouse's spouse\n p.spouse.spouse = p\n // nobody is his or her own spouse\n p != p.spouse\n }\n }\n\npred Puzzle {\n // everyone but Jocelyn has shaken a different number of hands\n all p,q: Person - Jocelyn | p!=q => #p.shaken != #q.shaken\n // Hilary's spouse is Jocelyn\n Hilary.spouse = Jocelyn\n }\n\nrun Puzzle for exactly 1000 Person, 15 int", "permalink": "dad-cussed-tint-poster", "time": "2024-07-26 10:45:15.759858", "cmd": 1} {"id": 14096, "parent": 14094, "code": "module examples/puzzles/handshake\n\n/*\n * Alloy model of the Halmos handshake problem\n *\n * Hilary and Jocelyn are married. They invite four couples who are friends for dinner. When\n * they arrive, they shake hands with each other. Nobody shakes hands with him or herself\n * or with his or her spouse. After there has been some handshaking, Jocelyn jumps up on\n * a chair and says \"Stop shaking hands!\", and then asks how many hands each person has\n * shaken. All the answers are different. How many hands has Hilary shaken?\n *\n * The Alloy model represents the problem as a set of constraints. Properties of the spouse\n * relationship and of handshaking in general are given as facts. The particular situation\n * is cast as a function.\n *\n * There are 9 people answering, and all answers are different. Nobody can shake more than\n * 8 hands. So answers must be 0..8. The one (p8 say) who answered 8 has shaken everybody's\n * hand except for his or her own, and his or her spouse's. Now consider the person who shook\n * 0 hands (p0 say). The persons p0 and p8 are distinct. If they are not married, then p8 cannot\n * have shaken 8 hands, because he or she did not shake the hand of p0 or of his or her spouse.\n * So p8's spouse to p0. Now imagine Jocelyn asking the question again, with p0 and p8 out of\n * the room, and excluding hand shakes with them. Since p8 shook hands with everyone else\n * except p0 and p8, everyone gives an answer one smaller than they did before, giving 0..6.\n * The argument now applies recursively. So Hilary is left alone, having shaken 4 hands.\n *\n * author: Daniel Jackson, 11/15/01\n */\n\nsig Person {spouse: Person, shaken: set Person}\none sig Jocelyn, Hilary extends Person {}\n\nfact ShakingProtocol {\n // nobody shakes own or spouse's hand\n all p: Person | no (p + p.spouse) & p.shaken\n // if p shakes q, q shakes p\n all p, q: Person | p in q.shaken => q in p.shaken\n }\n\nfact Spouses {\n all p, q: Person | p!=q => {\n // if q is p's spouse, p is q's spouse\n p.spouse = q => q.spouse = p\n // no spouse sharing\n p.spouse != q.spouse\n }\n all p: Person {\n // a person is his or her spouse's spouse\n p.spouse.spouse = p\n // nobody is his or her own spouse\n p != p.spouse\n }\n }\n\npred Puzzle {\n // everyone but Jocelyn has shaken a different number of hands\n all p,q: Person - Jocelyn | p!=q => #p.shaken != #q.shaken\n // Hilary's spouse is Jocelyn\n Hilary.spouse = Jocelyn\n }\n\nrun Puzzle for exactly 1000 Person, 15 int", "permalink": "unreal-aids-math-angles", "time": "2024-07-26 10:45:19.096584", "cmd": 1} {"id": 14097, "parent": null, "code": "module examples/puzzles/handshake\n\n/*\n * Alloy model of the Halmos handshake problem\n *\n * Hilary and Jocelyn are married. They invite four couples who are friends for dinner. When\n * they arrive, they shake hands with each other. Nobody shakes hands with him or herself\n * or with his or her spouse. After there has been some handshaking, Jocelyn jumps up on\n * a chair and says \"Stop shaking hands!\", and then asks how many hands each person has\n * shaken. All the answers are different. How many hands has Hilary shaken?\n *\n * The Alloy model represents the problem as a set of constraints. Properties of the spouse\n * relationship and of handshaking in general are given as facts. The particular situation\n * is cast as a function.\n *\n * There are 9 people answering, and all answers are different. Nobody can shake more than\n * 8 hands. So answers must be 0..8. The one (p8 say) who answered 8 has shaken everybody's\n * hand except for his or her own, and his or her spouse's. Now consider the person who shook\n * 0 hands (p0 say). The persons p0 and p8 are distinct. If they are not married, then p8 cannot\n * have shaken 8 hands, because he or she did not shake the hand of p0 or of his or her spouse.\n * So p8's spouse to p0. Now imagine Jocelyn asking the question again, with p0 and p8 out of\n * the room, and excluding hand shakes with them. Since p8 shook hands with everyone else\n * except p0 and p8, everyone gives an answer one smaller than they did before, giving 0..6.\n * The argument now applies recursively. So Hilary is left alone, having shaken 4 hands.\n *\n * author: Daniel Jackson, 11/15/01\n */\n\nsig Person {spouse: Person, shaken: set Person}\none sig Jocelyn, Hilary extends Person {}\n\nfact ShakingProtocol {\n // nobody shakes own or spouse's hand\n all p: Person | no (p + p.spouse) & p.shaken\n // if p shakes q, q shakes p\n all p, q: Person | p in q.shaken => q in p.shaken\n }\n\nfact Spouses {\n all p, q: Person | p!=q => {\n // if q is p's spouse, p is q's spouse\n p.spouse = q => q.spouse = p\n // no spouse sharing\n p.spouse != q.spouse\n }\n all p: Person {\n // a person is his or her spouse's spouse\n p.spouse.spouse = p\n // nobody is his or her own spouse\n p != p.spouse\n }\n }\n\npred Puzzle {\n // everyone but Jocelyn has shaken a different number of hands\n all p,q: Person - Jocelyn | p!=q => #p.shaken != #q.shaken\n // Hilary's spouse is Jocelyn\n Hilary.spouse = Jocelyn\n }\n\nrun Puzzle for exactly 1000 Person, 15 int", "permalink": "spoon-battle-nacho-keenly", "time": "2024-07-26 11:01:42.175527", "cmd": 1} {"id": 14098, "parent": 14097, "code": "module examples/puzzles/handshake\n\n/*\n * Alloy model of the Halmos handshake problem\n *\n * Hilary and Jocelyn are married. They invite four couples who are friends for dinner. When\n * they arrive, they shake hands with each other. Nobody shakes hands with him or herself\n * or with his or her spouse. After there has been some handshaking, Jocelyn jumps up on\n * a chair and says \"Stop shaking hands!\", and then asks how many hands each person has\n * shaken. All the answers are different. How many hands has Hilary shaken?\n *\n * The Alloy model represents the problem as a set of constraints. Properties of the spouse\n * relationship and of handshaking in general are given as facts. The particular situation\n * is cast as a function.\n *\n * There are 9 people answering, and all answers are different. Nobody can shake more than\n * 8 hands. So answers must be 0..8. The one (p8 say) who answered 8 has shaken everybody's\n * hand except for his or her own, and his or her spouse's. Now consider the person who shook\n * 0 hands (p0 say). The persons p0 and p8 are distinct. If they are not married, then p8 cannot\n * have shaken 8 hands, because he or she did not shake the hand of p0 or of his or her spouse.\n * So p8's spouse to p0. Now imagine Jocelyn asking the question again, with p0 and p8 out of\n * the room, and excluding hand shakes with them. Since p8 shook hands with everyone else\n * except p0 and p8, everyone gives an answer one smaller than they did before, giving 0..6.\n * The argument now applies recursively. So Hilary is left alone, having shaken 4 hands.\n *\n * author: Daniel Jackson, 11/15/01\n */\n\nsig Person {spouse: Person, shaken: set Person}\none sig Jocelyn, Hilary extends Person {}\n\nfact ShakingProtocol {\n // nobody shakes own or spouse's hand\n all p: Person | no (p + p.spouse) & p.shaken\n // if p shakes q, q shakes p\n all p, q: Person | p in q.shaken => q in p.shaken\n }\n\nfact Spouses {\n all p, q: Person | p!=q => {\n // if q is p's spouse, p is q's spouse\n p.spouse = q => q.spouse = p\n // no spouse sharing\n p.spouse != q.spouse\n }\n all p: Person {\n // a person is his or her spouse's spouse\n p.spouse.spouse = p\n // nobody is his or her own spouse\n p != p.spouse\n }\n }\n\npred Puzzle {\n // everyone but Jocelyn has shaken a different number of hands\n all p,q: Person - Jocelyn | p!=q => #p.shaken != #q.shaken\n // Hilary's spouse is Jocelyn\n Hilary.spouse = Jocelyn\n }\n\nrun Puzzle for exactly 1000 Person, 15 int", "permalink": "awhile-rival-rubbed-vista", "time": "2024-07-26 11:01:51.529450", "cmd": 1} {"id": 14099, "parent": 14097, "code": "module examples/puzzles/handshake\n\n/*\n * Alloy model of the Halmos handshake problem\n *\n * Hilary and Jocelyn are married. They invite four couples who are friends for dinner. When\n * they arrive, they shake hands with each other. Nobody shakes hands with him or herself\n * or with his or her spouse. After there has been some handshaking, Jocelyn jumps up on\n * a chair and says \"Stop shaking hands!\", and then asks how many hands each person has\n * shaken. All the answers are different. How many hands has Hilary shaken?\n *\n * The Alloy model represents the problem as a set of constraints. Properties of the spouse\n * relationship and of handshaking in general are given as facts. The particular situation\n * is cast as a function.\n *\n * There are 9 people answering, and all answers are different. Nobody can shake more than\n * 8 hands. So answers must be 0..8. The one (p8 say) who answered 8 has shaken everybody's\n * hand except for his or her own, and his or her spouse's. Now consider the person who shook\n * 0 hands (p0 say). The persons p0 and p8 are distinct. If they are not married, then p8 cannot\n * have shaken 8 hands, because he or she did not shake the hand of p0 or of his or her spouse.\n * So p8's spouse to p0. Now imagine Jocelyn asking the question again, with p0 and p8 out of\n * the room, and excluding hand shakes with them. Since p8 shook hands with everyone else\n * except p0 and p8, everyone gives an answer one smaller than they did before, giving 0..6.\n * The argument now applies recursively. So Hilary is left alone, having shaken 4 hands.\n *\n * author: Daniel Jackson, 11/15/01\n */\n\nsig Person {spouse: Person, shaken: set Person}\none sig Jocelyn, Hilary extends Person {}\n\nfact ShakingProtocol {\n // nobody shakes own or spouse's hand\n all p: Person | no (p + p.spouse) & p.shaken\n // if p shakes q, q shakes p\n all p, q: Person | p in q.shaken => q in p.shaken\n }\n\nfact Spouses {\n all p, q: Person | p!=q => {\n // if q is p's spouse, p is q's spouse\n p.spouse = q => q.spouse = p\n // no spouse sharing\n p.spouse != q.spouse\n }\n all p: Person {\n // a person is his or her spouse's spouse\n p.spouse.spouse = p\n // nobody is his or her own spouse\n p != p.spouse\n }\n }\n\npred Puzzle {\n // everyone but Jocelyn has shaken a different number of hands\n all p,q: Person - Jocelyn | p!=q => #p.shaken != #q.shaken\n // Hilary's spouse is Jocelyn\n Hilary.spouse = Jocelyn\n }\n\nrun Puzzle for exactly 1000 Person, 15 int", "permalink": "purist-coping-coat-dealer", "time": "2024-07-26 11:02:47.634618", "cmd": 1} {"id": 14100, "parent": 14097, "code": "module examples/puzzles/handshake\n\n/*\n * Alloy model of the Halmos handshake problem\n *\n * Hilary and Jocelyn are married. They invite four couples who are friends for dinner. When\n * they arrive, they shake hands with each other. Nobody shakes hands with him or herself\n * or with his or her spouse. After there has been some handshaking, Jocelyn jumps up on\n * a chair and says \"Stop shaking hands!\", and then asks how many hands each person has\n * shaken. All the answers are different. How many hands has Hilary shaken?\n *\n * The Alloy model represents the problem as a set of constraints. Properties of the spouse\n * relationship and of handshaking in general are given as facts. The particular situation\n * is cast as a function.\n *\n * There are 9 people answering, and all answers are different. Nobody can shake more than\n * 8 hands. So answers must be 0..8. The one (p8 say) who answered 8 has shaken everybody's\n * hand except for his or her own, and his or her spouse's. Now consider the person who shook\n * 0 hands (p0 say). The persons p0 and p8 are distinct. If they are not married, then p8 cannot\n * have shaken 8 hands, because he or she did not shake the hand of p0 or of his or her spouse.\n * So p8's spouse to p0. Now imagine Jocelyn asking the question again, with p0 and p8 out of\n * the room, and excluding hand shakes with them. Since p8 shook hands with everyone else\n * except p0 and p8, everyone gives an answer one smaller than they did before, giving 0..6.\n * The argument now applies recursively. So Hilary is left alone, having shaken 4 hands.\n *\n * author: Daniel Jackson, 11/15/01\n */\n\nsig Person {spouse: Person, shaken: set Person}\none sig Jocelyn, Hilary extends Person {}\n\nfact ShakingProtocol {\n // nobody shakes own or spouse's hand\n all p: Person | no (p + p.spouse) & p.shaken\n // if p shakes q, q shakes p\n all p, q: Person | p in q.shaken => q in p.shaken\n }\n\nfact Spouses {\n all p, q: Person | p!=q => {\n // if q is p's spouse, p is q's spouse\n p.spouse = q => q.spouse = p\n // no spouse sharing\n p.spouse != q.spouse\n }\n all p: Person {\n // a person is his or her spouse's spouse\n p.spouse.spouse = p\n // nobody is his or her own spouse\n p != p.spouse\n }\n }\n\npred Puzzle {\n // everyone but Jocelyn has shaken a different number of hands\n all p,q: Person - Jocelyn | p!=q => #p.shaken != #q.shaken\n // Hilary's spouse is Jocelyn\n Hilary.spouse = Jocelyn\n }\n\nrun Puzzle for exactly 1000 Person, 15 int", "permalink": "shrunk-shore-wind-hurler", "time": "2024-07-26 11:02:55.233121", "cmd": 1} {"id": 14103, "parent": null, "code": "module examples/puzzles/handshake\n\nsig Person {spouse: Person, shaken: set Person}\none sig Jocelyn, Hilary extends Person {}\n\nfact ShakingProtocol {\n // nobody shakes own or spouse's hand\n all p: Person | no (p + p.spouse) & p.shaken\n // if p shakes q, q shakes p\n all p, q: Person | p in q.shaken => q in p.shaken\n }\n\nfact Spouses {\n all p, q: Person | p!=q => {\n // if q is p's spouse, p is q's spouse\n p.spouse = q => q.spouse = p\n // no spouse sharing\n p.spouse != q.spouse\n }\n all p: Person {\n // a person is his or her spouse's spouse\n p.spouse.spouse = p\n // nobody is his or her own spouse\n p != p.spouse\n }\n }\n\npred Puzzle {\n // everyone but Jocelyn has shaken a different number of hands\n all p,q: Person - Jocelyn | p!=q => #p.shaken != #q.shaken\n // Hilary's spouse is Jocelyn\n Hilary.spouse = Jocelyn\n }\n\nrun Puzzle for exactly 1000 Person, 15 int", "permalink": "fancy-babied-wand-chip", "time": "2024-07-26 12:19:35.557213", "cmd": 1} {"id": 14104, "parent": 14103, "code": "module examples/puzzles/handshake\n\nsig Person {spouse: Person, shaken: set Person}\none sig Jocelyn, Hilary extends Person {}\n\nfact ShakingProtocol {\n // nobody shakes own or spouse's hand\n all p: Person | no (p + p.spouse) & p.shaken\n // if p shakes q, q shakes p\n all p, q: Person | p in q.shaken => q in p.shaken\n }\n\nfact Spouses {\n all p, q: Person | p!=q => {\n // if q is p's spouse, p is q's spouse\n p.spouse = q => q.spouse = p\n // no spouse sharing\n p.spouse != q.spouse\n }\n all p: Person {\n // a person is his or her spouse's spouse\n p.spouse.spouse = p\n // nobody is his or her own spouse\n p != p.spouse\n }\n }\n\npred Puzzle {\n // everyone but Jocelyn has shaken a different number of hands\n all p,q: Person - Jocelyn | p!=q => #p.shaken != #q.shaken\n // Hilary's spouse is Jocelyn\n Hilary.spouse = Jocelyn\n }\n\nrun Puzzle for exactly 1000 Person, 15 int", "permalink": "stench-rage-hulk-clause", "time": "2024-07-26 12:19:40.112951", "cmd": 1} {"id": 14105, "parent": 14103, "code": "module examples/puzzles/handshake\n\nsig Person {spouse: Person, shaken: set Person}\none sig Jocelyn, Hilary extends Person {}\n\nfact ShakingProtocol {\n // nobody shakes own or spouse's hand\n all p: Person | no (p + p.spouse) & p.shaken\n // if p shakes q, q shakes p\n all p, q: Person | p in q.shaken => q in p.shaken\n }\n\nfact Spouses {\n all p, q: Person | p!=q => {\n // if q is p's spouse, p is q's spouse\n p.spouse = q => q.spouse = p\n // no spouse sharing\n p.spouse != q.spouse\n }\n all p: Person {\n // a person is his or her spouse's spouse\n p.spouse.spouse = p\n // nobody is his or her own spouse\n p != p.spouse\n }\n }\n\npred Puzzle {\n // everyone but Jocelyn has shaken a different number of hands\n all p,q: Person - Jocelyn | p!=q => #p.shaken != #q.shaken\n // Hilary's spouse is Jocelyn\n Hilary.spouse = Jocelyn\n }\n\nrun Puzzle for exactly 1000 Person, 15 int", "permalink": "aqua-unify-canola-dose", "time": "2024-07-26 12:19:44.921936", "cmd": 1} {"id": 14109, "parent": 14103, "code": "module examples/puzzles/handshake\n\nsig Person {spouse: Person, shaken: set Person}\none sig Jocelyn, Hilary extends Person {}\n\nfact ShakingProtocol {\n // nobody shakes own or spouse's hand\n all p: Person | no (p + p.spouse) & p.shaken\n // if p shakes q, q shakes p\n all p, q: Person | p in q.shaken => q in p.shaken\n }\n\nfact Spouses {\n all p, q: Person | p!=q => {\n // if q is p's spouse, p is q's spouse\n p.spouse = q => q.spouse = p\n // no spouse sharing\n p.spouse != q.spouse\n }\n all p: Person {\n // a person is his or her spouse's spouse\n p.spouse.spouse = p\n // nobody is his or her own spouse\n p != p.spouse\n }\n }\n\npred Puzzle {\n // everyone but Jocelyn has shaken a different number of hands\n all p,q: Person - Jocelyn | p!=q => #p.shaken != #q.shaken\n // Hilary's spouse is Jocelyn\n Hilary.spouse = Jocelyn\n }\n\nrun Puzzle for exactly 1000 Person, 15 int", "permalink": "repave-spout-demote-error", "time": "2024-07-26 12:21:33.910669", "cmd": 1} {"id": 14110, "parent": 14103, "code": "module examples/puzzles/handshake\n\nsig Person {spouse: Person, shaken: set Person}\none sig Jocelyn, Hilary extends Person {}\n\nfact ShakingProtocol {\n // nobody shakes own or spouse's hand\n all p: Person | no (p + p.spouse) & p.shaken\n // if p shakes q, q shakes p\n all p, q: Person | p in q.shaken => q in p.shaken\n }\n\nfact Spouses {\n all p, q: Person | p!=q => {\n // if q is p's spouse, p is q's spouse\n p.spouse = q => q.spouse = p\n // no spouse sharing\n p.spouse != q.spouse\n }\n all p: Person {\n // a person is his or her spouse's spouse\n p.spouse.spouse = p\n // nobody is his or her own spouse\n p != p.spouse\n }\n }\n\npred Puzzle {\n // everyone but Jocelyn has shaken a different number of hands\n all p,q: Person - Jocelyn | p!=q => #p.shaken != #q.shaken\n // Hilary's spouse is Jocelyn\n Hilary.spouse = Jocelyn\n }\n\nrun Puzzle for exactly 1000 Person, 15 int", "permalink": "cargo-aching-grasp-strive", "time": "2024-07-26 12:25:44.355874", "cmd": 1} {"id": 14111, "parent": 14103, "code": "module examples/puzzles/handshake\n\nsig Person {spouse: Person, shaken: set Person}\none sig Jocelyn, Hilary extends Person {}\n\nfact ShakingProtocol {\n // nobody shakes own or spouse's hand\n all p: Person | no (p + p.spouse) & p.shaken\n // if p shakes q, q shakes p\n all p, q: Person | p in q.shaken => q in p.shaken\n }\n\nfact Spouses {\n all p, q: Person | p!=q => {\n // if q is p's spouse, p is q's spouse\n p.spouse = q => q.spouse = p\n // no spouse sharing\n p.spouse != q.spouse\n }\n all p: Person {\n // a person is his or her spouse's spouse\n p.spouse.spouse = p\n // nobody is his or her own spouse\n p != p.spouse\n }\n }\n\npred Puzzle {\n // everyone but Jocelyn has shaken a different number of hands\n all p,q: Person - Jocelyn | p!=q => #p.shaken != #q.shaken\n // Hilary's spouse is Jocelyn\n Hilary.spouse = Jocelyn\n }\n\nrun Puzzle for exactly 1000 Person, 15 int", "permalink": "ethics-zodiac-crimp-sample", "time": "2024-07-26 12:25:49.005309", "cmd": 1} {"id": 14112, "parent": 14103, "code": "module examples/puzzles/handshake\n\nsig Person {spouse: Person, shaken: set Person}\none sig Jocelyn, Hilary extends Person {}\n\nfact ShakingProtocol {\n // nobody shakes own or spouse's hand\n all p: Person | no (p + p.spouse) & p.shaken\n // if p shakes q, q shakes p\n all p, q: Person | p in q.shaken => q in p.shaken\n }\n\nfact Spouses {\n all p, q: Person | p!=q => {\n // if q is p's spouse, p is q's spouse\n p.spouse = q => q.spouse = p\n // no spouse sharing\n p.spouse != q.spouse\n }\n all p: Person {\n // a person is his or her spouse's spouse\n p.spouse.spouse = p\n // nobody is his or her own spouse\n p != p.spouse\n }\n }\n\npred Puzzle {\n // everyone but Jocelyn has shaken a different number of hands\n all p,q: Person - Jocelyn | p!=q => #p.shaken != #q.shaken\n // Hilary's spouse is Jocelyn\n Hilary.spouse = Jocelyn\n }\n\nrun Puzzle for exactly 1000 Person, 15 int", "permalink": "cover-slug-likely-trance", "time": "2024-07-26 12:25:50.495384", "cmd": 1} {"id": 14113, "parent": 14103, "code": "module examples/puzzles/handshake\n\nsig Person {spouse: Person, shaken: set Person}\none sig Jocelyn, Hilary extends Person {}\n\nfact ShakingProtocol {\n // nobody shakes own or spouse's hand\n all p: Person | no (p + p.spouse) & p.shaken\n // if p shakes q, q shakes p\n all p, q: Person | p in q.shaken => q in p.shaken\n }\n\nfact Spouses {\n all p, q: Person | p!=q => {\n // if q is p's spouse, p is q's spouse\n p.spouse = q => q.spouse = p\n // no spouse sharing\n p.spouse != q.spouse\n }\n all p: Person {\n // a person is his or her spouse's spouse\n p.spouse.spouse = p\n // nobody is his or her own spouse\n p != p.spouse\n }\n }\n\npred Puzzle {\n // everyone but Jocelyn has shaken a different number of hands\n all p,q: Person - Jocelyn | p!=q => #p.shaken != #q.shaken\n // Hilary's spouse is Jocelyn\n Hilary.spouse = Jocelyn\n }\n\nrun Puzzle for exactly 1000 Person, 15 int", "permalink": "spiral-snitch-harsh-rebel", "time": "2024-07-26 12:25:54.057363", "cmd": 1} {"id": 14114, "parent": 14103, "code": "module examples/puzzles/handshake\n\nsig Person {spouse: Person, shaken: set Person}\none sig Jocelyn, Hilary extends Person {}\n\nfact ShakingProtocol {\n // nobody shakes own or spouse's hand\n all p: Person | no (p + p.spouse) & p.shaken\n // if p shakes q, q shakes p\n all p, q: Person | p in q.shaken => q in p.shaken\n }\n\nfact Spouses {\n all p, q: Person | p!=q => {\n // if q is p's spouse, p is q's spouse\n p.spouse = q => q.spouse = p\n // no spouse sharing\n p.spouse != q.spouse\n }\n all p: Person {\n // a person is his or her spouse's spouse\n p.spouse.spouse = p\n // nobody is his or her own spouse\n p != p.spouse\n }\n }\n\npred Puzzle {\n // everyone but Jocelyn has shaken a different number of hands\n all p,q: Person - Jocelyn | p!=q => #p.shaken != #q.shaken\n // Hilary's spouse is Jocelyn\n Hilary.spouse = Jocelyn\n }\n\nrun Puzzle for exactly 1000 Person, 15 int", "permalink": "diving-robe-relive-arson", "time": "2024-07-26 12:25:57.601165", "cmd": 1} {"id": 14115, "parent": 14103, "code": "module examples/puzzles/handshake\n\nsig Person {spouse: Person, shaken: set Person}\none sig Jocelyn, Hilary extends Person {}\n\nfact ShakingProtocol {\n // nobody shakes own or spouse's hand\n all p: Person | no (p + p.spouse) & p.shaken\n // if p shakes q, q shakes p\n all p, q: Person | p in q.shaken => q in p.shaken\n }\n\nfact Spouses {\n all p, q: Person | p!=q => {\n // if q is p's spouse, p is q's spouse\n p.spouse = q => q.spouse = p\n // no spouse sharing\n p.spouse != q.spouse\n }\n all p: Person {\n // a person is his or her spouse's spouse\n p.spouse.spouse = p\n // nobody is his or her own spouse\n p != p.spouse\n }\n }\n\npred Puzzle {\n // everyone but Jocelyn has shaken a different number of hands\n all p,q: Person - Jocelyn | p!=q => #p.shaken != #q.shaken\n // Hilary's spouse is Jocelyn\n Hilary.spouse = Jocelyn\n }\n\nrun Puzzle for exactly 1000 Person, 15 int", "permalink": "squeak-hula-guts-open", "time": "2024-07-26 12:26:01.102605", "cmd": 1} {"id": 14116, "parent": 14103, "code": "module examples/puzzles/handshake\n\nsig Person {spouse: Person, shaken: set Person}\none sig Jocelyn, Hilary extends Person {}\n\nfact ShakingProtocol {\n // nobody shakes own or spouse's hand\n all p: Person | no (p + p.spouse) & p.shaken\n // if p shakes q, q shakes p\n all p, q: Person | p in q.shaken => q in p.shaken\n }\n\nfact Spouses {\n all p, q: Person | p!=q => {\n // if q is p's spouse, p is q's spouse\n p.spouse = q => q.spouse = p\n // no spouse sharing\n p.spouse != q.spouse\n }\n all p: Person {\n // a person is his or her spouse's spouse\n p.spouse.spouse = p\n // nobody is his or her own spouse\n p != p.spouse\n }\n }\n\npred Puzzle {\n // everyone but Jocelyn has shaken a different number of hands\n all p,q: Person - Jocelyn | p!=q => #p.shaken != #q.shaken\n // Hilary's spouse is Jocelyn\n Hilary.spouse = Jocelyn\n }\n\nrun Puzzle for exactly 1000 Person, 15 int", "permalink": "hunger-pushy-trio-brunch", "time": "2024-07-26 12:26:05.216756", "cmd": 1} {"id": 14242, "parent": null, "code": "sig A{}\nrun {}", "permalink": "tackle-scale-granny-feeble", "time": "2024-08-08 06:53:07.808301", "cmd": 1} {"id": 14244, "parent": null, "code": "sig A{}", "permalink": "borax-sprang-yam-boney", "time": "2024-08-08 10:09:51.890701", "cmd": 1} {"id": 14245, "parent": null, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\nrun {}", "permalink": "imply-quiver-remark-ovary", "time": "2024-08-08 11:58:06.983619", "cmd": 1} {"id": 14246, "parent": 14245, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\nrun {}", "permalink": "gusty-tackle-woozy-common", "time": "2024-08-08 11:58:21.904933", "cmd": 1} {"id": 14247, "parent": 14246, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\nrun {}", "permalink": "remake-rover-cacti-jailer", "time": "2024-08-08 11:58:23.763573", "cmd": 1} {"id": 14257, "parent": null, "code": "one sig Queue { var head : lone Node }\nvar sig Node { var link : lone Node }\nfact WellFormed {\n always all n : Node | n !in n.^link\n always all n : Node | n in Queue.head.*link\n}\n\npred dequeue {\n head' = head.link\n all n : Queue.head.^link | n.link = n.link'\n}\nrun dequeue for 3", "permalink": "smock-stole-tattle-deface", "time": "2024-08-12 19:32:33.196313", "cmd": 1} {"id": 14258, "parent": 14257, "code": "one sig Queue { var head : lone Node }\nvar sig Node { var link : lone Node }\nfact WellFormed {\n always all n : Node | n !in n.^link\n always all n : Node | n in Queue.head.*link\n}\n\npred dequeue {\n head' = head.link\n all n : Queue.head.^link | n.link = n.link'\n}\nrun {always dequeue} for 3", "permalink": "wanted-very-sedan-gray", "time": "2024-08-12 19:34:01.995158", "cmd": 1} {"id": 14259, "parent": 14258, "code": "one sig Queue { var head : lone Node }\nvar sig Node { var link : lone Node }\nfact WellFormed {\n always all n : Node | n !in n.^link\n always all n : Node | n in Queue.head.*link\n}\n\npred dequeue {\n head' = head.link\n all n : Queue.head.^link | n.link = n.link'\n}\nrun {always dequeue} for 3", "permalink": "bronze-headed-oat-clinic", "time": "2024-08-12 19:34:38.325799", "cmd": 1} {"id": 14260, "parent": 14259, "code": "one sig Queue { var head : lone Node }\nvar sig Node { var link : lone Node }\nfact WellFormed {\n always all n : Node | n !in n.^link\n always all n : Node | n in Queue.head.*link\n}\n\npred dequeue {\n head' = head.link\n all n : Queue.head.^link | n.link = n.link'\n}\nrun {always dequeue} for 1", "permalink": "bless-family-moaner-yahoo", "time": "2024-08-12 19:35:00.179789", "cmd": 1} {"id": 14261, "parent": 14260, "code": "one sig Queue { var head : lone Node }\nvar sig Node { var link : lone Node }\nfact WellFormed {\n always all n : Node | n !in n.^link\n always all n : Node | n in Queue.head.*link\n}\n\npred dequeue {\n head' = head.link\n all n : Queue.head.^link | n.link = n.link'\n}\nrun {always dequeue} for 1", "permalink": "maker-sliver-arena-grab", "time": "2024-08-12 19:35:02.602532", "cmd": 1} {"id": 14262, "parent": 14261, "code": "one sig Queue { var head : lone Node }\nvar sig Node { var link : lone Node }\nfact WellFormed {\n always all n : Node | n !in n.^link\n always all n : Node | n in Queue.head.*link\n}\n\npred dequeue {\n head' = head.link\n all n : Queue.head.^link | n.link = n.link'\n}\nrun {always dequeue} for 1", "permalink": "fervor-cried-whoops-spotty", "time": "2024-08-12 19:35:11.222656", "cmd": 1} {"id": 14263, "parent": null, "code": "sig A {}\n\nrun {} for 2", "permalink": "waving-marrow-clamp-payday", "time": "2024-08-12 19:35:51.332669", "cmd": 1} {"id": 14264, "parent": 14263, "code": "sig A {}\n\nrun {} for 2", "permalink": "follow-lumber-lunar-colt", "time": "2024-08-12 19:38:15.242027", "cmd": 1} {"id": 14284, "parent": 14262, "code": "one sig Queue { var head : lone Node }\nvar sig Node { var link : lone Node }\nfact WellFormed {\n always all n : Node | n !in n.^link\n always all n : Node | n in Queue.head.*link\n}\n\npred dequeue {\n head' = head.link\n all n : Queue.head.^link | n.link = n.link'\n}\nrun {always dequeue} for 1", "permalink": "deluge-uptake-resume-edgy", "time": "2024-08-15 06:49:49.847479", "cmd": 1} {"id": 14285, "parent": 14262, "code": "one sig Queue { var head : lone Node }\nvar sig Node { var link : lone Node }\nfact WellFormed {\n always all n : Node | n !in n.^link\n always all n : Node | n in Queue.head.*link\n}\n\npred dequeue {\n head' = head.link\n all n : Queue.head.^link | n.link = n.link'\n}\nrun {always dequeue} for 1", "permalink": "sweep-flinch-thud-petri", "time": "2024-08-15 08:21:37.356161", "cmd": 1} {"id": 14286, "parent": 14262, "code": "one sig Queue { var head : lone Node }\nvar sig Node { var link : lone Node }\nfact WellFormed {\n always all n : Node | n !in n.^link\n always all n : Node | n in Queue.head.*link\n}\n\npred dequeue {\n head' = head.link\n all n : Queue.head.^link | n.link = n.link'\n}\nrun {always dequeue} for 1", "permalink": "jinx-untidy-proven-bust", "time": "2024-08-15 09:24:18.815841", "cmd": 1} {"id": 14287, "parent": 14286, "code": "one sig Queue { var head : lone Node }\nvar sig Node { var link : lone Node }\nfact WellFormed {\n always all n : Node | n !in n.^link\n always all n : Node | n in Queue.head.*link\n}\n\npred dequeue {\n head' = head.link\n all n : Queue.head.^link | n.link = n.link'\n}\nrun {always dequeue} for 1", "permalink": "mop-awoke-popper-wheat", "time": "2024-08-15 09:24:43.007382", "cmd": 1} {"id": 14288, "parent": 14287, "code": "one sig Queue { var head : lone Node }\nvar sig Node { var link : lone Node }\nfact WellFormed {\n always all n : Node | n !in n.^link\n always all n : Node | n in Queue.head.*link\n}\n\npred dequeue {\n head' = head.link\n all n : Queue.head.^link | n.link = n.link'\n}\nrun {always dequeue} for 1", "permalink": "update-crowd-hybrid-yin", "time": "2024-08-15 09:25:41.678763", "cmd": 1} {"id": 14289, "parent": 14288, "code": "one sig Queue { var head : lone Node }\nvar sig Node { var link : lone Node }\nfact WellFormed {\n always all n : Node | n !in n.^link\n always all n : Node | n in Queue.head.*link\n}\n\npred dequeue {\n head' = head.link\n all n : Queue.head.^link | n.link = n.link'\n}\nrun {always dequeue} for 1", "permalink": "myth-flatly-greedy-gone", "time": "2024-08-15 09:25:50.806748", "cmd": 1} {"id": 14290, "parent": 14289, "code": "one sig Queue { var head : lone Node }\nvar sig Node { var link : lone Node }\nfact WellFormed {\n always all n : Node | n !in n.^link\n always all n : Node | n in Queue.head.*link\n}\n\npred dequeue {\n head' = head.link\n all n : Queue.head.^link | n.link = n.link'\n}\nrun {always dequeue} for 1", "permalink": "omega-girdle-comfy-blank", "time": "2024-08-15 09:25:54.236392", "cmd": 1} {"id": 14291, "parent": 14290, "code": "one sig Queue { var head : lone Node }\nvar sig Node { var link : lone Node }\nfact WellFormed {\n always all n : Node | n !in n.^link\n always all n : Node | n in Queue.head.*link\n}\n\npred dequeue {\n head' = head.link\n all n : Queue.head.^link | n.link = n.link'\n}\nrun {always dequeue} for 1", "permalink": "fetal-boring-primer-dollop", "time": "2024-08-15 09:28:29.192070", "cmd": 1} {"id": 14292, "parent": 14291, "code": "one sig Queue { var head : lone Node }\nvar sig Node { var link : lone Node }\nfact WellFormed {\n always all n : Node | n !in n.^link\n always all n : Node | n in Queue.head.*link\n}\n\npred dequeue {\n head' = head.link\n all n : Queue.head.^link | n.link = n.link'\n}\nrun {always dequeue} for 1", "permalink": "shell-filler-say-sank", "time": "2024-08-15 09:28:42.724308", "cmd": 1} {"id": 14293, "parent": null, "code": "module examples/tutorial/farmerTemporal\n\n/*\n * The classic river crossing puzzle. A farmer is carrying a fox, a\n * chicken, and a sack of grain. He must cross a river using a boat\n * that can only hold the farmer and at most one other thing. If the\n * farmer leaves the fox alone with the chicken, the fox will eat the\n * chicken; and if he leaves the chicken alone with the grain, the\n * chicken will eat the grain. How can the farmer bring everything\n * to the far side of the river intact?\n *\n * authors: Greg Dennis, Rob Seater\n *\n * Acknowledgements to Derek Rayside and his students for finding and\n * fixing a bug in the \"crossRiver\" predicate.\n */\n\n/**\n * The farmer and all his possessions will be represented as Objects.\n * Some objects eat other objects when the Farmer's not around.\n */\nabstract sig Object { eats: set Object }\none sig Farmer, Fox, Chicken, Grain extends Object {}\n\n/**\n * Define what eats what when the Farmer' not around.\n * Fox eats the chicken and the chicken eats the grain.\n */\nfact eating { eats = Fox->Chicken + Chicken->Grain }\n\n/**\n * The near and far relations contain the objects held on each\n * side of the river in a given state, respectively.\n */\nvar sig Near in Object {}\nvar sig Far in Object {}\n\n/**\n * In the initial state, all objects are on the near side.\n */\nfact initialState {\n Near = Object && no Far\n}\n\n/**\n * Constrains at most one item to move from 'from' to 'to'.\n * Also constrains which objects get eaten.\n */\npred crossRiver [from, to: set Object] {\n // either the Farmer takes no items\n (from' = from - Farmer - from'.eats and\n to' = to + Farmer) or\n // or the Farmer takes one item\n (one x : from - Farmer | {\n from' = from - Farmer - x - from'.eats\n to' = to + Farmer + x })\n}\n\n/**\n * crossRiver transitions between states\n */\nfact stateTransition {\n always (\n Farmer in Near =>\n crossRiver[Near, Far] else\n crossRiver[Far, Near]\n )\n}\n\n/**\n * the farmer moves everything to the far side of the river.\n */\npred solvePuzzle {\n eventually Far = Object\n}\n\nrun solvePuzzle for 8 steps expect 1\n\n/**\n * no Object can be in two places at once\n * this is implied by both definitions of crossRiver \n */\nassert NoQuantumObjects {\n always no x : Object | x in Near and x in Far\n}\n\ncheck NoQuantumObjects for 8 steps expect 0", "permalink": "flip-ashes-snide-joyous", "time": "2024-08-16 08:18:45.187066", "cmd": 1} {"id": 14321, "parent": 14293, "code": "module examples/tutorial/farmerTemporal\n\n/*\n * The classic river crossing puzzle. A farmer is carrying a fox, a\n * chicken, and a sack of grain. He must cross a river using a boat\n * that can only hold the farmer and at most one other thing. If the\n * farmer leaves the fox alone with the chicken, the fox will eat the\n * chicken; and if he leaves the chicken alone with the grain, the\n * chicken will eat the grain. How can the farmer bring everything\n * to the far side of the river intact?\n *\n * authors: Greg Dennis, Rob Seater\n *\n * Acknowledgements to Derek Rayside and his students for finding and\n * fixing a bug in the \"crossRiver\" predicate.\n */\n\n/**\n * The farmer and all his possessions will be represented as Objects.\n * Some objects eat other objects when the Farmer's not around.\n */\nabstract sig Object { eats: set Object }\none sig Farmer, Fox, Chicken, Grain extends Object {}\n\n/**\n * Define what eats what when the Farmer' not around.\n * Fox eats the chicken and the chicken eats the grain.\n */\nfact eating { eats = Fox->Chicken + Chicken->Grain }\n\n/**\n * The near and far relations contain the objects held on each\n * side of the river in a given state, respectively.\n */\nvar sig Near in Object {}\nvar sig Far in Object {}\n\n/**\n * In the initial state, all objects are on the near side.\n */\nfact initialState {\n Near = Object && no Far\n}\n\n/**\n * Constrains at most one item to move from 'from' to 'to'.\n * Also constrains which objects get eaten.\n */\npred crossRiver [from, to: set Object] {\n // either the Farmer takes no items\n (from' = from - Farmer - from'.eats and\n to' = to + Farmer) or\n // or the Farmer takes one item\n (one x : from - Farmer | {\n from' = from - Farmer - x - from'.eats\n to' = to + Farmer + x })\n}\n\n/**\n * crossRiver transitions between states\n */\nfact stateTransition {\n always (\n Farmer in Near =>\n crossRiver[Near, Far] else\n crossRiver[Far, Near]\n )\n}\n\n/**\n * the farmer moves everything to the far side of the river.\n */\npred solvePuzzle {\n eventually Far = Object\n}\n\nrun solvePuzzle for 8 steps expect 1\n\n/**\n * no Object can be in two places at once\n * this is implied by both definitions of crossRiver \n */\nassert NoQuantumObjects {\n always no x : Object | x in Near and x in Far\n}\n\ncheck NoQuantumObjects for 8 steps expect 0", "permalink": "singer-sliver-colt-name", "time": "2024-08-17 18:10:47.348235", "cmd": 1} {"id": 14327, "parent": 14293, "code": "module examples/tutorial/farmerTemporal\n\n/*\n * The classic river crossing puzzle. A farmer is carrying a fox, a\n * chicken, and a sack of grain. He must cross a river using a boat\n * that can only hold the farmer and at most one other thing. If the\n * farmer leaves the fox alone with the chicken, the fox will eat the\n * chicken; and if he leaves the chicken alone with the grain, the\n * chicken will eat the grain. How can the farmer bring everything\n * to the far side of the river intact?\n *\n * authors: Greg Dennis, Rob Seater\n *\n * Acknowledgements to Derek Rayside and his students for finding and\n * fixing a bug in the \"crossRiver\" predicate.\n */\n\n/**\n * The farmer and all his possessions will be represented as Objects.\n * Some objects eat other objects when the Farmer's not around.\n */\nabstract sig Object { eats: set Object }\none sig Farmer, Fox, Chicken, Grain extends Object {}\n\n/**\n * Define what eats what when the Farmer' not around.\n * Fox eats the chicken and the chicken eats the grain.\n */\nfact eating { eats = Fox->Chicken + Chicken->Grain }\n\n/**\n * The near and far relations contain the objects held on each\n * side of the river in a given state, respectively.\n */\nvar sig Near in Object {}\nvar sig Far in Object {}\n\n/**\n * In the initial state, all objects are on the near side.\n */\nfact initialState {\n Near = Object && no Far\n}\n\n/**\n * Constrains at most one item to move from 'from' to 'to'.\n * Also constrains which objects get eaten.\n */\npred crossRiver [from, to: set Object] {\n // either the Farmer takes no items\n (from' = from - Farmer - from'.eats and\n to' = to + Farmer) or\n // or the Farmer takes one item\n (one x : from - Farmer | {\n from' = from - Farmer - x - from'.eats\n to' = to + Farmer + x })\n}\n\n/**\n * crossRiver transitions between states\n */\nfact stateTransition {\n always (\n Farmer in Near =>\n crossRiver[Near, Far] else\n crossRiver[Far, Near]\n )\n}\n\n/**\n * the farmer moves everything to the far side of the river.\n */\npred solvePuzzle {\n eventually Far = Object\n}\n\nrun solvePuzzle for 8 steps expect 1\n\n/**\n * no Object can be in two places at once\n * this is implied by both definitions of crossRiver \n */\nassert NoQuantumObjects {\n always no x : Object | x in Near and x in Far\n}\n\ncheck NoQuantumObjects for 8 steps expect 0", "permalink": "lazy-iguana-cussed-badge", "time": "2024-08-17 21:13:05.189439", "cmd": 1} {"id": 14328, "parent": 14293, "code": "module examples/tutorial/farmerTemporal\n\n/*\n * The classic river crossing puzzle. A farmer is carrying a fox, a\n * chicken, and a sack of grain. He must cross a river using a boat\n * that can only hold the farmer and at most one other thing. If the\n * farmer leaves the fox alone with the chicken, the fox will eat the\n * chicken; and if he leaves the chicken alone with the grain, the\n * chicken will eat the grain. How can the farmer bring everything\n * to the far side of the river intact?\n *\n * authors: Greg Dennis, Rob Seater\n *\n * Acknowledgements to Derek Rayside and his students for finding and\n * fixing a bug in the \"crossRiver\" predicate.\n */\n\n/**\n * The farmer and all his possessions will be represented as Objects.\n * Some objects eat other objects when the Farmer's not around.\n */\nabstract sig Object { eats: set Object }\none sig Farmer, Fox, Chicken, Grain extends Object {}\n\n/**\n * Define what eats what when the Farmer' not around.\n * Fox eats the chicken and the chicken eats the grain.\n */\nfact eating { eats = Fox->Chicken + Chicken->Grain }\n\n/**\n * The near and far relations contain the objects held on each\n * side of the river in a given state, respectively.\n */\nvar sig Near in Object {}\nvar sig Far in Object {}\n\n/**\n * In the initial state, all objects are on the near side.\n */\nfact initialState {\n Near = Object && no Far\n}\n\n/**\n * Constrains at most one item to move from 'from' to 'to'.\n * Also constrains which objects get eaten.\n */\npred crossRiver [from, to: set Object] {\n // either the Farmer takes no items\n (from' = from - Farmer - from'.eats and\n to' = to + Farmer) or\n // or the Farmer takes one item\n (one x : from - Farmer | {\n from' = from - Farmer - x - from'.eats\n to' = to + Farmer + x })\n}\n\n/**\n * crossRiver transitions between states\n */\nfact stateTransition {\n always (\n Farmer in Near =>\n crossRiver[Near, Far] else\n crossRiver[Far, Near]\n )\n}\n\n/**\n * the farmer moves everything to the far side of the river.\n */\npred solvePuzzle {\n eventually Far = Object\n}\n\nrun solvePuzzle for 8 steps expect 1\n\n/**\n * no Object can be in two places at once\n * this is implied by both definitions of crossRiver \n */\nassert NoQuantumObjects {\n always no x : Object | x in Near and x in Far\n}\n\ncheck NoQuantumObjects for 8 steps expect 0", "permalink": "path-flop-going-feel", "time": "2024-08-18 08:06:25.953911", "cmd": 1} {"id": 14329, "parent": null, "code": "sig A {}\n\nsig B in A {}", "permalink": "sprig-mooing-wreath-video", "time": "2024-08-19 08:12:39.589268", "cmd": 1} {"id": 14330, "parent": 14329, "code": "sig A {}\n\nsig B in A {}", "permalink": "iguana-train-visor-ramble", "time": "2024-08-19 08:12:57.334410", "cmd": 1} {"id": 14331, "parent": 14330, "code": "sig A {}\n\nsig B in A {}\n\nrun {}", "permalink": "fox-easel-cried-sheath", "time": "2024-08-19 08:13:20.597172", "cmd": 1} {"id": 14332, "parent": 14331, "code": "sig A {}\n\nsig B in A {}\n\nrun {}", "permalink": "mutt-stays-groggy-thrift", "time": "2024-08-19 08:13:28.859164", "cmd": 1} {"id": 14333, "parent": 14332, "code": "sig A {}\n\nsig B in A {}\n\nrun {}", "permalink": "eraser-slinky-hate-policy", "time": "2024-08-19 08:13:47.598558", "cmd": 1} {"id": 14334, "parent": 14293, "code": "module examples/tutorial/farmerTemporal\n\n/*\n * The classic river crossing puzzle. A farmer is carrying a fox, a\n * chicken, and a sack of grain. He must cross a river using a boat\n * that can only hold the farmer and at most one other thing. If the\n * farmer leaves the fox alone with the chicken, the fox will eat the\n * chicken; and if he leaves the chicken alone with the grain, the\n * chicken will eat the grain. How can the farmer bring everything\n * to the far side of the river intact?\n *\n * authors: Greg Dennis, Rob Seater\n *\n * Acknowledgements to Derek Rayside and his students for finding and\n * fixing a bug in the \"crossRiver\" predicate.\n */\n\n/**\n * The farmer and all his possessions will be represented as Objects.\n * Some objects eat other objects when the Farmer's not around.\n */\nabstract sig Object { eats: set Object }\none sig Farmer, Fox, Chicken, Grain extends Object {}\n\n/**\n * Define what eats what when the Farmer' not around.\n * Fox eats the chicken and the chicken eats the grain.\n */\nfact eating { eats = Fox->Chicken + Chicken->Grain }\n\n/**\n * The near and far relations contain the objects held on each\n * side of the river in a given state, respectively.\n */\nvar sig Near in Object {}\nvar sig Far in Object {}\n\n/**\n * In the initial state, all objects are on the near side.\n */\nfact initialState {\n Near = Object && no Far\n}\n\n/**\n * Constrains at most one item to move from 'from' to 'to'.\n * Also constrains which objects get eaten.\n */\npred crossRiver [from, to: set Object] {\n // either the Farmer takes no items\n (from' = from - Farmer - from'.eats and\n to' = to + Farmer) or\n // or the Farmer takes one item\n (one x : from - Farmer | {\n from' = from - Farmer - x - from'.eats\n to' = to + Farmer + x })\n}\n\n/**\n * crossRiver transitions between states\n */\nfact stateTransition {\n always (\n Farmer in Near =>\n crossRiver[Near, Far] else\n crossRiver[Far, Near]\n )\n}\n\n/**\n * the farmer moves everything to the far side of the river.\n */\npred solvePuzzle {\n eventually Far = Object\n}\n\nrun solvePuzzle for 8 steps expect 1\n\n/**\n * no Object can be in two places at once\n * this is implied by both definitions of crossRiver \n */\nassert NoQuantumObjects {\n always no x : Object | x in Near and x in Far\n}\n\ncheck NoQuantumObjects for 8 steps expect 0", "permalink": "shifty-tingle-stable-nape", "time": "2024-08-19 08:14:50.756622", "cmd": 1} {"id": 14335, "parent": 14333, "code": "sig A {}\n\nsig B in A {}\n\nrun {}", "permalink": "errant-choice-croon-humvee", "time": "2024-08-19 08:15:06.067645", "cmd": 1} {"id": 14336, "parent": 14335, "code": "sig A {}\n\nsig B in A {}\n\nrun {}", "permalink": "front-clause-pretty-drier", "time": "2024-08-19 08:15:11.151809", "cmd": 1} {"id": 14337, "parent": 14336, "code": "sig A {}\n\nsig B in A {}", "permalink": "lent-feed-grid-dock", "time": "2024-08-19 08:15:34.576086", "cmd": 1} {"id": 14338, "parent": 14337, "code": "sig Person {}\n\nsig Student in Person {}", "permalink": "prissy-stylus-uneasy-mushy", "time": "2024-08-19 08:17:10.258545", "cmd": 1} {"id": 14339, "parent": 14338, "code": "sig Student in Int {}", "permalink": "train-cancel-juror-gag", "time": "2024-08-19 08:25:49.884828", "cmd": 1} {"id": 14340, "parent": null, "code": "module examples/tutorial/farmerTemporal\n\n/*\n * The classic river crossing puzzle. A farmer is carrying a fox, a\n * chicken, and a sack of grain. He must cross a river using a boat\n * that can only hold the farmer and at most one other thing. If the\n * farmer leaves the fox alone with the chicken, the fox will eat the\n * chicken; and if he leaves the chicken alone with the grain, the\n * chicken will eat the grain. How can the farmer bring everything\n * to the far side of the river intact?\n *\n * authors: Greg Dennis, Rob Seater\n *\n * Acknowledgements to Derek Rayside and his students for finding and\n * fixing a bug in the \"crossRiver\" predicate.\n */\n\n/**\n * The farmer and all his possessions will be represented as Objects.\n * Some objects eat other objects when the Farmer's not around.\n */\nabstract sig Object { eats: set Object }\none sig Farmer, Fox, Chicken, Grain extends Object {}\n\n/**\n * Define what eats what when the Farmer' not around.\n * Fox eats the chicken and the chicken eats the grain.\n */\nfact eating { eats = Fox->Chicken + Chicken->Grain }\n\n/**\n * The near and far relations contain the objects held on each\n * side of the river in a given state, respectively.\n */\nvar sig Near in Object {}\nvar sig Far in Object {}\n\n/**\n * In the initial state, all objects are on the near side.\n */\nfact initialState {\n Near = Object && no Far\n}\n\n/**\n * Constrains at most one item to move from 'from' to 'to'.\n * Also constrains which objects get eaten.\n */\npred crossRiver [from, to: set Object] {\n // either the Farmer takes no items\n (from' = from - Farmer - from'.eats and\n to' = to + Farmer) or\n // or the Farmer takes one item\n (one x : from - Farmer | {\n from' = from - Farmer - x - from'.eats\n to' = to + Farmer + x })\n}\n\n/**\n * crossRiver transitions between states\n */\nfact stateTransition {\n always (\n Farmer in Near =>\n crossRiver[Near, Far] else\n crossRiver[Far, Near]\n )\n}\n\n/**\n * the farmer moves everything to the far side of the river.\n */\npred solvePuzzle {\n eventually Far = Object\n}\n\nrun solvePuzzle for 8 steps expect 1\n\n/**\n * no Object can be in two places at once\n * this is implied by both definitions of crossRiver \n */\nassert NoQuantumObjects {\n always no x : Object | x in Near and x in Far\n}\n\ncheck NoQuantumObjects for 8 steps expect 0", "permalink": "glitzy-wildly-blurry-granny", "time": "2024-08-19 09:58:38.723808", "cmd": 1} {"id": 14342, "parent": 14293, "code": "module examples/tutorial/farmerTemporal\n\n/*\n * The classic river crossing puzzle. A farmer is carrying a fox, a\n * chicken, and a sack of grain. He must cross a river using a boat\n * that can only hold the farmer and at most one other thing. If the\n * farmer leaves the fox alone with the chicken, the fox will eat the\n * chicken; and if he leaves the chicken alone with the grain, the\n * chicken will eat the grain. How can the farmer bring everything\n * to the far side of the river intact?\n *\n * authors: Greg Dennis, Rob Seater\n *\n * Acknowledgements to Derek Rayside and his students for finding and\n * fixing a bug in the \"crossRiver\" predicate.\n */\n\n/**\n * The farmer and all his possessions will be represented as Objects.\n * Some objects eat other objects when the Farmer's not around.\n */\nabstract sig Object { eats: set Object }\none sig Farmer, Fox, Chicken, Grain extends Object {}\n\n/**\n * Define what eats what when the Farmer' not around.\n * Fox eats the chicken and the chicken eats the grain.\n */\nfact eating { eats = Fox->Chicken + Chicken->Grain }\n\n/**\n * The near and far relations contain the objects held on each\n * side of the river in a given state, respectively.\n */\nvar sig Near in Object {}\nvar sig Far in Object {}\n\n/**\n * In the initial state, all objects are on the near side.\n */\nfact initialState {\n Near = Object && no Far\n}\n\n/**\n * Constrains at most one item to move from 'from' to 'to'.\n * Also constrains which objects get eaten.\n */\npred crossRiver [from, to: set Object] {\n // either the Farmer takes no items\n (from' = from - Farmer - from'.eats and\n to' = to + Farmer) or\n // or the Farmer takes one item\n (one x : from - Farmer | {\n from' = from - Farmer - x - from'.eats\n to' = to + Farmer + x })\n}\n\n/**\n * crossRiver transitions between states\n */\nfact stateTransition {\n always (\n Farmer in Near =>\n crossRiver[Near, Far] else\n crossRiver[Far, Near]\n )\n}\n\n/**\n * the farmer moves everything to the far side of the river.\n */\npred solvePuzzle {\n eventually Far = Object\n}\n\nrun solvePuzzle for 8 steps expect 1\n\n/**\n * no Object can be in two places at once\n * this is implied by both definitions of crossRiver \n */\nassert NoQuantumObjects {\n always no x : Object | x in Near and x in Far\n}\n\ncheck NoQuantumObjects for 8 steps expect 0", "permalink": "ground-babble-oval-enroll", "time": "2024-08-19 10:10:56.400994", "cmd": 1} {"id": 14343, "parent": null, "code": "module examples/tutorial/farmerTemporal\n\n/*\n * The classic river crossing puzzle. A farmer is carrying a fox, a\n * chicken, and a sack of grain. He must cross a river using a boat\n * that can only hold the farmer and at most one other thing. If the\n * farmer leaves the fox alone with the chicken, the fox will eat the\n * chicken; and if he leaves the chicken alone with the grain, the\n * chicken will eat the grain. How can the farmer bring everything\n * to the far side of the river intact?\n *\n * authors: Greg Dennis, Rob Seater\n *\n * Acknowledgements to Derek Rayside and his students for finding and\n * fixing a bug in the \"crossRiver\" predicate.\n */\n\n/**\n * The farmer and all his possessions will be represented as Objects.\n * Some objects eat other objects when the Farmer's not around.\n */\nabstract sig Object { eats: set Object }\none sig Farmer, Fox, Chicken, Grain extends Object {}\n\n/**\n * Define what eats what when the Farmer' not around.\n * Fox eats the chicken and the chicken eats the grain.\n */\nfact eating { eats = Fox->Chicken + Chicken->Grain }\n\n/**\n * The near and far relations contain the objects held on each\n * side of the river in a given state, respectively.\n */\nvar sig Near in Object {}\nvar sig Far in Object {}\n\n/**\n * In the initial state, all objects are on the near side.\n */\nfact initialState {\n Near = Object && no Far\n}\n\n/**\n * Constrains at most one item to move from 'from' to 'to'.\n * Also constrains which objects get eaten.\n */\npred crossRiver [from, to: set Object] {\n // either the Farmer takes no items\n (from' = from - Farmer - from'.eats and\n to' = to + Farmer) or\n // or the Farmer takes one item\n (one x : from - Farmer | {\n from' = from - Farmer - x - from'.eats\n to' = to + Farmer + x })\n}\n\n/**\n * crossRiver transitions between states\n */\nfact stateTransition {\n always (\n Farmer in Near =>\n crossRiver[Near, Far] else\n crossRiver[Far, Near]\n )\n}\n\n/**\n * the farmer moves everything to the far side of the river.\n */\npred solvePuzzle {\n eventually Far = Object\n}\n\nrun solvePuzzle for 8 steps expect 1\n\n/**\n * no Object can be in two places at once\n * this is implied by both definitions of crossRiver \n */\nassert NoQuantumObjects {\n always no x : Object | x in Near and x in Far\n}\n\ncheck NoQuantumObjects for 8 steps expect 0", "permalink": "brush-spree-clone-bring", "time": "2024-08-19 11:23:19.001913", "cmd": 1} {"id": 14344, "parent": null, "code": "module examples/tutorial/farmerTemporal\n\n/*\n * The classic river crossing puzzle. A farmer is carrying a fox, a\n * chicken, and a sack of grain. He must cross a river using a boat\n * that can only hold the farmer and at most one other thing. If the\n * farmer leaves the fox alone with the chicken, the fox will eat the\n * chicken; and if he leaves the chicken alone with the grain, the\n * chicken will eat the grain. How can the farmer bring everything\n * to the far side of the river intact?\n *\n * authors: Greg Dennis, Rob Seater\n *\n * Acknowledgements to Derek Rayside and his students for finding and\n * fixing a bug in the \"crossRiver\" predicate.\n */\n\n/**\n * The farmer and all his possessions will be represented as Objects.\n * Some objects eat other objects when the Farmer's not around.\n */\nabstract sig Object { eats: set Object }\none sig Farmer, Fox, Chicken, Grain extends Object {}\n\n/**\n * Define what eats what when the Farmer' not around.\n * Fox eats the chicken and the chicken eats the grain.\n */\nfact eating { eats = Fox->Chicken + Chicken->Grain }\n\n/**\n * The near and far relations contain the objects held on each\n * side of the river in a given state, respectively.\n */\nvar sig Near in Object {}\nvar sig Far in Object {}\n\n/**\n * In the initial state, all objects are on the near side.\n */\nfact initialState {\n Near = Object && no Far\n}\n\n/**\n * Constrains at most one item to move from 'from' to 'to'.\n * Also constrains which objects get eaten.\n */\npred crossRiver [from, to: set Object] {\n // either the Farmer takes no items\n (from' = from - Farmer - from'.eats and\n to' = to + Farmer) or\n // or the Farmer takes one item\n (one x : from - Farmer | {\n from' = from - Farmer - x - from'.eats\n to' = to + Farmer + x })\n}\n\n/**\n * crossRiver transitions between states\n */\nfact stateTransition {\n always (\n Farmer in Near =>\n crossRiver[Near, Far] else\n crossRiver[Far, Near]\n )\n}\n\n/**\n * the farmer moves everything to the far side of the river.\n */\npred solvePuzzle {\n eventually Far = Object\n}\n\nrun solvePuzzle for 8 steps expect 1\n\n/**\n * no Object can be in two places at once\n * this is implied by both definitions of crossRiver \n */\nassert NoQuantumObjects {\n always no x : Object | x in Near and x in Far\n}\n\ncheck NoQuantumObjects for 8 steps expect 0", "permalink": "twirl-umpire-lard-prong", "time": "2024-08-21 19:17:23.668590", "cmd": 1} {"id": 14368, "parent": 14293, "code": "module examples/tutorial/farmerTemporal\n\n/*\n * The classic river crossing puzzle. A farmer is carrying a fox, a\n * chicken, and a sack of grain. He must cross a river using a boat\n * that can only hold the farmer and at most one other thing. If the\n * farmer leaves the fox alone with the chicken, the fox will eat the\n * chicken; and if he leaves the chicken alone with the grain, the\n * chicken will eat the grain. How can the farmer bring everything\n * to the far side of the river intact?\n *\n * authors: Greg Dennis, Rob Seater\n *\n * Acknowledgements to Derek Rayside and his students for finding and\n * fixing a bug in the \"crossRiver\" predicate.\n */\n\n/**\n * The farmer and all his possessions will be represented as Objects.\n * Some objects eat other objects when the Farmer's not around.\n */\nabstract sig Object { eats: set Object }\none sig Farmer, Fox, Chicken, Grain extends Object {}\n\n/**\n * Define what eats what when the Farmer' not around.\n * Fox eats the chicken and the chicken eats the grain.\n */\nfact eating { eats = Fox->Chicken + Chicken->Grain }\n\n/**\n * The near and far relations contain the objects held on each\n * side of the river in a given state, respectively.\n */\nvar sig Near in Object {}\nvar sig Far in Object {}\n\n/**\n * In the initial state, all objects are on the near side.\n */\nfact initialState {\n Near = Object && no Far\n}\n\n/**\n * Constrains at most one item to move from 'from' to 'to'.\n * Also constrains which objects get eaten.\n */\npred crossRiver [from, to: set Object] {\n // either the Farmer takes no items\n (from' = from - Farmer - from'.eats and\n to' = to + Farmer) or\n // or the Farmer takes one item\n (one x : from - Farmer | {\n from' = from - Farmer - x - from'.eats\n to' = to + Farmer + x })\n}\n\n/**\n * crossRiver transitions between states\n */\nfact stateTransition {\n always (\n Farmer in Near =>\n crossRiver[Near, Far] else\n crossRiver[Far, Near]\n )\n}\n\n/**\n * the farmer moves everything to the far side of the river.\n */\npred solvePuzzle {\n eventually Far = Object\n}\n\nrun solvePuzzle for 8 steps expect 1\n\n/**\n * no Object can be in two places at once\n * this is implied by both definitions of crossRiver \n */\nassert NoQuantumObjects {\n always no x : Object | x in Near and x in Far\n}\n\ncheck NoQuantumObjects for 8 steps expect 0", "permalink": "bunion-zips-raven-blob", "time": "2024-08-27 15:39:13.199011", "cmd": 1} {"id": 14369, "parent": 14368, "code": "module examples/tutorial/farmerTemporal\n\n/*\n * The classic river crossing puzzle. A farmer is carrying a fox, a\n * chicken, and a sack of grain. He must cross a river using a boat\n * that can only hold the farmer and at most one other thing. If the\n * farmer leaves the fox alone with the chicken, the fox will eat the\n * chicken; and if he leaves the chicken alone with the grain, the\n * chicken will eat the grain. How can the farmer bring everything\n * to the far side of the river intact?\n *\n * authors: Greg Dennis, Rob Seater\n *\n * Acknowledgements to Derek Rayside and his students for finding and\n * fixing a bug in the \"crossRiver\" predicate.\n */\n\n/**\n * The farmer and all his possessions will be represented as Objects.\n * Some objects eat other objects when the Farmer's not around.\n */\nabstract sig Object { eats: set Object }\none sig Farmer, Fox, Chicken, Grain extends Object {}\n\n/**\n * Define what eats what when the Farmer' not around.\n * Fox eats the chicken and the chicken eats the grain.\n */\nfact eating { eats = Fox->Chicken + Chicken->Grain }\n\n/**\n * The near and far relations contain the objects held on each\n * side of the river in a given state, respectively.\n */\nvar sig Near in Object {}\nvar sig Far in Object {}\n\n/**\n * In the initial state, all objects are on the near side.\n */\nfact initialState {\n Near = Object && no Far\n}\n\n/**\n * Constrains at most one item to move from 'from' to 'to'.\n * Also constrains which objects get eaten.\n */\npred crossRiver [from, to: set Object] {\n // either the Farmer takes no items\n (from' = from - Farmer - from'.eats and\n to' = to + Farmer) or\n // or the Farmer takes one item\n (one x : from - Farmer | {\n from' = from - Farmer - x - from'.eats\n to' = to + Farmer + x })\n}\n\n/**\n * crossRiver transitions between states\n */\nfact stateTransition {\n always (\n Farmer in Near =>\n crossRiver[Near, Far] else\n crossRiver[Far, Near]\n )\n}\n\n/**\n * the farmer moves everything to the far side of the river.\n */\npred solvePuzzle {\n eventually Far = Object\n}\n\nrun solvePuzzle for 8 steps expect 1\n\n/**\n * no Object can be in two places at once\n * this is implied by both definitions of crossRiver \n */\nassert NoQuantumObjects {\n always no x : Object | x in Near and x in Far\n}\n\ncheck NoQuantumObjects for 8 steps expect 0", "permalink": "cocoa-stool-yeah-screen", "time": "2024-08-27 15:40:53.259732", "cmd": 2} {"id": 14593, "parent": 14592, "code": "// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash for 2 but 3..10 steps", "permalink": "visor-halves-douche-unwind", "time": "2024-09-09 22:20:43.795831", "cmd": 1} {"id": 14601, "parent": null, "code": "sig Student {\n classes : set Class\n}\n\nsig Class {}\n\nrun {one Student}\n\ncheck {all s : Student | some s.classes }", "permalink": "obtuse-scorch-pouch-trifle", "time": "2024-09-09 22:36:25.890399", "cmd": 1} {"id": 14590, "parent": 14589, "code": "\nsig Car {}\n\nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nenum Color {GREEN, RED}\n\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n one LightA.color.RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "fedora-slurp-clay-breeze", "time": "2024-09-09 22:16:47.162484", "cmd": 1} {"id": 14579, "parent": 14578, "code": "\nsig Car {}\n\nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n some car implies eventually color = GREEN\n}\n\nenum Color {GREEN, RED}\n\none sig LightA, LightB extends Light {}", "permalink": "creole-guru-litter-muppet", "time": "2024-09-09 22:08:51.103818", "cmd": 1} {"id": 14585, "parent": 14584, "code": "\nsig Car {}\n\nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nenum Color {GREEN, RED}\n\none sig LightA, LightB extends Light {}\n\npred crash {\n (LightA.color = GREEN and LightB.color = GREEN)\n}\n\n\ncheck {always not crash}", "permalink": "zips-flaky-violet-letter", "time": "2024-09-09 22:13:19.013888", "cmd": 1} {"id": 14620, "parent": 14596, "code": "// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "study-scoff-storm-shawl", "time": "2024-09-09 23:36:36.153941", "cmd": 1} {"id": 14596, "parent": 14595, "code": "// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "penny-stream-blame-savior", "time": "2024-09-09 22:21:31.803546", "cmd": 1} {"id": 14609, "parent": null, "code": "sig Student {\n classes : set Class\n}\n\nsig Class {}\n\nrun {one Student}\n\ncheck {all s : Student | some s.classes }", "permalink": "pasted-purity-tulip-poison", "time": "2024-09-09 22:50:54.671646", "cmd": 1} {"id": 14625, "parent": 14596, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "bobble-payday-oboe-banana", "time": "2024-09-09 23:52:50.729886", "cmd": 1} {"id": 14574, "parent": 14573, "code": "sig Light {\n color : one Color,\n}\n\nenum Color {D,E}", "permalink": "crept-wrath-vanish-smell", "time": "2024-09-09 22:04:30.788631", "cmd": 1} {"id": 14607, "parent": 14606, "code": "sig Student {\n classes : set Class\n}\n\nsig Class {}\n\nrun {one Student}\n\ncheck {all s : Student | some s.classes }", "permalink": "daily-unease-ranch-tiger", "time": "2024-09-09 22:49:01.974497", "cmd": 2} {"id": 14611, "parent": 14610, "code": "sig Student {\n classes : set Class\n}\n\nsig Class {\n ta : one Student\n}\n\nrun {one Student}\n\ncheck {all s : Student | some s.classes }", "permalink": "legend-curing-envy-shack", "time": "2024-09-09 22:52:54.188824", "cmd": 1} {"id": 14587, "parent": 14586, "code": "\nsig Car {}\n\nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nenum Color {GREEN, RED}\n\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash for 1..3", "permalink": "morale-reseal-liquid-vastly", "time": "2024-09-09 22:14:16.437123", "cmd": 1} {"id": 14608, "parent": 14607, "code": "sig Student {\n classes : set Class\n}\n\nsig Class {}\n\nrun {one Student}\n\ncheck {all s : Student | some s.classes }", "permalink": "cannot-trophy-borax-tumble", "time": "2024-09-09 22:49:27.329270", "cmd": 2} {"id": 14573, "parent": null, "code": "sig Light {\n color : one Color,\n}\n\nenum Color {D,D}", "permalink": "spleen-squirt-garlic-legacy", "time": "2024-09-09 22:04:24.415156", "cmd": 1} {"id": 14594, "parent": 14593, "code": "// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash for 2 but 3 steps", "permalink": "strode-dealer-cape-proton", "time": "2024-09-09 22:20:54.537334", "cmd": 1} {"id": 14578, "parent": 14577, "code": "abstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n some car implies eventually color = GREEN\n}\n\nsig Car {}\n\nenum Color {GREEN, RED}", "permalink": "zero-skies-urchin-envy", "time": "2024-09-09 22:07:46.343828", "cmd": 1} {"id": 14584, "parent": 14583, "code": "\nsig Car {}\n\nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nenum Color {GREEN, RED}\n\none sig LightA, LightB extends Light {}\n\npred crash {\n (LightA.color = GREEN and LightB.color = GREEN)\n}\n\n\ncheck {always not crash}", "permalink": "earful-during-upon-sprawl", "time": "2024-09-09 22:13:17.753192", "cmd": 1} {"id": 14453, "parent": null, "code": "module examples/tutorial/farmerTemporal\n\n/*\n * The classic river crossing puzzle. A farmer is carrying a fox, a\n * chicken, and a sack of grain. He must cross a river using a boat\n * that can only hold the farmer and at most one other thing. If the\n * farmer leaves the fox alone with the chicken, the fox will eat the\n * chicken; and if he leaves the chicken alone with the grain, the\n * chicken will eat the grain. How can the farmer bring everything\n * to the far side of the river intact?\n *\n * authors: Greg Dennis, Rob Seater\n *\n * Acknowledgements to Derek Rayside and his students for finding and\n * fixing a bug in the \"crossRiver\" predicate.\n */\n\n/**\n * The farmer and all his possessions will be represented as Objects.\n * Some objects eat other objects when the Farmer's not around.\n */\nabstract sig Object { eats: set Object }\none sig Farmer, Fox, Chicken, Grain extends Object {}\n\n/**\n * Define what eats what when the Farmer' not around.\n * Fox eats the chicken and the chicken eats the grain.\n */\nfact eating { eats = Fox->Chicken + Chicken->Grain }\n\n/**\n * The near and far relations contain the objects held on each\n * side of the river in a given state, respectively.\n */\nvar sig Near in Object {}\nvar sig Far in Object {}\n\n/**\n * In the initial state, all objects are on the near side.\n */\nfact initialState {\n Near = Object && no Far\n}\n\n/**\n * Constrains at most one item to move from 'from' to 'to'.\n * Also constrains which objects get eaten.\n */\npred crossRiver [from, to: set Object] {\n // either the Farmer takes no items\n (from' = from - Farmer - from'.eats and\n to' = to + Farmer) or\n // or the Farmer takes one item\n (one x : from - Farmer | {\n from' = from - Farmer - x - from'.eats\n to' = to + Farmer + x })\n}\n\n/**\n * crossRiver transitions between states\n */\nfact stateTransition {\n always (\n Farmer in Near =>\n crossRiver[Near, Far] else\n crossRiver[Far, Near]\n )\n}\n\n/**\n * the farmer moves everything to the far side of the river.\n */\npred solvePuzzle {\n eventually Far = Object\n}\n\nrun solvePuzzle for 8 steps expect 1\n\n/**\n * no Object can be in two places at once\n * this is implied by both definitions of crossRiver \n */\nassert NoQuantumObjects {\n always no x : Object | x in Near and x in Far\n}\n\ncheck NoQuantumObjects for 8 steps expect 0", "permalink": "oppose-sash-scorn-caviar", "time": "2024-09-04 20:35:08.247952", "cmd": 1} {"id": 14583, "parent": 14582, "code": "\nsig Car {}\n\nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nenum Color {GREEN, RED}\n\none sig LightA, LightB extends Light {}\n\nassert neverBothGreen {\n always not (LightA.color = GREEN and LightB.color = GREEN)\n}\n\ncheck neverBothGreen", "permalink": "alibi-wrist-unsold-ladder", "time": "2024-09-09 22:12:00.076240", "cmd": 1} {"id": 14592, "parent": 14591, "code": "// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "senior-dander-fetal-drank", "time": "2024-09-09 22:18:52.863006", "cmd": 1} {"id": 14575, "parent": 14574, "code": "sig Light {\n color : one Color,\n}\n\nenum Color {GREEN, RED}", "permalink": "clunky-voter-slimy-map", "time": "2024-09-09 22:04:54.036939", "cmd": 1} {"id": 14580, "parent": 14579, "code": "\nsig Car {}\n\nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n some car implies eventually color = GREEN\n}\n\nenum Color {GREEN, RED}\n\none sig LightA, LightB extends Light {}\n\nassert neverBothGreen {\n always not (LightA.color = GREEN and LightA.color = GREEN)\n}\n\ncheck neverBothGreen", "permalink": "alias-yard-husked-jogger", "time": "2024-09-09 22:10:23.773882", "cmd": 1} {"id": 14589, "parent": 14588, "code": "\nsig Car {}\n\nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nenum Color {GREEN, RED}\n\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "eggnog-vastly-defuse-envoy", "time": "2024-09-09 22:14:26.743954", "cmd": 1} {"id": 14602, "parent": 14601, "code": "sig Student {\n classes : set Class\n}\n\nsig Class {}\n\nrun {one Student}\n\ncheck {all s : Student | some s.classes }", "permalink": "ambush-salon-slimy-dilute", "time": "2024-09-09 22:36:30.715810", "cmd": 2} {"id": 14582, "parent": 14581, "code": "\nsig Car {}\n\nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n some car implies eventually color = GREEN\n}\n\nenum Color {GREEN, RED}\n\none sig LightA, LightB extends Light {}\n\nassert neverBothGreen {\n always not (LightA.color = GREEN and LightB.color = GREEN)\n}\n\ncheck neverBothGreen", "permalink": "versus-extent-sassy-john", "time": "2024-09-09 22:11:03.942984", "cmd": 1} {"id": 14610, "parent": 14609, "code": "sig Student {\n classes : set Class\n}\n\nsig Class {}\n\nrun {one Student}\n\ncheck {all s : Student | some s.classes }", "permalink": "huff-clock-carol-perish", "time": "2024-09-09 22:51:30.694971", "cmd": 1} {"id": 14586, "parent": 14585, "code": "\nsig Car {}\n\nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nenum Color {GREEN, RED}\n\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash for ", "permalink": "vacant-neatly-acre-sprout", "time": "2024-09-09 22:14:06.960583", "cmd": 1} {"id": 14595, "parent": 14594, "code": "// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash for 2 but 3 steps", "permalink": "wince-bribe-penpal-cold", "time": "2024-09-09 22:21:09.195751", "cmd": 1} {"id": 14599, "parent": 14598, "code": "sig Student {\n classes : set Class\n}\n\nsig Class {}\n\nrun {one Student}\n\ncheck {all s : Student | some s.classes }", "permalink": "rhyme-atop-coat-rising", "time": "2024-09-09 22:34:29.203924", "cmd": 2} {"id": 14576, "parent": 14575, "code": "abstract sig Light {\n color : one Color,\n car : lone Car\n}\n\nsig Car {}\n\nenum Color {GREEN, RED}", "permalink": "gusty-snugly-velvet-eskimo", "time": "2024-09-09 22:06:32.296295", "cmd": 1} {"id": 14588, "parent": 14587, "code": "\nsig Car {}\n\nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nenum Color {GREEN, RED}\n\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "cuddle-garden-santa-accent", "time": "2024-09-09 22:14:24.025492", "cmd": 1} {"id": 14604, "parent": 14603, "code": "sig Student {\n classes : set Class\n}\n\nsig Class {}\n\nrun {one Student}\n\ncheck {all s : Student | some s.classes }", "permalink": "simply-recoup-shelf-recall", "time": "2024-09-09 22:37:38.403403", "cmd": 1} {"id": 14598, "parent": null, "code": "sig Student {\n classes : set Class\n}\n\nsig Class {}\n\nrun {one Student}\n\ncheck {all s : Student | some s.classes }", "permalink": "affair-crane-cinch-sprang", "time": "2024-09-09 22:33:41.969852", "cmd": 1} {"id": 14577, "parent": 14576, "code": "abstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n some car -> eventually color = GREEN\n}\n\nsig Car {}\n\nenum Color {GREEN, RED}", "permalink": "jacket-concur-hasty-zodiac", "time": "2024-09-09 22:07:36.388511", "cmd": 1} {"id": 14600, "parent": 14599, "code": "sig Student {\n classes : set Class\n}\n\nsig Class {}\n\nrun {one Student}\n\ncheck {all s : Student | some s.classes }", "permalink": "icing-java-online-irk", "time": "2024-09-09 22:34:35.455238", "cmd": 2} {"id": 14606, "parent": 14604, "code": "sig Student {\n classes : set Class\n}\n\nsig Class {}\n\nrun {one Student}\n\ncheck {all s : Student | some s.classes }", "permalink": "jolt-decay-yo-yo-epic", "time": "2024-09-09 22:48:50.633178", "cmd": 1} {"id": 14581, "parent": 14580, "code": "\nsig Car {}\n\nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n some car implies eventually color = GREEN\n}\n\nenum Color {GREEN, RED}\n\none sig LightA, LightB extends Light {}\n\nassert neverBothGreen {\n always not (LightA.color = GREEN and LightA.color = GREEN)\n}\n\ncheck neverBothGreen", "permalink": "yearly-iguana-enrich-coral", "time": "2024-09-09 22:10:29.160916", "cmd": 1} {"id": 14591, "parent": 14590, "code": "\nsig Car {}\n\nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nenum Color {GREEN, RED}\n\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "snazzy-prefix-slaw-family", "time": "2024-09-09 22:17:19.606205", "cmd": 1} {"id": 14642, "parent": 6739, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\nrun {}", "permalink": "define-lend-clang-spew", "time": "2024-09-10 14:00:49.771017", "cmd": 1} {"id": 14648, "parent": 14625, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "bush-groovy-septum-ladies", "time": "2024-09-10 14:38:06.574835", "cmd": 1} {"id": 14650, "parent": 14625, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "amuck-grimy-wrench-prison", "time": "2024-09-10 14:40:58.750086", "cmd": 1} {"id": 14697, "parent": 14696, "code": "sig Node\npred run", "permalink": "quack-cut-kilt-pelt", "time": "2024-09-12 06:14:42.527451", "cmd": 1} {"id": 14696, "parent": null, "code": "sig Node", "permalink": "skid-poet-brunch-atom", "time": "2024-09-12 06:14:31.946542", "cmd": 1} {"id": 14698, "parent": 14697, "code": "sig Node\npred run", "permalink": "tile-legal-lining-clench", "time": "2024-09-12 06:14:48.557974", "cmd": 1} {"id": 15808, "parent": null, "code": "open util/integer\n\n// Alloy model generated for deep embedding\n\none sig FM {\n root: one Feature,\n group: set Feature,\n require: ConstraintNode -> ConstraintNode,\n exclude: ConstraintNode -> ConstraintNode,\n config: set Instance\n}\n\nabstract sig Feature {\n groupCardinality: set Intervall,\n groupInstanceCardinality: set Intervall,\n cardinality: some Intervall,\n parent: lone Feature,\n instances: set Instance\n}\n\nsig Instance {\n feature: one Feature,\n instanceParent: lone Instance\n}\n\nsig Intervall {\n lowerBound: Int,\n upperBound: Int + KleeneStar\n}\n\nabstract sig ConstraintNode {\n feature: one Feature,\n cardinality: some Intervall\n}\n\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n f = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n one i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n one i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n one i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n one i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\nfact intervallPositive {\n all i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\nfact intervallIsAttribute {\n all i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\nfact noClustering {\n all i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n all i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n all i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n all i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n (i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\nfact rootTree {\n all f: Feature | FM.root in f.*parent\n all f: FM.root | no f.parent\n all f: Feature - FM.root | one f.parent\n no f: Feature | f in f.^parent\n}\n\nfact configuration {\n all i: Instance | i in FM.config\n}\n\nfact root{\n all f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n all f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n all f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n all f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint {\n all i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n all c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n\nfact groupCardinalityConstraint {\n all i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\nfact groupInstanceCardinalityConstraint {\n all i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent {\n all i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n all i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n all i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n\nfact requireConstraint {\n all f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n all c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)]\n}\n\nfact excludeConstraint {\n all f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n all c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)])\n}\n\none sig VendingMachine, PaymentSystem, CoinPayment, CashBillPayment, Drinks, Food extends Feature {}\n\none sig i1, i2, i3, i4, i5, i6, i7, i8, i9, i10 extends Intervall {}\n\nfact {\n i1.lowerBound = 1\n i1.upperBound = 1\n VendingMachine.cardinality = i1\n i2.lowerBound = 2\n i2.upperBound = KleeneStar\n VendingMachine.groupInstanceCardinality = i2\n i3.lowerBound = 2\n i3.upperBound = 2\n VendingMachine.groupCardinality = i3\n PaymentSystem.parent = VendingMachine\n i4.lowerBound = 1\n i4.upperBound = 1\n PaymentSystem.cardinality = i4\n i5.lowerBound = 1\n i5.upperBound = 1\n PaymentSystem.groupInstanceCardinality = i5\n i6.lowerBound = 1\n i6.upperBound = 1\n PaymentSystem.groupCardinality = i6\n CoinPayment.parent = PaymentSystem\n i7.lowerBound = 0\n i7.upperBound = 1\n CoinPayment.cardinality = i7\n CashBillPayment.parent = PaymentSystem\n i8.lowerBound = 0\n i8.upperBound = 1\n CashBillPayment.cardinality = i8\n Drinks.parent = VendingMachine\n i9.lowerBound = 1\n i9.upperBound = 5\n Drinks.cardinality = i9\n Food.parent = VendingMachine\n i10.lowerBound = 1\n i10.upperBound = 5\n Food.cardinality = i10\n}\n\n\nrun {} for 14 but 7 Int,0 Feature, 0 ConstraintNode", "permalink": "geiger-hertz-dig-nanny", "time": "2024-09-18 15:34:25.252192", "cmd": 1} {"id": 15755, "parent": null, "code": "// A person can either be a student or a professor\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A class has one instructor (Professor) and may have multiple assistants (Students)\nsig Class {\n instructor: one Professor,\n assistant: some Student\n}\n\n// An assignment is associated with one or more classes and it assigned to one or more students\nsig Assignment {\n associated_with: set Class,\n assigned_to: some Student\n}\n\n// Each assignment is associated with at least one class\nfact {\n all a: Assignment | one a.associated_with\n}\n\n// Predicate PolicyAllowsGrading defines- \n// the policy for allowing grading of an Assignment by a Person\npred PolicyAllowsGrading(p: Person, a: Assignment){\n p in a.associated_with.assistant or p in a.associated_with.instructor\n}\n\n// No One can grade their own assignment\nassert NoOneCanGradeTheirOwnAssignment{\n all p: Person, a: Assignment | \n PolicyAllowsGrading[p, a] implies not p in a.assigned_to\n}\n\nrun {} \nrun {} for 4 but exactly 2 Class\n\ncheck NoOneCanGradeTheirOwnAssignment for 2", "permalink": "hut-whiff-daily-plow", "time": "2024-09-18 14:09:05.898233", "cmd": 3} {"id": 15855, "parent": 15808, "code": "open util/integer\n\n// Alloy model generated for deep embedding\n\none sig FM {\n root: one Feature,\n group: set Feature,\n require: ConstraintNode -> ConstraintNode,\n exclude: ConstraintNode -> ConstraintNode,\n config: set Instance\n}\n\nabstract sig Feature {\n groupCardinality: set Intervall,\n groupInstanceCardinality: set Intervall,\n cardinality: some Intervall,\n parent: lone Feature,\n instances: set Instance\n}\n\nsig Instance {\n feature: one Feature,\n instanceParent: lone Instance\n}\n\nsig Intervall {\n lowerBound: Int,\n upperBound: Int + KleeneStar\n}\n\nabstract sig ConstraintNode {\n feature: one Feature,\n cardinality: some Intervall\n}\n\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n f = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n one i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n one i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n one i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n one i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\nfact intervallPositive {\n all i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\nfact intervallIsAttribute {\n all i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\nfact noClustering {\n all i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n all i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n all i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n all i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n (i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\nfact rootTree {\n all f: Feature | FM.root in f.*parent\n all f: FM.root | no f.parent\n all f: Feature - FM.root | one f.parent\n no f: Feature | f in f.^parent\n}\n\nfact configuration {\n all i: Instance | i in FM.config\n}\n\nfact root{\n all f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n all f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n all f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n all f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint {\n all i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n all c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n\nfact groupCardinalityConstraint {\n all i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\nfact groupInstanceCardinalityConstraint {\n all i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent {\n all i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n all i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n all i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n\nfact requireConstraint {\n all f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n all c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)]\n}\n\nfact excludeConstraint {\n all f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n all c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)])\n}\n\none sig VendingMachine, PaymentSystem, CoinPayment, CashBillPayment extends Feature {}\n\none sig i1, i2, i3, i4, i5, i6, i7, i8 extends Intervall {}\n\nfact {\n i1.lowerBound = 1\n i1.upperBound = 1\n VendingMachine.cardinality = i1\n i2.lowerBound = 1\n i2.upperBound = KleeneStar\n VendingMachine.groupInstanceCardinality = i2\n i3.lowerBound = 1\n i3.upperBound = 1\n VendingMachine.groupCardinality = i3\n PaymentSystem.parent = VendingMachine\n i4.lowerBound = 1\n i4.upperBound = 1\n PaymentSystem.cardinality = i4\n i5.lowerBound = 1\n i5.upperBound = 1\n PaymentSystem.groupInstanceCardinality = i5\n i6.lowerBound = 1\n i6.upperBound = 1\n PaymentSystem.groupCardinality = i6\n CoinPayment.parent = PaymentSystem\n i7.lowerBound = 0\n i7.upperBound = 1\n CoinPayment.cardinality = i7\n CashBillPayment.parent = PaymentSystem\n i8.lowerBound = 0\n i8.upperBound = 1\n CashBillPayment.cardinality = i8\n}\n\n\nrun {} for 4 but 4 Int,0 Feature, 0 ConstraintNode", "permalink": "debit-pager-collie-chosen", "time": "2024-09-18 16:11:26.522123", "cmd": 1} {"id": 15757, "parent": 6737, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {all a : Assignment | one a.associated_with}\n\n// Predicate PolicyAllowsGrading defines the policy for allowing grading of an Assignment by a Person.\npred PolicyAllowsGrading(p: Person, a: Assignment) {\n p in a.associated_with.assistant or p in a.associated_with.instructor\n}\n\n// Assert NoOneCanGradeTheirOwnAssignment checks that no Person can grade their own Assignment.\nassert NoOneCanGradeTheirOwnAssignment {\n all p : Person, a : Assignment |\n PolicyAllowsGrading[p, a] implies not p in a.assigned_to\n}\n\ncheck NoOneCanGradeTheirOwnAssignment for 2", "permalink": "quit-crook-dugout-undead", "time": "2024-09-18 14:14:51.794992", "cmd": 1} {"id": 17030, "parent": 17029, "code": "sig Name, Addr{}\nsig Book {\n addr: Name -> lone Addr\n}\n\npred show (b: Book) {\n #b.addr > 1\n #Name.(b.addr) > 1\n}\n\npred add (b, b_prime: Book, n: Name, a: Addr) {\n b_prime.addr = b.addr + n -> a\n}\n\nrun show for 3 but 1 Book\n\nrun add for 3 but 2 Book", "permalink": "dawn-denial-knoll-gnarly", "time": "2024-09-20 07:16:43.599135", "cmd": 2} {"id": 17279, "parent": 17278, "code": "// Declare signatures for Employees and Managers\nsig Employee {}\nsig Manager extends Employee {}\n\n// A binary relation showing who manages whom (from Employee to Employee)\nfact CompanyRules {\n // Every non-manager employee must have exactly one manager\n all e: Employee - Manager | one e.managed_by\n\n // Managers manage employees who are not themselves\n all m: Manager | all e: m.manages | e != m\n\n // Managers are employees, and each employee can have a manager\n some manages: Manager -> Employee\n}\n\n// Example predicate to define a specific scenario\npred showCompanyStructure {\n #Employee = 5 // There are 5 employees\n #Manager = 2 // Out of the 5 employees, 2 are managers\n}\n\n// Run the predicate to visualize the company structure\nrun showCompanyStructure for 5", "permalink": "lens-dock-why-jam", "time": "2024-09-27 14:58:29.638075", "cmd": 1} {"id": 16963, "parent": null, "code": "abstract sig Color {}\n\n// sig Red, Green, Blue extends Color {}\none sig Red, Green, Blue extends Color {}\n\nrun {} for 10", "permalink": "stout-easily-yoyo-affair", "time": "2024-09-19 15:00:43.336332", "cmd": 1} {"id": 17029, "parent": 17028, "code": "sig Name, Addr{}\nsig Book {\n addr: Name -> lone Addr\n}\n\npred show (b: Book) {\n #b.addr > 1\n #Name.(b.addr) > 1\n}\n\npred add (b, b_prime: Book, n: Name, a: Addr) {\n b_prime.addr = b.addr + n -> a\n}\n\nrun show for 3 but 1 Book\n\nrun add for 4 but 3 Book", "permalink": "frozen-come-trench-sway", "time": "2024-09-20 07:16:31.819137", "cmd": 1} {"id": 17273, "parent": null, "code": "// Declare signatures for Employees and Managers\nsig Employee {}\nsig Manager extends Employee {}\n\n// Each employee has a manager (except the top manager who manages themselves)\nsig Company {\n employees: set Employee,\n managers: set Manager\n}\n// Facts (constraints) about the company's structure\nfact CompanyRules {\n // Every employee (including managers) has exactly one manager\n all e: Employee | one m: e.~managers\n \n // A manager can only manage employees\n all m: Manager | all e: m.~employees | e in employees\n \n // No employee can manage themselves, except the top manager\n all e: Employee | e not in e.~managers or (e in managers and e in e.~managers)\n}\n// Example predicate to define a specific scenario\npred showCompanyStructure {\n #employees = 5 // There are 5 employees in the company\n #managers = 2 // 2 out of the 5 employees are managers\n}\n\n// Run the predicate to visualize the company structure\nrun showCompanyStructure for 5", "permalink": "richly-rerun-ecard-rocket", "time": "2024-09-27 14:55:02.557515", "cmd": 1} {"id": 17275, "parent": 17274, "code": "// Declare signatures for Employees and Managers\nsig Employee {}\nsig Manager extends Employee {}\n\n// Each employee has a manager (except the top manager who manages themselves)\nsig Company {\n employees: set Employee, // A set of employees in the company\n manages: Employee -> Employee // A relation showing who manages whom\n}\n\n// Facts (constraints) about the company's structure\nfact CompanyRules {\n // Every employee has exactly one manager (except possibly the top manager)\n all e: Employee | one manages.e\n \n // A manager can only manage other employees (but not themselves)\n all m: Manager | no m -> m // Managers cannot manage themselves\n}\n\n// Example predicate to define a specific scenario\npred showCompanyStructure {\n #Employee = 5 // There are 5 employees in the company\n #Manager = 1 // 2 of the 5 employees are managers\n}\n\n// Run the predicate to visualize the company structure\nrun showCompanyStructure for 5", "permalink": "cash-chatty-poppy-voyage", "time": "2024-09-27 14:55:50.436508", "cmd": 1} {"id": 17274, "parent": 17273, "code": "// Declare signatures for Employees and Managers\nsig Employee {}\nsig Manager extends Employee {}\n\n// Each employee has a manager (except the top manager who manages themselves)\nsig Company {\n employees: set Employee, // A set of employees in the company\n manages: Employee -> Employee // A relation showing who manages whom\n}\n\n// Facts (constraints) about the company's structure\nfact CompanyRules {\n // Every employee has exactly one manager (except possibly the top manager)\n all e: Employee | one manages.e\n \n // A manager can only manage other employees (but not themselves)\n all m: Manager | no m -> m // Managers cannot manage themselves\n}\n\n// Example predicate to define a specific scenario\npred showCompanyStructure {\n #Employee = 5 // There are 5 employees in the company\n #Manager = 2 // 2 of the 5 employees are managers\n}\n\n// Run the predicate to visualize the company structure\nrun showCompanyStructure for 5", "permalink": "shorts-baggie-omen-spout", "time": "2024-09-27 14:55:42.959692", "cmd": 1} {"id": 17278, "parent": 17277, "code": "// Declare a signature for people\nsig Person { \n friends: set Person // Each person can have a set of friends\n}\n\n// Facts (constraints) about friendship\nfact FriendshipRules {\n // Friendships are mutual: if A is friends with B, then B is friends with A\n all p: Person | all f: p.friends | p in f.friends\n \n // No person can be friends with themselves\n no p: Person | p in p.friends\n}\n\n// Example predicate to check the friendship relationships\npred showFriendship {\n #Person = 3 // There are 3 people\n}\n\n// Run the predicate to visualize the friendship structure\nrun showFriendship for 5", "permalink": "affair-trial-thing-reveal", "time": "2024-09-27 14:57:14.669102", "cmd": 1} {"id": 17182, "parent": 17181, "code": "// Declare a signature for people\nsig Person { \n friends: set Person // Each person can have a set of friends\n}\n\n// Facts (constraints) about friendship\nfact FriendshipRules {\n // Friendships are mutual: if A is friends with B, then B is friends with A\n all p: Person | all f: p.friends | p in f.friends\n \n // No person can be friends with themselves\n no p: Person | p in p.friends\n}\n\n// Example predicate to check the friendship relationships\npred showFriendship {\n #Person = 3 // There are 3 people\n}\n\n// Run the predicate to visualize the friendship structure\nrun showFriendship for 5", "permalink": "stock-petal-swarm-cavity", "time": "2024-09-25 06:51:41.452144", "cmd": 1} {"id": 17022, "parent": null, "code": "sig Name, Addr{}\nsig Book{\n addr: Name -> lone Addr\n}\n\nrun{}", "permalink": "levers-mascot-dingy-shush", "time": "2024-09-20 06:39:27.091217", "cmd": 1} {"id": 16948, "parent": 7001, "code": "sig Guest {}\nsig Drunk in Guest {}\n\npred drinkers {\n some x : Guest |\n (x in Drunk implies \n all y : Guest | y in Drunk)\n}\n\nrun drinkers for 5", "permalink": "easel-proton-doable-outer", "time": "2024-09-19 10:00:53.011436", "cmd": 1} {"id": 17028, "parent": 17022, "code": "sig Name, Addr{}\nsig Book {\n addr: Name -> lone Addr\n}\n\npred show (b: Book) {\n #b.addr > 1\n #Name.(b.addr) > 1\n}\n\npred add (b, b_prime: Book, n: Name, a: Addr) {\n b_prime.addr = b.addr + n -> a\n}\n\nrun show for 3 but 1 Book\n\nrun add for 4 but 3 Book", "permalink": "author-sitter-shock-canal", "time": "2024-09-20 07:15:58.146530", "cmd": 2} {"id": 17277, "parent": 17276, "code": "// Declare signatures for Employees and Managers\nsig Employee {}\nsig Manager extends Employee {}\n\n// A relation showing who manages whom (from Employee to Employee)\nsig Company {\n employees: set Employee, // A set of employees\n manages: Employee -> Employee // A relation showing which employee manages which\n}\n\n// Facts (constraints) about the company's structure\nfact CompanyRules {\n // Every employee (who isn't a manager themselves) must have exactly one manager\n all e: Employee - Manager | one e.~manages // Every non-manager is managed by one employee\n\n // Managers can only manage employees who are not themselves\n all m: Manager | all e: m.manages | e != m // No manager can manage themselves\n\n // A manager must also be an employee (already covered by inheritance)\n}\n\n// Example predicate to define a specific scenario\npred showCompanyStructure {\n #Employee = 5 // There are 5 employees in total\n #Manager = 2 // 2 of them are managers\n}\n\n// Run the predicate to visualize the company structure\nrun showCompanyStructure for 5", "permalink": "catnip-verify-septum-femur", "time": "2024-09-27 14:56:50.508509", "cmd": 1} {"id": 17280, "parent": 17279, "code": "// Declare signatures for Employees and Managers\nsig Employee {}\nsig Manager extends Employee {}\n\n// A binary relation showing who manages whom (from Manager to Employee)\nsig manages {\n m: Manager, // Manager\n e: Employee // Employee managed by the manager\n}\n\n// Facts (constraints) about the company's structure\nfact CompanyRules {\n // Each non-manager employee must have at least one manager\n all e: Employee - Manager | one m: Manager | manages.m = e\n\n // Managers cannot manage themselves\n all m: Manager | no manages.m = m\n}\n\n// Example predicate to define a specific scenario\npred showCompanyStructure {\n #Employee = 5 // There are 5 employees in total\n #Manager = 2 // 2 of the 5 employees are managers\n}\n\n// Run the predicate to visualize the company structure\nrun showCompanyStructure for 5", "permalink": "ashy-ambush-tall-poplar", "time": "2024-09-27 14:59:35.665816", "cmd": 1} {"id": 16947, "parent": 6741, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n\nrun {}", "permalink": "dinghy-spleen-folic-babble", "time": "2024-09-19 10:00:02.300865", "cmd": 1} {"id": 17181, "parent": null, "code": "// Declaration of signatures (types)\nsig Person {}\n\nsig Male, Female extends Person {}\n\n// Relationships (fields)\nsig Parent {\n mother: lone Female, // Each parent has at most one mother\n father: lone Male // Each parent has at most one father\n}\n\n// Facts (constraints)\nfact FamilyRules {\n // No person can be both male and female\n no p: Male & Female\n \n // Every person must have a mother and a father\n all p: Person | some p.mother and some p.father\n}\n\n// Example predicate to check the family structure\npred showExampleFamily {\n #Person = 3 // We have 3 people\n #Female = 2 // 2 females\n #Male = 1 // 1 male\n}\n\n// Run the predicate to visualize the family structure\nrun showExampleFamily for 5\nWrite your code here", "permalink": "foyer-ruckus-boxy-cringe", "time": "2024-09-25 06:50:37.970140", "cmd": 1} {"id": 17282, "parent": 17281, "code": "// Declare signatures for Students and Teachers\nsig Student {}\nsig Teacher {}\n\n// A binary relation showing which teacher teaches which student\nsig Classroom {\n teaches: Teacher -> Student // Each teacher teaches students\n}\n\n// Facts (constraints) about the school structure\nfact SchoolRules {\n // Each student must have exactly one teacher\n all s: Student | one t: Teacher | s in t.teaches\n \n // Teachers cannot teach themselves\n no t: Teacher | t in t.teaches\n}\n\n// Example predicate to define a specific scenario\npred showSchoolStructure {\n #Student = 5 // There are 5 students\n #Teacher = 2 // 2 teachers in the system\n}\n\n// Run the predicate to visualize the school structure\nrun showSchoolStructure for 5", "permalink": "filter-unkind-dilute-faster", "time": "2024-09-27 15:00:35.029490", "cmd": 1} {"id": 17272, "parent": null, "code": "// Declare a signature for people\nsig Person { \n friends: set Person // Each person can have a set of friends\n}\n\n// Facts (constraints) about friendship\nfact FriendshipRules {\n // Friendships are mutual: if A is friends with B, then B is friends with A\n all p: Person | all f: p.friends | p in f.friends\n \n // No person can be friends with themselves\n no p: Person | p in p.friends\n}\n\n// Example predicate to check the friendship relationships\npred showFriendship {\n #Person = 3 // There are 3 people\n}\n\n// Run the predicate to visualize the friendship structure\nrun showFriendship for 5", "permalink": "pusher-alive-degree-yeast", "time": "2024-09-27 14:13:07.124467", "cmd": 1} {"id": 17281, "parent": 17280, "code": "// Declare signatures for Students and Teachers\nsig Student {}\nsig Teacher {}\n\n// A binary relation showing which teacher teaches which student\nsig Classroom {\n teaches: Teacher -> Student // Each teacher teaches students\n}\n\n// Facts (constraints) about the school structure\nfact SchoolRules {\n // Each student must have exactly one teacher\n all s: Student | one t: Teacher | s in t.teaches\n \n // Teachers cannot teach themselves\n no t: Teacher | t in t.teaches\n}\n\n// Example predicate to define a specific scenario\npred showSchoolStructure {\n #Student = 5 // There are 5 students\n #Teacher = 2 // 2 teachers in the system\n}\n\n// Run the predicate to visualize the school structure\nrun showSchoolStructure for 5", "permalink": "refold-jovial-ploy-dowry", "time": "2024-09-27 15:00:27.122305", "cmd": 1} {"id": 17276, "parent": 17275, "code": "// Declare signatures for Employees and Managers\nsig Employee {}\nsig Manager extends Employee {}\n\n// Each employee has a manager (except the top manager who manages themselves)\nsig Company {\n employees: set Employee, // A set of employees in the company\n manages: Employee -> Employee // A relation showing who manages whom\n}\n\n// Facts (constraints) about the company's structure\nfact CompanyRules {\n // Every employee has exactly one manager (except possibly the top manager)\n all e: Employee | one manages.e\n \n // A manager can only manage other employees (but not themselves)\n all m: Manager | no m -> m // Managers cannot manage themselves\n}\n\n// Example predicate to define a specific scenario\npred showCompanyStructure {\n #Employee = 5 // There are 5 employees in the company\n #Manager = 4 // 2 of the 5 employees are managers\n}\n\n// Run the predicate to visualize the company structure\nrun showCompanyStructure for 5", "permalink": "trifle-uproot-gorged-savor", "time": "2024-09-27 14:55:57.176688", "cmd": 1} {"id": 17283, "parent": 17282, "code": "// Signature for Person\nsig Person {\n cars: set Car // Each person can own multiple cars\n}\n\n// Signature for Car\nsig Car {\n owner: lone Person // Each car is owned by at most one person\n}\n\n// Predicate to define ownership constraints\npred validOwnership() {\n all c: Car | one c.owner // Each car has exactly one owner (if it has one)\n}\n\n// Example fact for the system: Ensure every car has an owner\nfact everyCarHasOwner {\n all c: Car | some c.owner\n}\n\n// Simple predicate to check if a person owns a specific car\npred owns(p: Person, c: Car) {\n c in p.cars\n}\n\n// Run the scenario with a specific scope\nrun validOwnership for 3 Person, 5 Car", "permalink": "creme-anemia-defuse-muzzle", "time": "2024-09-27 15:01:31.666159", "cmd": 1} {"id": 17409, "parent": null, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "blade-dab-cuddly-crimp", "time": "2024-10-07 18:01:04.531898", "cmd": 1} {"id": 30189, "parent": 30188, "code": "module houses\n\nabstract sig House {\n major: one Major,\n color: one Color,\n}\n\none sig H1, H2, H3 extends House {}\n\nenum Major {\n Math, Phil, CS\n}\n\nenum Color {\n Blue, Red, White\n}\n\nfact {\n // all majors are in/linked by some house\n Major in House.major\n // all colors are on/used by some house\n Color in House.color\n \n // The philosophy major lives directly to the right of the red house.\n (H1.color = Red and H2.major = Phil) or ((H2.color = Red and H3.major = Phil))\n //The computer science major lives in the blue house.\n some h : House | h.color = Blue and h.major = CS\n //The math major lives in house 2.\n H2.major = Math \n}\n\nrun {} ", "permalink": "buffed-expire-curse-dealt", "time": "2024-12-23 19:20:04.886473", "cmd": 1} {"id": 30327, "parent": 30258, "code": "module houses\n\nabstract sig House {\n major: one Major,\n color: one Color,\n}\n\none sig H1, H2, H3 extends House {}\n\nenum Major {\n Math, Phil, CS\n}\n\nenum Color {\n Blue, Red, White\n}\n\nfact {\n // all majors are in/linked by some house\n Major in House.major\n // all colors are on/used by some house\n Color in House.color\n \n // The philosophy major lives directly to the right of the red house.\n (H1.color = Red and H2.major = Phil) or ((H2.color = Red and H3.major = Phil))\n //The computer science major lives in the blue house.\n some h : House | h.color = Blue and h.major = CS\n //The math major lives in house 2.\n H2.major = Math \n}\n\nrun {} ", "permalink": "width-skype-moving-tiptop", "time": "2024-12-24 00:55:24.157036", "cmd": 1} {"id": 30139, "parent": 6744, "code": "module houses\n\nabstract sig House {\n major: one Major,\n color: one Color,\n}\n\none sig H1, H2, H3 extends House {}\n\nenum Major {\n Math, Phil, CS\n}\n\nenum Color {\n Blue, Red, White\n}\n\nfact {\n // all majors are in/linked by some house\n Major in House.major\n // all colors are on/used by some house\n Color in House.color\n \n // The philosophy major lives directly to the right of the red house.\n (H1.color = Red and H2.major = Phil) or ((H2.color = Red and H3.major = Phil))\n //The computer science major lives in the blue house.\n some h : House | h.color = Blue and h.major = CS\n //The math major lives in house 2.\n H2.major = Math \n}\n\nrun {} ", "permalink": "bovine-coat-object-upload", "time": "2024-12-22 20:05:17.879924", "cmd": 1} {"id": 30282, "parent": 30280, "code": "module houses\n\nabstract sig House {\n major: one Major,\n color: one Color,\n}\n\none sig H1, H2, H3 extends House {}\n\nenum Major {\n Math, Phil, CS\n}\n\nenum Color {\n Blue, Red, White\n}\n\nfact {\n // all majors are in/linked by some house\n Major in House.major\n // all colors are on/used by some house\n Color in House.color\n \n // The philosophy major lives directly to the right of the red house.\n (H1.color = Red and H2.major = Phil) or ((H2.color = Red and H3.major = Phil))\n //The computer science major lives in the blue house.\n some h : House | h.color = Blue and h.major = CS\n //The math major lives in house 2.\n H2.major = Math \n}\n\nrun {} ", "permalink": "huddle-purse-sassy-swirl", "time": "2024-12-23 21:40:06.518334", "cmd": 1} {"id": 30187, "parent": 30161, "code": "module houses\n\nabstract sig House {\n major: one Major,\n color: one Color,\n}\n\none sig H1, H2, H3 extends House {}\n\nenum Major {\n Math, Phil, CS\n}\n\nenum Color {\n Blue, Red, White\n}\n\nfact {\n // all majors are in/linked by some house\n Major in House.major\n // all colors are on/used by some house\n Color in House.color\n \n // The philosophy major lives directly to the right of the red house.\n (H1.color = Red and H2.major = Phil) or ((H2.color = Red and H3.major = Phil))\n //The computer science major lives in the blue house.\n some h : House | h.color = Blue and h.major = CS\n //The math major lives in house 2.\n H2.major = Math \n}\n\nrun {} ", "permalink": "curdle-slab-hacked-tablet", "time": "2024-12-23 17:12:32.339150", "cmd": 1} {"id": 30161, "parent": 30160, "code": "module houses\n\nabstract sig House {\n major: one Major,\n color: one Color,\n}\n\none sig H1, H2, H3 extends House {}\n\nenum Major {\n Math, Phil, CS\n}\n\nenum Color {\n Blue, Red, White\n}\n\nfact {\n // all majors are in/linked by some house\n Major in House.major\n // all colors are on/used by some house\n Color in House.color\n \n // The philosophy major lives directly to the right of the red house.\n (H1.color = Red and H2.major = Phil) or ((H2.color = Red and H3.major = Phil))\n //The computer science major lives in the blue house.\n some h : House | h.color = Blue and h.major = CS\n //The math major lives in house 2.\n H2.major = Math \n}\n\nrun {} ", "permalink": "ignore-nebula-vista-equate", "time": "2024-12-23 11:50:11.592408", "cmd": 1} {"id": 30160, "parent": 30159, "code": "module houses\n\nabstract sig House {\n major: one Major,\n color: one Color,\n}\n\none sig H1, H2, H3 extends House {}\n\nenum Major {\n Math, Phil, CS\n}\n\nenum Color {\n Blue, Red, White\n}\n\nfact {\n // all majors are in/linked by some house\n Major in House.major\n // all colors are on/used by some house\n Color in House.color\n \n // The philosophy major lives directly to the right of the red house.\n (H1.color = Red and H2.major = Phil) or ((H2.color = Red and H3.major = Phil))\n //The computer science major lives in the blue house.\n some h : House | h.color = Blue and h.major = CS\n //The math major lives in house 2.\n H2.major = Math \n}\n\nrun {} ", "permalink": "sixth-neatly-jingle-rascal", "time": "2024-12-23 11:24:21.891221", "cmd": 1} {"id": 30255, "parent": 30189, "code": "module houses\n\nabstract sig House {\n major: one Major,\n color: one Color,\n}\n\none sig H1, H2, H3 extends House {}\n\nenum Major {\n Math, Phil, CS\n}\n\nenum Color {\n Blue, Red, White\n}\n\nfact {\n // all majors are in/linked by some house\n Major in House.major\n // all colors are on/used by some house\n Color in House.color\n \n // The philosophy major lives directly to the right of the red house.\n (H1.color = Red and H2.major = Phil) or ((H2.color = Red and H3.major = Phil))\n //The computer science major lives in the blue house.\n some h : House | h.color = Blue and h.major = CS\n //The math major lives in house 2.\n H2.major = Math \n}\n\nrun {} ", "permalink": "trifle-thong-roving-hate", "time": "2024-12-23 20:25:07.798108", "cmd": 1} {"id": 30150, "parent": 30149, "code": "module houses\n\nabstract sig House {\n major: one Major,\n color: one Color,\n}\n\none sig H1, H2, H3 extends House {}\n\nenum Major {\n Math, Phil, CS\n}\n\nenum Color {\n Blue, Red, White\n}\n\nfact {\n // all majors are in/linked by some house\n Major in House.major\n // all colors are on/used by some house\n Color in House.color\n \n // The philosophy major lives directly to the right of the red house.\n (H1.color = Red and H2.major = Phil) or ((H2.color = Red and H3.major = Phil))\n //The computer science major lives in the blue house.\n some h : House | h.color = Blue and h.major = CS\n //The math major lives in house 2.\n H2.major = Math \n}\n\nrun {} ", "permalink": "giant-legend-obtain-droop", "time": "2024-12-22 23:36:18.096746", "cmd": 1} {"id": 30188, "parent": 30187, "code": "module houses\n\nabstract sig House {\n major: one Major,\n color: one Color,\n}\n\none sig H1, H2, H3 extends House {}\n\nenum Major {\n Math, Phil, CS\n}\n\nenum Color {\n Blue, Red, White\n}\n\nfact {\n // all majors are in/linked by some house\n Major in House.major\n // all colors are on/used by some house\n Color in House.color\n \n // The philosophy major lives directly to the right of the red house.\n (H1.color = Red and H2.major = Phil) or ((H2.color = Red and H3.major = Phil))\n //The computer science major lives in the blue house.\n some h : House | h.color = Blue and h.major = CS\n //The math major lives in house 2.\n H2.major = Math \n}\n\nrun {} ", "permalink": "voice-slimy-luster-cradle", "time": "2024-12-23 17:12:35.419352", "cmd": 1} {"id": 30149, "parent": 6739, "code": "module houses\n\nabstract sig House {\n major: one Major,\n color: one Color,\n}\n\none sig H1, H2, H3 extends House {}\n\nenum Major {\n Math, Phil, CS\n}\n\nenum Color {\n Blue, Red, White\n}\n\nfact {\n // all majors are in/linked by some house\n Major in House.major\n // all colors are on/used by some house\n Color in House.color\n \n // The philosophy major lives directly to the right of the red house.\n (H1.color = Red and H2.major = Phil) or ((H2.color = Red and H3.major = Phil))\n //The computer science major lives in the blue house.\n some h : House | h.color = Blue and h.major = CS\n //The math major lives in house 2.\n H2.major = Math \n}\n\nrun {} ", "permalink": "humid-rink-reward-riches", "time": "2024-12-22 23:33:15.401537", "cmd": 1} {"id": 30259, "parent": null, "code": "module houses\n\nabstract sig House {\n major: one Major,\n color: one Color,\n}\n\none sig H1, H2, H3 extends House {}\n\nenum Major {\n Math, Phil, CS\n}\n\nenum Color {\n Blue, Red, White\n}\n\nfact {\n // all majors are in/linked by some house\n Major in House.major\n // all colors are on/used by some house\n Color in House.color\n \n // The philosophy major lives directly to the right of the red house.\n (H1.color = Red and H2.major = Phil) or ((H2.color = Red and H3.major = Phil))\n //The computer science major lives in the blue house.\n some h : House | h.color = Blue and h.major = CS\n //The math major lives in house 2.\n H2.major = Math \n}\n\nrun {} ", "permalink": "shrubs-flatly-rewash-plural", "time": "2024-12-23 20:30:16.526944", "cmd": 1} {"id": 30053, "parent": 30052, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {all a : Assignment | one a.associated_with}\n\n// Predicate PolicyAllowsGrading defines the policy for allowing grading of an Assignment by a Person.\npred PolicyAllowsGrading(p: Person, a: Assignment) {\n p in a.associated_with.assistant or p in a.associated_with.instructor\n}\n\n// Assert NoOneCanGradeTheirOwnAssignment checks that no Person can grade their own Assignment.\nassert NoOneCanGradeTheirOwnAssignment {\n all p : Person, a : Assignment |\n PolicyAllowsGrading[p, a] implies not p in a.assigned_to\n}\n\ncheck NoOneCanGradeTheirOwnAssignment for 2", "permalink": "mower-margin-quarry-perm", "time": "2024-12-21 08:53:13.849548", "cmd": 1} {"id": 28671, "parent": 6737, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {all a : Assignment | one a.associated_with}\n\n// Predicate PolicyAllowsGrading defines the policy for allowing grading of an Assignment by a Person.\npred PolicyAllowsGrading(p: Person, a: Assignment) {\n p in a.associated_with.assistant or p in a.associated_with.instructor\n}\n\n// Assert NoOneCanGradeTheirOwnAssignment checks that no Person can grade their own Assignment.\nassert NoOneCanGradeTheirOwnAssignment {\n all p : Person, a : Assignment |\n PolicyAllowsGrading[p, a] implies not p in a.assigned_to\n}\n\ncheck NoOneCanGradeTheirOwnAssignment for 2", "permalink": "muppet-boned-five-maker", "time": "2024-12-14 15:26:14.925072", "cmd": 1} {"id": 29902, "parent": 6737, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {all a : Assignment | one a.associated_with}\n\n// Predicate PolicyAllowsGrading defines the policy for allowing grading of an Assignment by a Person.\npred PolicyAllowsGrading(p: Person, a: Assignment) {\n p in a.associated_with.assistant or p in a.associated_with.instructor\n}\n\n// Assert NoOneCanGradeTheirOwnAssignment checks that no Person can grade their own Assignment.\nassert NoOneCanGradeTheirOwnAssignment {\n all p : Person, a : Assignment |\n PolicyAllowsGrading[p, a] implies not p in a.assigned_to\n}\n\ncheck NoOneCanGradeTheirOwnAssignment for 2", "permalink": "anger-claim-iphone-fax", "time": "2024-12-20 06:00:36.189966", "cmd": 1} {"id": 23102, "parent": 6737, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {all a : Assignment | one a.associated_with}\n\n// Predicate PolicyAllowsGrading defines the policy for allowing grading of an Assignment by a Person.\npred PolicyAllowsGrading(p: Person, a: Assignment) {\n p in a.associated_with.assistant or p in a.associated_with.instructor\n}\n\n// Assert NoOneCanGradeTheirOwnAssignment checks that no Person can grade their own Assignment.\nassert NoOneCanGradeTheirOwnAssignment {\n all p : Person, a : Assignment |\n PolicyAllowsGrading[p, a] implies not p in a.assigned_to\n}\n\ncheck NoOneCanGradeTheirOwnAssignment for 2", "permalink": "browse-jingle-smog-raging", "time": "2024-11-13 04:29:21.603466", "cmd": 1} {"id": 27808, "parent": 6737, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {all a : Assignment | one a.associated_with}\n\n// Predicate PolicyAllowsGrading defines the policy for allowing grading of an Assignment by a Person.\npred PolicyAllowsGrading(p: Person, a: Assignment) {\n p in a.associated_with.assistant or p in a.associated_with.instructor\n}\n\n// Assert NoOneCanGradeTheirOwnAssignment checks that no Person can grade their own Assignment.\nassert NoOneCanGradeTheirOwnAssignment {\n all p : Person, a : Assignment |\n PolicyAllowsGrading[p, a] implies not p in a.assigned_to\n}\n\ncheck NoOneCanGradeTheirOwnAssignment for 2", "permalink": "spoken-hankie-pebbly-stage", "time": "2024-12-03 07:28:00.411991", "cmd": 1} {"id": 28955, "parent": 6737, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {all a : Assignment | one a.associated_with}\n\n// Predicate PolicyAllowsGrading defines the policy for allowing grading of an Assignment by a Person.\npred PolicyAllowsGrading(p: Person, a: Assignment) {\n p in a.associated_with.assistant or p in a.associated_with.instructor\n}\n\n// Assert NoOneCanGradeTheirOwnAssignment checks that no Person can grade their own Assignment.\nassert NoOneCanGradeTheirOwnAssignment {\n all p : Person, a : Assignment |\n PolicyAllowsGrading[p, a] implies not p in a.assigned_to\n}\n\ncheck NoOneCanGradeTheirOwnAssignment for 2", "permalink": "stilt-rebel-quilt-shone", "time": "2024-12-16 13:20:09.934335", "cmd": 1} {"id": 23730, "parent": 6737, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {all a : Assignment | one a.associated_with}\n\n// Predicate PolicyAllowsGrading defines the policy for allowing grading of an Assignment by a Person.\npred PolicyAllowsGrading(p: Person, a: Assignment) {\n p in a.associated_with.assistant or p in a.associated_with.instructor\n}\n\n// Assert NoOneCanGradeTheirOwnAssignment checks that no Person can grade their own Assignment.\nassert NoOneCanGradeTheirOwnAssignment {\n all p : Person, a : Assignment |\n PolicyAllowsGrading[p, a] implies not p in a.assigned_to\n}\n\ncheck NoOneCanGradeTheirOwnAssignment for 2", "permalink": "wobbly-stoop-sequel-suing", "time": "2024-11-18 13:49:32.340251", "cmd": 1} {"id": 30052, "parent": 6737, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {all a : Assignment | one a.associated_with}\n\n// Predicate PolicyAllowsGrading defines the policy for allowing grading of an Assignment by a Person.\npred PolicyAllowsGrading(p: Person, a: Assignment) {\n p in a.associated_with.assistant or p in a.associated_with.instructor\n}\n\n// Assert NoOneCanGradeTheirOwnAssignment checks that no Person can grade their own Assignment.\nassert NoOneCanGradeTheirOwnAssignment {\n all p : Person, a : Assignment |\n PolicyAllowsGrading[p, a] implies not p in a.assigned_to\n}\n\ncheck NoOneCanGradeTheirOwnAssignment for 2", "permalink": "paging-rice-agile-supper", "time": "2024-12-21 08:51:50.537470", "cmd": 1} {"id": 27605, "parent": 6737, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {all a : Assignment | one a.associated_with}\n\n// Predicate PolicyAllowsGrading defines the policy for allowing grading of an Assignment by a Person.\npred PolicyAllowsGrading(p: Person, a: Assignment) {\n p in a.associated_with.assistant or p in a.associated_with.instructor\n}\n\n// Assert NoOneCanGradeTheirOwnAssignment checks that no Person can grade their own Assignment.\nassert NoOneCanGradeTheirOwnAssignment {\n all p : Person, a : Assignment |\n PolicyAllowsGrading[p, a] implies not p in a.assigned_to\n}\n\ncheck NoOneCanGradeTheirOwnAssignment for 2", "permalink": "cocoa-edge-rubbed-omit", "time": "2024-11-26 08:53:51.122240", "cmd": 1} {"id": 20311, "parent": 6737, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {all a : Assignment | one a.associated_with}\n\n// Predicate PolicyAllowsGrading defines the policy for allowing grading of an Assignment by a Person.\npred PolicyAllowsGrading(p: Person, a: Assignment) {\n p in a.associated_with.assistant or p in a.associated_with.instructor\n}\n\n// Assert NoOneCanGradeTheirOwnAssignment checks that no Person can grade their own Assignment.\nassert NoOneCanGradeTheirOwnAssignment {\n all p : Person, a : Assignment |\n PolicyAllowsGrading[p, a] implies not p in a.assigned_to\n}\n\ncheck NoOneCanGradeTheirOwnAssignment for 2", "permalink": "resend-rack-chaste-stoke", "time": "2024-10-24 10:55:15.769823", "cmd": 1} {"id": 27604, "parent": 6739, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\nrun {}", "permalink": "book-wimp-ditto-sporty", "time": "2024-11-26 08:45:28.403078", "cmd": 1} {"id": 29900, "parent": 6739, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\nrun {}", "permalink": "giggly-recall-unwell-anyone", "time": "2024-12-20 05:59:05.424014", "cmd": 1} {"id": 28854, "parent": 28853, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\nrun {}", "permalink": "tall-disk-frame-old", "time": "2024-12-16 07:02:24.448606", "cmd": 1} {"id": 28853, "parent": 6739, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\nrun {}", "permalink": "headed-mouse-fancy-ritzy", "time": "2024-12-16 07:01:17.441672", "cmd": 1} {"id": 30033, "parent": 6739, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\nrun {}", "permalink": "gills-half-defeat-roving", "time": "2024-12-21 08:30:25.468598", "cmd": 1} {"id": 23101, "parent": 6739, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\nrun {}", "permalink": "sizzle-lazily-brick-pupil", "time": "2024-11-13 04:18:48.020002", "cmd": 1} {"id": 30034, "parent": 30033, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\nrun {}", "permalink": "dupe-attire-matrix-rely", "time": "2024-12-21 08:30:29.202606", "cmd": 1} {"id": 23100, "parent": 6741, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n\nrun {}", "permalink": "legal-onward-paced-cover", "time": "2024-11-13 04:17:33.082466", "cmd": 1} {"id": 20305, "parent": 6741, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n\nrun {}", "permalink": "denial-defame-pellet-rally", "time": "2024-10-23 16:28:39.557297", "cmd": 1} {"id": 23645, "parent": 23644, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n\nrun {}", "permalink": "talcum-tissue-douche-tanned", "time": "2024-11-17 15:34:50.633429", "cmd": 1} {"id": 20312, "parent": 6741, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n\nrun {}", "permalink": "urban-sheep-aging-during", "time": "2024-10-24 11:15:46.059341", "cmd": 1} {"id": 23099, "parent": 6741, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n\nrun {}", "permalink": "compel-drum-clutch-trend", "time": "2024-11-13 04:12:01.513768", "cmd": 1} {"id": 23644, "parent": 6741, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n\nrun {}", "permalink": "curse-reword-blot-junior", "time": "2024-11-17 15:34:44.105373", "cmd": 1} {"id": 27986, "parent": 27985, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "deceit-jiffy-joyous-petite", "time": "2024-12-06 11:05:53.539390", "cmd": 1} {"id": 27987, "parent": 27986, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "turret-refute-doze-motion", "time": "2024-12-06 11:05:54.374764", "cmd": 1} {"id": 29147, "parent": 6744, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "yam-dollop-dupe-catsup", "time": "2024-12-18 06:43:57.275983", "cmd": 1} {"id": 29059, "parent": 6744, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "petty-nimbly-facing-palace", "time": "2024-12-17 07:13:34.173185", "cmd": 1} {"id": 27991, "parent": 27990, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "crepe-that-mom-relic", "time": "2024-12-06 11:06:52.613510", "cmd": 1} {"id": 27968, "parent": 27967, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "embark-chive-clover-series", "time": "2024-12-06 10:44:26.452983", "cmd": 1} {"id": 28818, "parent": 6744, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "spout-lesser-navy-malt", "time": "2024-12-15 11:16:39.043243", "cmd": 1} {"id": 27606, "parent": 6744, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "wound-lunacy-grape-grab", "time": "2024-11-26 09:02:34.592753", "cmd": 1} {"id": 23103, "parent": 6744, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "dude-luxury-lance-mobile", "time": "2024-11-13 04:42:36.040079", "cmd": 1} {"id": 28988, "parent": 6744, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "justly-defuse-cache-rival", "time": "2024-12-16 14:14:51.186973", "cmd": 1} {"id": 27969, "parent": 27968, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "gorged-wiry-boney-curler", "time": "2024-12-06 10:44:29.273435", "cmd": 1} {"id": 27971, "parent": 27970, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "friend-exile-sedate-ether", "time": "2024-12-06 10:44:30.403444", "cmd": 1} {"id": 29993, "parent": 29992, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "halved-gently-chill-avoid", "time": "2024-12-20 11:27:11.612811", "cmd": 1} {"id": 27982, "parent": 6744, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "voting-dimple-senior-neatly", "time": "2024-12-06 11:05:31.277884", "cmd": 1} {"id": 27985, "parent": 27982, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "siren-sloped-hertz-cake", "time": "2024-12-06 11:05:41.255147", "cmd": 1} {"id": 29983, "parent": 29982, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "outing-bakery-hardy-lazy", "time": "2024-12-20 11:19:05.569146", "cmd": 1} {"id": 29329, "parent": 6744, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "unsaid-gerbil-basin-easing", "time": "2024-12-19 06:21:27.308951", "cmd": 1} {"id": 27995, "parent": 27994, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "gulf-oxford-retail-purist", "time": "2024-12-06 11:06:57.741427", "cmd": 1} {"id": 27992, "parent": 27991, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "alone-pauper-cradle-womb", "time": "2024-12-06 11:06:53.512058", "cmd": 1} {"id": 29977, "parent": 29976, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "cringe-sage-thirty-donut", "time": "2024-12-20 11:18:39.023453", "cmd": 1} {"id": 29330, "parent": 29329, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "plod-tall-preppy-supply", "time": "2024-12-19 06:21:44.401474", "cmd": 1} {"id": 29331, "parent": 29330, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "haven-chili-stomp-wiry", "time": "2024-12-19 06:26:20.723829", "cmd": 1} {"id": 30121, "parent": 30119, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "aspire-kitten-luster-cloak", "time": "2024-12-22 17:57:41.357508", "cmd": 1} {"id": 30134, "parent": 30133, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "scrap-penpal-scroll-yonder", "time": "2024-12-22 18:25:32.028860", "cmd": 1} {"id": 29992, "parent": 29991, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "gauze-truth-wildly-apple", "time": "2024-12-20 11:26:17.599055", "cmd": 1} {"id": 29978, "parent": 29977, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "choice-halved-mauve-buzz", "time": "2024-12-20 11:18:41.922995", "cmd": 1} {"id": 27993, "parent": 27992, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "frisk-curler-wharf-gnat", "time": "2024-12-06 11:06:54.133626", "cmd": 1} {"id": 27994, "parent": 27993, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "guise-cherub-sample-cacti", "time": "2024-12-06 11:06:57.089236", "cmd": 1} {"id": 27810, "parent": 6744, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "rosy-kindly-traps-repeal", "time": "2024-12-03 08:21:16.576949", "cmd": 1} {"id": 27809, "parent": 6744, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "why-corny-diaper-avid", "time": "2024-12-03 07:46:42.813246", "cmd": 1} {"id": 27637, "parent": 6744, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "curtly-haunt-train-case", "time": "2024-11-26 09:42:24.385777", "cmd": 1} {"id": 27967, "parent": 6744, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "copier-afraid-fog-flier", "time": "2024-12-06 10:44:02.172850", "cmd": 1} {"id": 27990, "parent": 27987, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "boozy-muster-affirm-lilac", "time": "2024-12-06 11:06:50.563162", "cmd": 1} {"id": 28003, "parent": 6744, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "banter-lyrics-friend-afloat", "time": "2024-12-06 11:13:02.771539", "cmd": 1} {"id": 27970, "parent": 27969, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "remake-yeah-neuter-volley", "time": "2024-12-06 10:44:29.802141", "cmd": 1} {"id": 23104, "parent": 6959, "code": "one sig List { \n header: lone Node,\n size : Int\n} \n\nsig Node {\n link: lone Node \n}\n\nfact sizeOk {\n List.size = #List.header.*link \n}\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3", "permalink": "blurb-idiocy-mule-palace", "time": "2024-11-13 04:53:31.770113", "cmd": 1} {"id": 22856, "parent": 6959, "code": "one sig List { \n header: lone Node,\n size : Int\n} \n\nsig Node {\n link: lone Node \n}\n\nfact sizeOk {\n List.size = #List.header.*link \n}\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3", "permalink": "cycle-fever-frayed-able", "time": "2024-11-10 11:38:34.120406", "cmd": 1} {"id": 29062, "parent": 29061, "code": "one sig List { \n header: lone Node,\n} \n\nsig Node {\n link: lone Node,\n elem : Int\n}\n\nfact ordered {\n all n : Node | \n some n.link implies \n n.elem < n.link.elem\n}\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3", "permalink": "salad-tamper-dance-genre", "time": "2024-12-17 07:25:09.353427", "cmd": 1} {"id": 29011, "parent": null, "code": "one sig List { \n header: lone Node,\n} \n\nsig Node {\n link: lone Node,\n elem : Int\n}\n\nfact ordered {\n all n : Node | \n some n.link implies \n n.elem < n.link.elem\n}\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3", "permalink": "flail-throat-deuce-magma", "time": "2024-12-16 16:51:15.486595", "cmd": 1} {"id": 29012, "parent": 6965, "code": "one sig List { \n header: lone Node,\n} \n\nsig Node {\n link: lone Node,\n elem : Int\n}\n\nfact ordered {\n all n : Node | \n some n.link implies \n n.elem < n.link.elem\n}\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3", "permalink": "scoop-lure-slush-latter", "time": "2024-12-16 17:23:22.674928", "cmd": 1} {"id": 23067, "parent": 23066, "code": "one sig List { \n header: lone Node,\n} \n\nsig Node {\n link: lone Node,\n elem : Int\n}\n\nfact ordered {\n all n : Node | \n some n.link implies \n n.elem < n.link.elem\n}\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3", "permalink": "chop-docile-eating-specks", "time": "2024-11-12 09:28:26.233684", "cmd": 1} {"id": 29333, "parent": 6965, "code": "one sig List { \n header: lone Node,\n} \n\nsig Node {\n link: lone Node,\n elem : Int\n}\n\nfact ordered {\n all n : Node | \n some n.link implies \n n.elem < n.link.elem\n}\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3", "permalink": "wharf-gusto-human-fiddle", "time": "2024-12-19 06:37:58.270946", "cmd": 1} {"id": 29563, "parent": 29561, "code": "one sig List { \n header: lone Node,\n} \n\nsig Node {\n link: lone Node,\n elem : Int\n}\n\nfact ordered {\n all n : Node | \n some n.link implies \n n.elem < n.link.elem\n}\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3", "permalink": "slush-versus-giggle-think", "time": "2024-12-19 12:56:30.274551", "cmd": 1} {"id": 29564, "parent": 29563, "code": "one sig List { \n header: lone Node,\n} \n\nsig Node {\n link: lone Node,\n elem : Int\n}\n\nfact ordered {\n all n : Node | \n some n.link implies \n n.elem < n.link.elem\n}\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3", "permalink": "puma-lens-flying-mousy", "time": "2024-12-19 12:56:31.624662", "cmd": 1} {"id": 29565, "parent": 29564, "code": "one sig List { \n header: lone Node,\n} \n\nsig Node {\n link: lone Node,\n elem : Int\n}\n\nfact ordered {\n all n : Node | \n some n.link implies \n n.elem < n.link.elem\n}\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3", "permalink": "diaper-equate-rubble-gangly", "time": "2024-12-19 12:56:33.369000", "cmd": 1} {"id": 23065, "parent": 6965, "code": "one sig List { \n header: lone Node,\n} \n\nsig Node {\n link: lone Node,\n elem : Int\n}\n\nfact ordered {\n all n : Node | \n some n.link implies \n n.elem < n.link.elem\n}\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3", "permalink": "filled-icky-garter-grope", "time": "2024-11-12 09:28:22.282825", "cmd": 1} {"id": 23066, "parent": 23065, "code": "one sig List { \n header: lone Node,\n} \n\nsig Node {\n link: lone Node,\n elem : Int\n}\n\nfact ordered {\n all n : Node | \n some n.link implies \n n.elem < n.link.elem\n}\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3", "permalink": "citric-mocha-player-wifi", "time": "2024-11-12 09:28:24.650292", "cmd": 1} {"id": 28819, "parent": 6977, "code": "one sig List {\n header: lone Node \n} \nsig Node {\n link: lone Node \n}\nfact noDanglingNodes {\n Node in List.header.*link\n}\n\nrun { all n : List.header.*link | no n.link } for 3", "permalink": "hence-badass-juggle-truce", "time": "2024-12-15 11:42:00.455158", "cmd": 1} {"id": 28820, "parent": 28819, "code": "one sig List {\n header: lone Node \n} \nsig Node {\n link: lone Node \n}\nfact noDanglingNodes {\n Node in List.header.*link\n}\n\nrun { all n : List.header.*link | no n.link } for 3", "permalink": "module-size-stooge-pout", "time": "2024-12-15 11:42:21.962694", "cmd": 1} {"id": 28822, "parent": 28821, "code": "one sig List {\n header: lone Node \n} \nsig Node {\n link: lone Node \n}\nfact noDanglingNodes {\n Node in List.header.*link\n}\n\nrun { some n : List.header.*link | no n.link } for 3", "permalink": "issue-trend-unsaid-ignore", "time": "2024-12-15 11:43:51.125942", "cmd": 1} {"id": 28821, "parent": 6979, "code": "one sig List {\n header: lone Node \n} \nsig Node {\n link: lone Node \n}\nfact noDanglingNodes {\n Node in List.header.*link\n}\n\nrun { no n : List.header.*link | no n.link } for 3", "permalink": "usable-motion-verify-bonus", "time": "2024-12-15 11:43:34.699905", "cmd": 1} {"id": 27831, "parent": null, "code": "one sig List {\n header: lone Node \n} \nsig Node {\n link: lone Node \n}\nfact noDanglingNodes {\n Node in List.header.*link\n}\n\nrun { lone n : List.header.*link | no n.link } for 3", "permalink": "freely-swung-icy-absurd", "time": "2024-12-03 19:35:56.256267", "cmd": 1} {"id": 28827, "parent": 28826, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n //no List.header or some n : List.header.*link | no n.link\n some n : List.header.*link | no n.link\n}\nrun acyclic for 3", "permalink": "septum-turkey-jovial-woozy", "time": "2024-12-15 11:50:36.109401", "cmd": 1} {"id": 28825, "parent": 6983, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n //no List.header or some n : List.header.*link | no n.link\n some n : List.header.*link | no n.link\n}\nrun acyclic for 1", "permalink": "pesky-baggy-obtain-stride", "time": "2024-12-15 11:49:56.987497", "cmd": 1} {"id": 29963, "parent": 6983, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n //no List.header or some n : List.header.*link | no n.link\n some n : List.header.*link | no n.link\n}\nrun acyclic for 1", "permalink": "silver-droop-dotted-revert", "time": "2024-12-20 07:41:58.995739", "cmd": 1} {"id": 29151, "parent": 29150, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n //no List.header or some n : List.header.*link | no n.link\n some n : List.header.*link | no n.link\n}\nrun acyclic for 1", "permalink": "camera-lunacy-worst-polio", "time": "2024-12-18 07:08:30.779729", "cmd": 1} {"id": 28826, "parent": 28825, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n //no List.header or some n : List.header.*link | no n.link\n some n : List.header.*link | no n.link\n}\nrun acyclic for 1", "permalink": "foam-tartar-shell-whinny", "time": "2024-12-15 11:50:30.477319", "cmd": 1} {"id": 28322, "parent": 6983, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n //no List.header or some n : List.header.*link | no n.link\n some n : List.header.*link | no n.link\n}\nrun acyclic for 1", "permalink": "twins-petite-map-flail", "time": "2024-12-10 08:25:50.131175", "cmd": 1} {"id": 29149, "parent": 6983, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n //no List.header or some n : List.header.*link | no n.link\n some n : List.header.*link | no n.link\n}\nrun acyclic for 1", "permalink": "trial-blot-slang-watch", "time": "2024-12-18 07:08:26.173406", "cmd": 1} {"id": 29068, "parent": 6983, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n //no List.header or some n : List.header.*link | no n.link\n some n : List.header.*link | no n.link\n}\nrun acyclic for 1", "permalink": "cider-bunt-given-thrill", "time": "2024-12-17 07:49:23.615617", "cmd": 1} {"id": 29152, "parent": 29151, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n //no List.header or some n : List.header.*link | no n.link\n some n : List.header.*link | no n.link\n}\nrun acyclic for 1", "permalink": "wand-entrap-prance-gusto", "time": "2024-12-18 07:08:42.141533", "cmd": 1} {"id": 29964, "parent": 29963, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n //no List.header or some n : List.header.*link | no n.link\n some n : List.header.*link | no n.link\n}\nrun acyclic for 1", "permalink": "snugly-cannot-grudge-haiku", "time": "2024-12-20 07:42:01.644521", "cmd": 1} {"id": 29150, "parent": 29149, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n //no List.header or some n : List.header.*link | no n.link\n some n : List.header.*link | no n.link\n}\nrun acyclic for 1", "permalink": "gravy-hate-spinal-briar", "time": "2024-12-18 07:08:29.377985", "cmd": 1} {"id": 29297, "parent": 6990, "code": "one sig List { header : lone Node }\nsig Node { link : lone Node }\npred Acyclic {\n no List.header or some n : List.header.*link | no n.link\n}\nassert links_equal_size { Acyclic => #List.header.^link = #link }\ncheck links_equal_size ", "permalink": "phoney-crepe-stylus-siding", "time": "2024-12-18 17:45:25.069132", "cmd": 1} {"id": 29623, "parent": 6990, "code": "one sig List { header : lone Node }\nsig Node { link : lone Node }\npred Acyclic {\n no List.header or some n : List.header.*link | no n.link\n}\nassert links_equal_size { Acyclic => #List.header.^link = #link }\ncheck links_equal_size ", "permalink": "ascend-unsnap-poem-shanty", "time": "2024-12-19 13:33:41.025273", "cmd": 1} {"id": 29625, "parent": 29624, "code": "one sig List { header : lone Node }\nsig Node { link : lone Node }\npred Acyclic {\n no List.header or some n : List.header.*link | no n.link\n}\nassert links_equal_size { Acyclic => #List.header.^link = #link }\ncheck links_equal_size ", "permalink": "drippy-golf-absurd-baggy", "time": "2024-12-19 13:34:00.592644", "cmd": 1} {"id": 29063, "parent": 6990, "code": "one sig List { header : lone Node }\nsig Node { link : lone Node }\npred Acyclic {\n no List.header or some n : List.header.*link | no n.link\n}\nassert links_equal_size { Acyclic => #List.header.^link = #link }\ncheck links_equal_size ", "permalink": "trump-bogus-unison-anyhow", "time": "2024-12-17 07:26:34.261734", "cmd": 1} {"id": 29627, "parent": 29625, "code": "one sig List { header : lone Node }\nsig Node { link : lone Node }\npred Acyclic {\n no List.header or some n : List.header.*link | no n.link\n}\nassert links_equal_size { Acyclic => #List.header.^link = #link }\ncheck links_equal_size ", "permalink": "harbor-even-pasta-tutor", "time": "2024-12-19 13:34:37.724821", "cmd": 1} {"id": 29624, "parent": 29623, "code": "one sig List { header : lone Node }\nsig Node { link : lone Node }\npred Acyclic {\n no List.header or some n : List.header.*link | no n.link\n}\nassert links_equal_size { Acyclic => #List.header.^link = #link }\ncheck links_equal_size ", "permalink": "dating-lather-pleat-retold", "time": "2024-12-19 13:33:58.709903", "cmd": 1} {"id": 27825, "parent": 7001, "code": "sig Guest {}\nsig Drunk in Guest {}\n\npred drinkers {\n some x : Guest |\n (x in Drunk implies \n all y : Guest | y in Drunk)\n}\n\nrun drinkers for 5", "permalink": "molar-harbor-pulp-cactus", "time": "2024-12-03 09:41:34.084763", "cmd": 1} {"id": 28321, "parent": 7001, "code": "sig Guest {}\nsig Drunk in Guest {}\n\npred drinkers {\n some x : Guest |\n (x in Drunk implies \n all y : Guest | y in Drunk)\n}\n\nrun drinkers for 5", "permalink": "spilt-share-daisy-yield", "time": "2024-12-10 08:20:57.061143", "cmd": 1} {"id": 28326, "parent": 28321, "code": "sig Guest {}\nsig Drunk in Guest {}\n\npred drinkers {\n some x : Guest |\n (x in Drunk implies \n all y : Guest | y in Drunk)\n}\n\nrun drinkers for 5", "permalink": "depict-curse-lure-rants", "time": "2024-12-10 08:33:05.628562", "cmd": 1} {"id": 28856, "parent": 28855, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\nrun {} for 2", "permalink": "only-gooey-latter-choosy", "time": "2024-12-16 07:09:03.118088", "cmd": 1} {"id": 28024, "parent": 7058, "code": "/* Create an Alloy model for a scenario of your choice. \n* Declare at least 4 signatures each with at least 2 \n fields. \n* Use inheritance between signatures at least once.\n* Define at least 2 facts and 2 predicates.\n* Add two run commands to your model.\n * The first run command should be unsatisfiable.\n * The second run command should be satisfiable \n and return at least 2 instances.\n*/\n\n\nrun {}", "permalink": "buggy-boring-hacker-marine", "time": "2024-12-07 10:59:15.184340", "cmd": 1} {"id": 28461, "parent": 7069, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "gluten-fog-ruse-photo", "time": "2024-12-12 11:48:48.175521", "cmd": 1} {"id": 28037, "parent": 28036, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "oval-nearly-zippy-crimp", "time": "2024-12-08 10:11:50.091592", "cmd": 1} {"id": 28036, "parent": 7069, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "define-ritzy-shirt-silo", "time": "2024-12-08 10:11:46.222415", "cmd": 1} {"id": 28519, "parent": 7069, "code": "abstract sig Person {\n killed: set Person,\n hates: set Person,\n richer: set Person\n}\none sig Agatha, Butler, Charles extends Person {}\n\npred puzzle {\n // TODO Implement the constraints here\n}\n\nrun puzzle", "permalink": "dork-pretty-stoke-romp", "time": "2024-12-12 12:50:42.317415", "cmd": 1} {"id": 28073, "parent": 7297, "code": "/**\n * A simple model of a file system trash can.\n * \n * Encode the follwing example invariants in their \n * predicates. Do not change any other code.\n **/\n\n/* The set of files in the file system. */\nsig File {\n \t/* A file is potentially a link to other files. */\n\tlink : set File\n}\n/* The set of files in the trash. */\nsig Trash in File {}\n/* The set of protected files. */\nsig Protected in File {}\n\n/* TASKS \n* *******\n*/\n\n/* The trash is empty. */\npred inv1 {\n // TODO\n no Trash\n}\n\nrun inv1\n\n/* All files are deleted. */\npred inv2 {\n // TODO\n}\n\nrun inv2\n\n/* Some file is deleted. */\npred inv3 {\n // TODO\n}\n\nrun inv3\n\n/* Protected files cannot be deleted. */\npred inv4 {\n // TODO\n}\n\nrun inv4\n\n/* All unprotected files are deleted. */\npred inv5 {\n // TODO\n}\n\nrun inv5\n\n/* A file links to at most one file. */\npred inv6 {\n // TODO\n}\n\nrun inv6\n\n/* No linked file is deleted. */\npred inv7 {\n // TODO\n}\n\nrun inv7\n\n/* There are no links. */\npred inv8 {\n // TODO\n}\n\nrun inv8\n\n/* A link does not link to another link. */\npred inv9 {\n // TODO\n}\n\nrun inv9\n\n/* If a link is deleted, so is the file it links to. */\npred inv10 {\n // TODO\n}\n\nrun inv10", "permalink": "impose-silk-tumble-salsa", "time": "2024-12-08 11:50:03.542484", "cmd": 1} {"id": 28332, "parent": 7854, "code": "sig Bidder {\n val: Int,\n bid: some Int,\n u: some Int,\n w: Int\n}\nfact constr {\n all p: Bidder |\n int [p.w] >= 0 and int [p.w] =< 1\n and int[p.bid]>=0 and int[p.bid]=<50\n and int[p.val]>=0 and int[p.val]=<50\n}\n\npred wda(p1,p2,p1_p,p2_p:Bidder) {\n memcp[p1,p1_p]\n memcp[p2,p2_p]\n let x1=p1.bid, x2=p2.bid |\n (int[x1] >= int[x2] ) =>\n int p1_p.u=int[p1.val]-int[x2]\n and int[p2_p.u] = 0\n and int[p1_p.w]=1 and int[p2_p.w]=0\n else (\n int[p2_p.u]=int[p2.val]-int[x1]\n and int[p1_p.u] = 0\n and int[p1_p.w]=0 && int[p2_p.w]=1 )\n}\n\npred memcp (p1, p1_p: Bidder) {\n p1_p.bid=p1.bid and p1_p.val=p1.val\n}\n\nassert winIsHighBidder {\n all p1,p1_p,p2,p2_p:Bidder {\n wda[p1,p2,p1_p,p2_p] && int[p1_p.w] = 1\n => int[p1_p.bid] >= int[p2_p.bid]}\n}\nassert isDSE {\n all p1,p2,p2t,p1s:Bidder,\n p1_p,p2_p,p2t_p,p1s_p:Bidder {\n p1s.bid=p1s.val && p1s.val=p1.val\n && p2t.val=p2.val && p2t.bid=p2.bid\n && wda[p1,p2,p1_p,p2_p]\n && wda[p1s, p2t,p1s_p,p2t_p]\n => int[p1s_p.u] >= int[p1_p.u]}\n}\n\ncheck isDSE for 50 but 4 Bidder\n\ncheck winIsHighBidder for 4 but 2 Bidder", "permalink": "atop-repent-claim-zippy", "time": "2024-12-10 08:49:02.082264", "cmd": 1} {"id": 27807, "parent": 27806, "code": "sig Bidder {\n val: Int,\n bid: some Int,\n u: some Int,\n w: Int\n}\nfact constr {\n all p: Bidder |\n int [p.w] >= 0 and int [p.w] =< 1\n and int[p.bid]>=0 and int[p.bid]=<50\n and int[p.val]>=0 and int[p.val]=<50\n}\n\npred wda(p1,p2,p1_p,p2_p:Bidder) {\n memcp[p1,p1_p]\n memcp[p2,p2_p]\n let x1=p1.bid, x2=p2.bid |\n (int[x1] >= int[x2] ) =>\n int p1_p.u=int[p1.val]-int[x2]\n and int[p2_p.u] = 0\n and int[p1_p.w]=1 and int[p2_p.w]=0\n else (\n int[p2_p.u]=int[p2.val]-int[x1]\n and int[p1_p.u] = 0\n and int[p1_p.w]=0 && int[p2_p.w]=1 )\n}\n\npred memcp (p1, p1_p: Bidder) {\n p1_p.bid=p1.bid and p1_p.val=p1.val\n}\n\nassert winIsHighBidder {\n all p1,p1_p,p2,p2_p:Bidder {\n wda[p1,p2,p1_p,p2_p] && int[p1_p.w] = 1\n => int[p1_p.bid] >= int[p2_p.bid]}\n}\nassert isDSE {\n all p1,p2,p2t,p1s:Bidder,\n p1_p,p2_p,p2t_p,p1s_p:Bidder {\n p1s.bid=p1s.val && p1s.val=p1.val\n && p2t.val=p2.val && p2t.bid=p2.bid\n && wda[p1,p2,p1_p,p2_p]\n && wda[p1s, p2t,p1s_p,p2t_p]\n => int[p1s_p.u] >= int[p1_p.u]}\n}\n\ncheck isDSE for 50 but 4 Bidder\n\ncheck winIsHighBidder for 4 but 2 Bidder", "permalink": "unit-stooge-shine-rigor", "time": "2024-12-02 20:04:29.550279", "cmd": 2} {"id": 27806, "parent": 7854, "code": "sig Bidder {\n val: Int,\n bid: some Int,\n u: some Int,\n w: Int\n}\nfact constr {\n all p: Bidder |\n int [p.w] >= 0 and int [p.w] =< 1\n and int[p.bid]>=0 and int[p.bid]=<50\n and int[p.val]>=0 and int[p.val]=<50\n}\n\npred wda(p1,p2,p1_p,p2_p:Bidder) {\n memcp[p1,p1_p]\n memcp[p2,p2_p]\n let x1=p1.bid, x2=p2.bid |\n (int[x1] >= int[x2] ) =>\n int p1_p.u=int[p1.val]-int[x2]\n and int[p2_p.u] = 0\n and int[p1_p.w]=1 and int[p2_p.w]=0\n else (\n int[p2_p.u]=int[p2.val]-int[x1]\n and int[p1_p.u] = 0\n and int[p1_p.w]=0 && int[p2_p.w]=1 )\n}\n\npred memcp (p1, p1_p: Bidder) {\n p1_p.bid=p1.bid and p1_p.val=p1.val\n}\n\nassert winIsHighBidder {\n all p1,p1_p,p2,p2_p:Bidder {\n wda[p1,p2,p1_p,p2_p] && int[p1_p.w] = 1\n => int[p1_p.bid] >= int[p2_p.bid]}\n}\nassert isDSE {\n all p1,p2,p2t,p1s:Bidder,\n p1_p,p2_p,p2t_p,p1s_p:Bidder {\n p1s.bid=p1s.val && p1s.val=p1.val\n && p2t.val=p2.val && p2t.bid=p2.bid\n && wda[p1,p2,p1_p,p2_p]\n && wda[p1s, p2t,p1s_p,p2t_p]\n => int[p1s_p.u] >= int[p1_p.u]}\n}\n\ncheck isDSE for 50 but 4 Bidder\n\ncheck winIsHighBidder for 4 but 2 Bidder", "permalink": "legged-spiny-ranged-cling", "time": "2024-12-02 20:04:13.348187", "cmd": 1} {"id": 28334, "parent": 28333, "code": "module examples/case_studies/chord\n\n/*\n * Models the chord distributed hash table lookup protocol.\n *\n * For a detailed description, see:\n * https://pdos.csail.mit.edu/papers/ton:chord/paper-ton.pdf or\n * http://www.pdos.lcs.mit.edu/papers/chord:sigcomm01/ - dead link 20191012\n */\n\nopen util/relation as rel\n\nsig Id {next: Id}\nfact {all i: Id | Id in i.*next}\n\n/**\n * true iff i precedes j in the order starting at from\n */\npred less_than [from, i,j: Id] {\n let next\" = Id<:next - (Id->from) | j in i.^next\" // if from=j, returns true if # nodes > 1\n }\npred less_than_eq [from, i,j: Id] {\n let next\" = Id<:next - (Id->from) | j in i.*next\"\n }\n\nsig Node {id: Id}\nfact {all m,n: Node | m!=n => m.id != n.id}\n\n\nsig NodeData {\n prev, next: Node,\n finger: Id -> lone Node,\n closest_preceding_finger: Id -> one Node,\n find_predecessor: Id -> one Node,\n find_successor: Id -> one Node\n }\n\nsig State {\n active: set Node,\n data: active -> one NodeData\n }\n\n/**\n * node n's next node is defined to be the m where n's finger table maps the id\n * that follows n.id to m\n * next holds the first entry of the finger table\n */\nfact {all s: State | all n: s.active | n.(s.data).next = n.(s.data).finger[n.id.next]}\n\npred NextCorrect [s: State] {\n all n: s.active {\n -- no intervening node (ie, close enough)\n no n\": s.active - n | less_than [n.id, n\".id, n.(s.data).next.id]\n -- can reach all other active nodes (ie, far enough)\n -- need this because can't rule out case of next being node itself (because of 1-node ring)\n -- s.active in n.*(s.data.next)\n n.(s.data).next != n || #s.active = 1\n }\n }\n\npred NextCorrect\" [s: State] {\n-- next seems to be correct for 1,2,3 nodes\n all n: s.active | let nd = (s.data)[n] {\n let next\" = Id<:next - (Id -> nd.next.id) {\n no n\" : s.active { n\".id in n.id.^next\" }\n }}\n }\n\n// valid\nassert Same1 {all s: State | NextCorrect[s] => NextCorrect\"[s]}\ncheck Same1 for 3 but 1 State expect 0\n\n// valid unless active condition removed\nassert Same2 {all s: State | s.active = Node => (NextCorrect\"[s] => NextCorrect[s])}\ncheck Same2 for 3 but 1 State expect 0\n\n-- assert NextInFinger {all s: State | all n: s.active | some n.s.data.finger[n.id.next] }\n\n\n-- says that finger entry maps an id to a node so that there are no intervening nodes\n-- between the id and the node\npred FingersCorrect [s: State] {\n all nd: s.active.(s.data) | all start:nd.finger.univ |\n nd.finger[start] in s.active &&\n (no n\" : s.active | less_than [start, n\".id, nd.finger[start].id])\n }\n\n\npred FingersCorrect\" [s: State] {\n all n: s.active | let nd = (s.data)[n] | all start: Node.~(nd.finger) {\n nd.finger[start] in s.active &&\n (let next\" = Id<:next - (nd.finger[start].id -> Id) {\n no n\" : s.active - nd.finger[start] {\n n\".id in start.*next\"\n }\n })\n }\n }\n\n\nassert SameFC {all s: State | FingersCorrect [s] iff FingersCorrect\"[s]}\ncheck SameFC for 3 but 1 State expect 0\n\n\npred ShowMeFC {\n all s : State | s.active = Node && FingersCorrect[s]\n}\n\nrun ShowMeFC for 2 but 1 State expect 1\n\npred ClosestPrecedingFinger[s: State] {\n all n: s.active | let nd = n.(s.data) |\n all i: Id | let cpf = nd.closest_preceding_finger[i] {\n no n\": nd.finger[Id] + n - cpf | less_than [cpf.id, n\".id, i]\n cpf in nd.finger[Id] + n\n cpf.id != i || # s.active = 1\n //less_than (n.id, cpf.id, i)\n }\n }\n\n\npred ClosestPrecedingFinger\"[s: State] {\n all n: s.active | let nd = (s.data)[n] | all i: Id {\n let next\" = Id<:next - (Id -> i) {\n nd.next.id in n.id.^next\" =>\n // nd.closest_preceding_finger[i] = nd.next,\n (some n1: nd.finger[Id] {\n nd.closest_preceding_finger[i] = n1\n //n1 in nd.finger[Id]\n n1.id in n.id.^next\"\n no n2: nd.finger[Id] | n2.id in n1.id.^next\"\n }) else\n nd.closest_preceding_finger[i] = n\n }}\n }\n\n\nassert SameCPF {all s: State | FingersCorrect[s] => (ClosestPrecedingFinger [s] iff ClosestPrecedingFinger\" [s])}\nassert SameCPF1 {all s: State | FingersCorrect[s] => (ClosestPrecedingFinger [s] => ClosestPrecedingFinger\" [s])}\nassert SameCPF2 {\n all s: State | ((s.active = Node && FingersCorrect[s] && ClosestPrecedingFinger\" [s])\n => ClosestPrecedingFinger [s]) }\n\ncheck SameCPF for 3 but 1 State expect 0\ncheck SameCPF1 for 2 but 1 State expect 0\ncheck SameCPF2 for 3 but 1 State expect 0\n\n\npred ShowMeCPF {\n all s : State | s.active = Node && FingersCorrect[s] &&\n // not ClosestPrecedingFinger(s) && ClosestPrecedingFinger\"(s)\n ClosestPrecedingFinger[s]\n //all s : State | all nd : s.active.s.data | nd.finger[Id] = Node\n # Node = 2\n # State = 1\n}\n\n\nrun ShowMeCPF for 2 but 1 State expect 1\n\n\npred FindPredecessor[s: State] {\n all n: s.active | let nd = n.(s.data) | all i: Id {\n nd.find_predecessor[i] =\n (less_than_eq [n.id, i, nd.next.id] && (n.id != i || # s.active = 1)\n => n\n else (nd.closest_preceding_finger[i].(s.data).find_predecessor)[i])\n }\n }\n\n\nassert FPisActive {\n all s: State | FingersCorrect[s] && ClosestPrecedingFinger[s] && FindPredecessor[s]\n => (all n: s.active | all nd: n.(s.data) | nd.find_predecessor[Id] in s.active) }\ncheck FPisActive for 3 but 1 State expect 1\n\n\npred FindPredecessor\"[s: State] {\n all n: s.active | let nd = (s.data)[n] | all i: Id {\n let next\" = Id<:next - (nd.next.id -> Id) {\n one s.active or i in n.id.^next\" => // *next\" -> ^next\" 1/8/02\n nd.find_predecessor[i] = n else\n nd.find_predecessor[i] =\n ((s.data)[nd.closest_preceding_finger[i]]).find_predecessor[i]\n }}\n }\n\n\nassert SameFP {all s: State | FingersCorrect[s] // && s.active = Node\n => (FindPredecessor [s] iff FindPredecessor\" [s])}\n\nassert SameFP1 {\n all s: State | FingersCorrect[s] && s.active = Node\n => (FindPredecessor [s] => FindPredecessor\" [s])}\nassert SameFP2 {\n all s: State | FingersCorrect[s] && s.active = Node\n => (FindPredecessor\" [s] => FindPredecessor [s])}\n\ncheck SameFP for 3 but 1 State expect 1\ncheck SameFP1 for 3 but 1 State expect 0\ncheck SameFP2 for 3 but 1 State expect 0\n\n\npred FindSuccessor[s: State] {\n all n: s.active | let nd = (s.data)[n] | all i: Id {\n nd.find_successor[i] = ((s.data)[nd.find_predecessor[i]]).next\n }}\n\n\n// should be able to check that closest_p_f, etc returns\n// only active nodes if FingersCorrect.\n\n\npred ShowMe1Node {\n #Node = 1\n all s : State | NextCorrect[s]\n State.active = Node\n}\n\nrun ShowMe1Node for 2 but 1 State, 1 Node expect 1\n\npred ShowMe1 {\n #Node = 2\n #State = 1\n all s : State | NextCorrect[s]\n State.active = Node\n}\n\n\npred ShowMe2 {\n #Node = 3\n #State = 1\n all s : State | NextCorrect[s] && FingersCorrect[s]\n State.active = Node\n //all n: NodeData | one n.finger[Id]\n}\n\n\nassert OK1 {\n #Node = 3 &&\n #State = 1 &&\n (all s : State | NextCorrect[s] && FingersCorrect[s]) &&\n State.active = Node\n}\n\n\nrun ShowMe1 for 3 expect 1\nrun ShowMe2 for 3 expect 1\n\nassert InjectiveIds {all i, j: Id | i!=j => i.next != j.next}\ncheck InjectiveIds for 5 expect 0\n\n\nassert FindSuccessorWorks {\n all s: State, i: Id |\n let nd = s.active.(s.data) |\n let succ = nd.find_successor [i] |\n FingersCorrect [s] // && s.active = Node\n => (no n\": s.active | less_than [i, n\".id, succ.id])\n }\ncheck FindSuccessorWorks for 3 but 1 State expect 1", "permalink": "wing-why-balmy-fled", "time": "2024-12-10 08:51:34.222398", "cmd": 4} {"id": 27805, "parent": 7855, "code": "module examples/case_studies/chord\n\n/*\n * Models the chord distributed hash table lookup protocol.\n *\n * For a detailed description, see:\n * https://pdos.csail.mit.edu/papers/ton:chord/paper-ton.pdf or\n * http://www.pdos.lcs.mit.edu/papers/chord:sigcomm01/ - dead link 20191012\n */\n\nopen util/relation as rel\n\nsig Id {next: Id}\nfact {all i: Id | Id in i.*next}\n\n/**\n * true iff i precedes j in the order starting at from\n */\npred less_than [from, i,j: Id] {\n let next\" = Id<:next - (Id->from) | j in i.^next\" // if from=j, returns true if # nodes > 1\n }\npred less_than_eq [from, i,j: Id] {\n let next\" = Id<:next - (Id->from) | j in i.*next\"\n }\n\nsig Node {id: Id}\nfact {all m,n: Node | m!=n => m.id != n.id}\n\n\nsig NodeData {\n prev, next: Node,\n finger: Id -> lone Node,\n closest_preceding_finger: Id -> one Node,\n find_predecessor: Id -> one Node,\n find_successor: Id -> one Node\n }\n\nsig State {\n active: set Node,\n data: active -> one NodeData\n }\n\n/**\n * node n's next node is defined to be the m where n's finger table maps the id\n * that follows n.id to m\n * next holds the first entry of the finger table\n */\nfact {all s: State | all n: s.active | n.(s.data).next = n.(s.data).finger[n.id.next]}\n\npred NextCorrect [s: State] {\n all n: s.active {\n -- no intervening node (ie, close enough)\n no n\": s.active - n | less_than [n.id, n\".id, n.(s.data).next.id]\n -- can reach all other active nodes (ie, far enough)\n -- need this because can't rule out case of next being node itself (because of 1-node ring)\n -- s.active in n.*(s.data.next)\n n.(s.data).next != n || #s.active = 1\n }\n }\n\npred NextCorrect\" [s: State] {\n-- next seems to be correct for 1,2,3 nodes\n all n: s.active | let nd = (s.data)[n] {\n let next\" = Id<:next - (Id -> nd.next.id) {\n no n\" : s.active { n\".id in n.id.^next\" }\n }}\n }\n\n// valid\nassert Same1 {all s: State | NextCorrect[s] => NextCorrect\"[s]}\ncheck Same1 for 3 but 1 State expect 0\n\n// valid unless active condition removed\nassert Same2 {all s: State | s.active = Node => (NextCorrect\"[s] => NextCorrect[s])}\ncheck Same2 for 3 but 1 State expect 0\n\n-- assert NextInFinger {all s: State | all n: s.active | some n.s.data.finger[n.id.next] }\n\n\n-- says that finger entry maps an id to a node so that there are no intervening nodes\n-- between the id and the node\npred FingersCorrect [s: State] {\n all nd: s.active.(s.data) | all start:nd.finger.univ |\n nd.finger[start] in s.active &&\n (no n\" : s.active | less_than [start, n\".id, nd.finger[start].id])\n }\n\n\npred FingersCorrect\" [s: State] {\n all n: s.active | let nd = (s.data)[n] | all start: Node.~(nd.finger) {\n nd.finger[start] in s.active &&\n (let next\" = Id<:next - (nd.finger[start].id -> Id) {\n no n\" : s.active - nd.finger[start] {\n n\".id in start.*next\"\n }\n })\n }\n }\n\n\nassert SameFC {all s: State | FingersCorrect [s] iff FingersCorrect\"[s]}\ncheck SameFC for 3 but 1 State expect 0\n\n\npred ShowMeFC {\n all s : State | s.active = Node && FingersCorrect[s]\n}\n\nrun ShowMeFC for 2 but 1 State expect 1\n\npred ClosestPrecedingFinger[s: State] {\n all n: s.active | let nd = n.(s.data) |\n all i: Id | let cpf = nd.closest_preceding_finger[i] {\n no n\": nd.finger[Id] + n - cpf | less_than [cpf.id, n\".id, i]\n cpf in nd.finger[Id] + n\n cpf.id != i || # s.active = 1\n //less_than (n.id, cpf.id, i)\n }\n }\n\n\npred ClosestPrecedingFinger\"[s: State] {\n all n: s.active | let nd = (s.data)[n] | all i: Id {\n let next\" = Id<:next - (Id -> i) {\n nd.next.id in n.id.^next\" =>\n // nd.closest_preceding_finger[i] = nd.next,\n (some n1: nd.finger[Id] {\n nd.closest_preceding_finger[i] = n1\n //n1 in nd.finger[Id]\n n1.id in n.id.^next\"\n no n2: nd.finger[Id] | n2.id in n1.id.^next\"\n }) else\n nd.closest_preceding_finger[i] = n\n }}\n }\n\n\nassert SameCPF {all s: State | FingersCorrect[s] => (ClosestPrecedingFinger [s] iff ClosestPrecedingFinger\" [s])}\nassert SameCPF1 {all s: State | FingersCorrect[s] => (ClosestPrecedingFinger [s] => ClosestPrecedingFinger\" [s])}\nassert SameCPF2 {\n all s: State | ((s.active = Node && FingersCorrect[s] && ClosestPrecedingFinger\" [s])\n => ClosestPrecedingFinger [s]) }\n\ncheck SameCPF for 3 but 1 State expect 0\ncheck SameCPF1 for 2 but 1 State expect 0\ncheck SameCPF2 for 3 but 1 State expect 0\n\n\npred ShowMeCPF {\n all s : State | s.active = Node && FingersCorrect[s] &&\n // not ClosestPrecedingFinger(s) && ClosestPrecedingFinger\"(s)\n ClosestPrecedingFinger[s]\n //all s : State | all nd : s.active.s.data | nd.finger[Id] = Node\n # Node = 2\n # State = 1\n}\n\n\nrun ShowMeCPF for 2 but 1 State expect 1\n\n\npred FindPredecessor[s: State] {\n all n: s.active | let nd = n.(s.data) | all i: Id {\n nd.find_predecessor[i] =\n (less_than_eq [n.id, i, nd.next.id] && (n.id != i || # s.active = 1)\n => n\n else (nd.closest_preceding_finger[i].(s.data).find_predecessor)[i])\n }\n }\n\n\nassert FPisActive {\n all s: State | FingersCorrect[s] && ClosestPrecedingFinger[s] && FindPredecessor[s]\n => (all n: s.active | all nd: n.(s.data) | nd.find_predecessor[Id] in s.active) }\ncheck FPisActive for 3 but 1 State expect 1\n\n\npred FindPredecessor\"[s: State] {\n all n: s.active | let nd = (s.data)[n] | all i: Id {\n let next\" = Id<:next - (nd.next.id -> Id) {\n one s.active or i in n.id.^next\" => // *next\" -> ^next\" 1/8/02\n nd.find_predecessor[i] = n else\n nd.find_predecessor[i] =\n ((s.data)[nd.closest_preceding_finger[i]]).find_predecessor[i]\n }}\n }\n\n\nassert SameFP {all s: State | FingersCorrect[s] // && s.active = Node\n => (FindPredecessor [s] iff FindPredecessor\" [s])}\n\nassert SameFP1 {\n all s: State | FingersCorrect[s] && s.active = Node\n => (FindPredecessor [s] => FindPredecessor\" [s])}\nassert SameFP2 {\n all s: State | FingersCorrect[s] && s.active = Node\n => (FindPredecessor\" [s] => FindPredecessor [s])}\n\ncheck SameFP for 3 but 1 State expect 1\ncheck SameFP1 for 3 but 1 State expect 0\ncheck SameFP2 for 3 but 1 State expect 0\n\n\npred FindSuccessor[s: State] {\n all n: s.active | let nd = (s.data)[n] | all i: Id {\n nd.find_successor[i] = ((s.data)[nd.find_predecessor[i]]).next\n }}\n\n\n// should be able to check that closest_p_f, etc returns\n// only active nodes if FingersCorrect.\n\n\npred ShowMe1Node {\n #Node = 1\n all s : State | NextCorrect[s]\n State.active = Node\n}\n\nrun ShowMe1Node for 2 but 1 State, 1 Node expect 1\n\npred ShowMe1 {\n #Node = 2\n #State = 1\n all s : State | NextCorrect[s]\n State.active = Node\n}\n\n\npred ShowMe2 {\n #Node = 3\n #State = 1\n all s : State | NextCorrect[s] && FingersCorrect[s]\n State.active = Node\n //all n: NodeData | one n.finger[Id]\n}\n\n\nassert OK1 {\n #Node = 3 &&\n #State = 1 &&\n (all s : State | NextCorrect[s] && FingersCorrect[s]) &&\n State.active = Node\n}\n\n\nrun ShowMe1 for 3 expect 1\nrun ShowMe2 for 3 expect 1\n\nassert InjectiveIds {all i, j: Id | i!=j => i.next != j.next}\ncheck InjectiveIds for 5 expect 0\n\n\nassert FindSuccessorWorks {\n all s: State, i: Id |\n let nd = s.active.(s.data) |\n let succ = nd.find_successor [i] |\n FingersCorrect [s] // && s.active = Node\n => (no n\": s.active | less_than [i, n\".id, succ.id])\n }\ncheck FindSuccessorWorks for 3 but 1 State expect 1", "permalink": "active-fester-awhile-plated", "time": "2024-12-02 20:03:58.736071", "cmd": 14} {"id": 28333, "parent": 7855, "code": "module examples/case_studies/chord\n\n/*\n * Models the chord distributed hash table lookup protocol.\n *\n * For a detailed description, see:\n * https://pdos.csail.mit.edu/papers/ton:chord/paper-ton.pdf or\n * http://www.pdos.lcs.mit.edu/papers/chord:sigcomm01/ - dead link 20191012\n */\n\nopen util/relation as rel\n\nsig Id {next: Id}\nfact {all i: Id | Id in i.*next}\n\n/**\n * true iff i precedes j in the order starting at from\n */\npred less_than [from, i,j: Id] {\n let next\" = Id<:next - (Id->from) | j in i.^next\" // if from=j, returns true if # nodes > 1\n }\npred less_than_eq [from, i,j: Id] {\n let next\" = Id<:next - (Id->from) | j in i.*next\"\n }\n\nsig Node {id: Id}\nfact {all m,n: Node | m!=n => m.id != n.id}\n\n\nsig NodeData {\n prev, next: Node,\n finger: Id -> lone Node,\n closest_preceding_finger: Id -> one Node,\n find_predecessor: Id -> one Node,\n find_successor: Id -> one Node\n }\n\nsig State {\n active: set Node,\n data: active -> one NodeData\n }\n\n/**\n * node n's next node is defined to be the m where n's finger table maps the id\n * that follows n.id to m\n * next holds the first entry of the finger table\n */\nfact {all s: State | all n: s.active | n.(s.data).next = n.(s.data).finger[n.id.next]}\n\npred NextCorrect [s: State] {\n all n: s.active {\n -- no intervening node (ie, close enough)\n no n\": s.active - n | less_than [n.id, n\".id, n.(s.data).next.id]\n -- can reach all other active nodes (ie, far enough)\n -- need this because can't rule out case of next being node itself (because of 1-node ring)\n -- s.active in n.*(s.data.next)\n n.(s.data).next != n || #s.active = 1\n }\n }\n\npred NextCorrect\" [s: State] {\n-- next seems to be correct for 1,2,3 nodes\n all n: s.active | let nd = (s.data)[n] {\n let next\" = Id<:next - (Id -> nd.next.id) {\n no n\" : s.active { n\".id in n.id.^next\" }\n }}\n }\n\n// valid\nassert Same1 {all s: State | NextCorrect[s] => NextCorrect\"[s]}\ncheck Same1 for 3 but 1 State expect 0\n\n// valid unless active condition removed\nassert Same2 {all s: State | s.active = Node => (NextCorrect\"[s] => NextCorrect[s])}\ncheck Same2 for 3 but 1 State expect 0\n\n-- assert NextInFinger {all s: State | all n: s.active | some n.s.data.finger[n.id.next] }\n\n\n-- says that finger entry maps an id to a node so that there are no intervening nodes\n-- between the id and the node\npred FingersCorrect [s: State] {\n all nd: s.active.(s.data) | all start:nd.finger.univ |\n nd.finger[start] in s.active &&\n (no n\" : s.active | less_than [start, n\".id, nd.finger[start].id])\n }\n\n\npred FingersCorrect\" [s: State] {\n all n: s.active | let nd = (s.data)[n] | all start: Node.~(nd.finger) {\n nd.finger[start] in s.active &&\n (let next\" = Id<:next - (nd.finger[start].id -> Id) {\n no n\" : s.active - nd.finger[start] {\n n\".id in start.*next\"\n }\n })\n }\n }\n\n\nassert SameFC {all s: State | FingersCorrect [s] iff FingersCorrect\"[s]}\ncheck SameFC for 3 but 1 State expect 0\n\n\npred ShowMeFC {\n all s : State | s.active = Node && FingersCorrect[s]\n}\n\nrun ShowMeFC for 2 but 1 State expect 1\n\npred ClosestPrecedingFinger[s: State] {\n all n: s.active | let nd = n.(s.data) |\n all i: Id | let cpf = nd.closest_preceding_finger[i] {\n no n\": nd.finger[Id] + n - cpf | less_than [cpf.id, n\".id, i]\n cpf in nd.finger[Id] + n\n cpf.id != i || # s.active = 1\n //less_than (n.id, cpf.id, i)\n }\n }\n\n\npred ClosestPrecedingFinger\"[s: State] {\n all n: s.active | let nd = (s.data)[n] | all i: Id {\n let next\" = Id<:next - (Id -> i) {\n nd.next.id in n.id.^next\" =>\n // nd.closest_preceding_finger[i] = nd.next,\n (some n1: nd.finger[Id] {\n nd.closest_preceding_finger[i] = n1\n //n1 in nd.finger[Id]\n n1.id in n.id.^next\"\n no n2: nd.finger[Id] | n2.id in n1.id.^next\"\n }) else\n nd.closest_preceding_finger[i] = n\n }}\n }\n\n\nassert SameCPF {all s: State | FingersCorrect[s] => (ClosestPrecedingFinger [s] iff ClosestPrecedingFinger\" [s])}\nassert SameCPF1 {all s: State | FingersCorrect[s] => (ClosestPrecedingFinger [s] => ClosestPrecedingFinger\" [s])}\nassert SameCPF2 {\n all s: State | ((s.active = Node && FingersCorrect[s] && ClosestPrecedingFinger\" [s])\n => ClosestPrecedingFinger [s]) }\n\ncheck SameCPF for 3 but 1 State expect 0\ncheck SameCPF1 for 2 but 1 State expect 0\ncheck SameCPF2 for 3 but 1 State expect 0\n\n\npred ShowMeCPF {\n all s : State | s.active = Node && FingersCorrect[s] &&\n // not ClosestPrecedingFinger(s) && ClosestPrecedingFinger\"(s)\n ClosestPrecedingFinger[s]\n //all s : State | all nd : s.active.s.data | nd.finger[Id] = Node\n # Node = 2\n # State = 1\n}\n\n\nrun ShowMeCPF for 2 but 1 State expect 1\n\n\npred FindPredecessor[s: State] {\n all n: s.active | let nd = n.(s.data) | all i: Id {\n nd.find_predecessor[i] =\n (less_than_eq [n.id, i, nd.next.id] && (n.id != i || # s.active = 1)\n => n\n else (nd.closest_preceding_finger[i].(s.data).find_predecessor)[i])\n }\n }\n\n\nassert FPisActive {\n all s: State | FingersCorrect[s] && ClosestPrecedingFinger[s] && FindPredecessor[s]\n => (all n: s.active | all nd: n.(s.data) | nd.find_predecessor[Id] in s.active) }\ncheck FPisActive for 3 but 1 State expect 1\n\n\npred FindPredecessor\"[s: State] {\n all n: s.active | let nd = (s.data)[n] | all i: Id {\n let next\" = Id<:next - (nd.next.id -> Id) {\n one s.active or i in n.id.^next\" => // *next\" -> ^next\" 1/8/02\n nd.find_predecessor[i] = n else\n nd.find_predecessor[i] =\n ((s.data)[nd.closest_preceding_finger[i]]).find_predecessor[i]\n }}\n }\n\n\nassert SameFP {all s: State | FingersCorrect[s] // && s.active = Node\n => (FindPredecessor [s] iff FindPredecessor\" [s])}\n\nassert SameFP1 {\n all s: State | FingersCorrect[s] && s.active = Node\n => (FindPredecessor [s] => FindPredecessor\" [s])}\nassert SameFP2 {\n all s: State | FingersCorrect[s] && s.active = Node\n => (FindPredecessor\" [s] => FindPredecessor [s])}\n\ncheck SameFP for 3 but 1 State expect 1\ncheck SameFP1 for 3 but 1 State expect 0\ncheck SameFP2 for 3 but 1 State expect 0\n\n\npred FindSuccessor[s: State] {\n all n: s.active | let nd = (s.data)[n] | all i: Id {\n nd.find_successor[i] = ((s.data)[nd.find_predecessor[i]]).next\n }}\n\n\n// should be able to check that closest_p_f, etc returns\n// only active nodes if FingersCorrect.\n\n\npred ShowMe1Node {\n #Node = 1\n all s : State | NextCorrect[s]\n State.active = Node\n}\n\nrun ShowMe1Node for 2 but 1 State, 1 Node expect 1\n\npred ShowMe1 {\n #Node = 2\n #State = 1\n all s : State | NextCorrect[s]\n State.active = Node\n}\n\n\npred ShowMe2 {\n #Node = 3\n #State = 1\n all s : State | NextCorrect[s] && FingersCorrect[s]\n State.active = Node\n //all n: NodeData | one n.finger[Id]\n}\n\n\nassert OK1 {\n #Node = 3 &&\n #State = 1 &&\n (all s : State | NextCorrect[s] && FingersCorrect[s]) &&\n State.active = Node\n}\n\n\nrun ShowMe1 for 3 expect 1\nrun ShowMe2 for 3 expect 1\n\nassert InjectiveIds {all i, j: Id | i!=j => i.next != j.next}\ncheck InjectiveIds for 5 expect 0\n\n\nassert FindSuccessorWorks {\n all s: State, i: Id |\n let nd = s.active.(s.data) |\n let succ = nd.find_successor [i] |\n FingersCorrect [s] // && s.active = Node\n => (no n\": s.active | less_than [i, n\".id, succ.id])\n }\ncheck FindSuccessorWorks for 3 but 1 State expect 1", "permalink": "humble-whacky-fool-smirk", "time": "2024-12-10 08:51:28.894915", "cmd": 1} {"id": 22857, "parent": 22856, "code": "one sig List { \n header: lone Node,\n size : Int\n} \n\nsig Node {\n link: lone Node \n}\n\nfact sizeOk {\n List.size = #List.header.*link \n}\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3 but 3 Int", "permalink": "come-case-pardon-oyster", "time": "2024-11-10 11:38:54.953886", "cmd": 1} {"id": 22858, "parent": 22857, "code": "one sig List { \n header: lone Node,\n size : Int\n} \n\nsig Node {\n link: lone Node \n}\n\nfact sizeOk {\n List.size = #List.header.*link \n}\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3 but 3 Int", "permalink": "eatery-create-image-stand", "time": "2024-11-10 11:38:59.745847", "cmd": 1} {"id": 30111, "parent": 6741, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\nrun {no List and no Node} for 3", "permalink": "driver-turf-game-gully", "time": "2024-12-21 15:08:50.501329", "cmd": 1} {"id": 30112, "parent": 30111, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\nrun {no List and no Node} for 3", "permalink": "crafty-grove-crouch-tubby", "time": "2024-12-21 15:08:55.905732", "cmd": 1} {"id": 30153, "parent": 30152, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\nrun {no List and no Node} for 3", "permalink": "sudden-gulp-net-squire", "time": "2024-12-22 23:45:18.990368", "cmd": 1} {"id": 29986, "parent": 29985, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\nrun {no List and no Node} for 3", "permalink": "slab-ruby-ember-deck", "time": "2024-12-20 11:24:17.399322", "cmd": 1} {"id": 30154, "parent": 30153, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\nrun {no List and no Node} for 3", "permalink": "unseen-eldest-velvet-ground", "time": "2024-12-22 23:45:22.952243", "cmd": 1} {"id": 30155, "parent": 30148, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3\n", "permalink": "job-doodle-jacket-chaos", "time": "2024-12-23 09:18:04.180168", "cmd": 1} {"id": 30148, "parent": 30147, "code": "one sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun acyclic for 3\n", "permalink": "untold-stream-posted-arming", "time": "2024-12-22 22:45:40.411134", "cmd": 1} {"id": 30090, "parent": 30089, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3", "permalink": "clad-given-hurled-ashen", "time": "2024-12-21 13:31:14.320562", "cmd": 1} {"id": 29984, "parent": 14623, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3", "permalink": "lapped-crowd-ranged-lunacy", "time": "2024-12-20 11:22:06.752731", "cmd": 1} {"id": 30116, "parent": null, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3", "permalink": "debit-otter-patrol-tamer", "time": "2024-12-22 08:39:58.861695", "cmd": 1} {"id": 29970, "parent": 29969, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3", "permalink": "defeat-gusty-fringe-visa", "time": "2024-12-20 11:15:45.454134", "cmd": 2} {"id": 29976, "parent": 29975, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3", "permalink": "fax-chive-spring-nuzzle", "time": "2024-12-20 11:17:01.420055", "cmd": 1} {"id": 29985, "parent": 29984, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3", "permalink": "lusty-vegan-geiger-refuse", "time": "2024-12-20 11:23:37.840050", "cmd": 1} {"id": 30091, "parent": 30090, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3", "permalink": "cinch-jeep-aflame-elude", "time": "2024-12-21 13:31:14.734535", "cmd": 1} {"id": 30088, "parent": null, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3", "permalink": "sherry-boat-cleat-rubble", "time": "2024-12-21 13:31:07.429079", "cmd": 1} {"id": 29971, "parent": 29970, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3", "permalink": "jam-rebate-until-snowy", "time": "2024-12-20 11:15:56.077860", "cmd": 1} {"id": 30089, "parent": 30088, "code": "sig List { header: lone Node } \nsig Node { link: lone Node }\npred acyclic(){\n no List.header or some n : List.header.*link | no n.link\n}\nrun {no List} for 3", "permalink": "sports-fabric-spore-await", "time": "2024-12-21 13:31:12.964116", "cmd": 1} {"id": 17437, "parent": null, "code": "module appendixA/addressBook2\n\nsig Addr, Name { }\n\nsig Book {\n\taddr: Name -> (Name + Addr)\n\t}\n\npred inv [b: Book] {\n\tlet addr = b.addr |\n\t\tall n: Name {\n\t\t\tn not in n.^addr\n\t\t\tsome addr.n => some n.^addr & Addr\n\t\t}\n\t}\n\npred add [b, b\": Book, n: Name, t: Name+Addr] {\n\tb\".addr = b.addr + n->t\n\t}\n\npred del [b, b\": Book, n: Name, t: Name+Addr] {\n\tb\".addr = b.addr - n->t\n\t}\n\nfun lookup [b: Book, n: Name] : set Addr {\n\tn.^(b.addr) & Addr\n\t}", "permalink": "doable-refund-badly-proofs", "time": "2024-10-08 19:45:15.603823", "cmd": 1} {"id": 17475, "parent": null, "code": "module appendixA/addressBook2\n\nsig Addr, Name { }\n\nsig Book {\n\taddr: Name -> (Name + Addr)\n\t}\n\npred inv [b: Book] {\n\tlet addr = b.addr |\n\t\tall n: Name {\n\t\t\tn not in n.^addr\n\t\t\tsome addr.n => some n.^addr & Addr\n\t\t}\n\t}\n\npred add [b, b\": Book, n: Name, t: Name+Addr] {\n\tb\".addr = b.addr + n->t\n\t}\n\npred del [b, b\": Book, n: Name, t: Name+Addr] {\n\tb\".addr = b.addr - n->t\n\t}\n\nfun lookup [b: Book, n: Name] : set Addr {\n\tn.^(b.addr) & Addr\n\t}", "permalink": "skies-rival-strobe-vegan", "time": "2024-10-11 13:45:54.118479", "cmd": 1} {"id": 20273, "parent": 20272, "code": "sig A{}", "permalink": "each-skid-anew-roast", "time": "2024-10-22 08:30:33.749981", "cmd": 1} {"id": 20272, "parent": 20271, "code": "sig A{}", "permalink": "celtic-stout-amused-hanky", "time": "2024-10-22 08:30:30.710229", "cmd": 1} {"id": 17483, "parent": 17482, "code": "sig A {}", "permalink": "clerk-liver-enable-aliens", "time": "2024-10-11 20:32:38.437724", "cmd": 1} {"id": 28336, "parent": 14625, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "shone-jumble-kite-shun", "time": "2024-12-10 22:00:38.199893", "cmd": 1} {"id": 28404, "parent": 14625, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "poser-sequel-heave-cocoa", "time": "2024-12-11 10:19:57.224910", "cmd": 1} {"id": 17490, "parent": 14625, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "wharf-slicer-mammal-storm", "time": "2024-10-13 09:01:37.719381", "cmd": 1} {"id": 27989, "parent": 27988, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "opt-debate-luster-spilt", "time": "2024-12-06 11:06:37.009512", "cmd": 1} {"id": 23343, "parent": 14625, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "umpire-crummy-rust-poplar", "time": "2024-11-16 05:34:30.281591", "cmd": 1} {"id": 20329, "parent": 20328, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "jumbo-musky-voter-shiny", "time": "2024-10-25 03:05:27.075985", "cmd": 1} {"id": 28013, "parent": 14625, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "armory-creole-unglue-lure", "time": "2024-12-06 15:01:40.006230", "cmd": 1} {"id": 28017, "parent": 28015, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "exhume-angles-email-pond", "time": "2024-12-06 15:03:52.603024", "cmd": 1} {"id": 28022, "parent": 14625, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "booted-glare-brunt-skater", "time": "2024-12-06 15:30:20.970955", "cmd": 1} {"id": 28023, "parent": null, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "chimp-jury-wind-woof", "time": "2024-12-06 15:30:50.175954", "cmd": 1} {"id": 20330, "parent": 20329, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "evict-rut-yoga-bagful", "time": "2024-10-25 03:18:15.199808", "cmd": 1} {"id": 20295, "parent": 14625, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "corset-vest-pointy-sassy", "time": "2024-10-23 13:00:16.492781", "cmd": 1} {"id": 28029, "parent": 28028, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "bottle-cancel-arson-carol", "time": "2024-12-07 15:14:05.473032", "cmd": 1} {"id": 29887, "parent": 14625, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "fetch-eldest-agile-duh", "time": "2024-12-20 05:42:55.230244", "cmd": 1} {"id": 28335, "parent": 14625, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "slinky-jinx-salary-payee", "time": "2024-12-10 11:36:58.338879", "cmd": 1} {"id": 30120, "parent": 14625, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "film-stupor-paddle-autism", "time": "2024-12-22 15:15:23.695860", "cmd": 1} {"id": 28319, "parent": 14625, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "net-spotty-relax-glade", "time": "2024-12-10 07:17:01.553908", "cmd": 1} {"id": 28313, "parent": 28309, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "laptop-baffle-utmost-curing", "time": "2024-12-09 09:33:20.690013", "cmd": 1} {"id": 24450, "parent": 14625, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "hedge-coping-strive-swell", "time": "2024-11-19 20:37:41.642618", "cmd": 1} {"id": 28309, "parent": 14625, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "aside-swipe-neuter-specks", "time": "2024-12-09 09:18:29.188693", "cmd": 1} {"id": 24539, "parent": 24538, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "litter-stank-ditto-bobble", "time": "2024-11-20 13:47:29.740043", "cmd": 1} {"id": 24594, "parent": 14625, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "fever-resort-modify-wanted", "time": "2024-11-21 10:56:57.308890", "cmd": 1} {"id": 30556, "parent": 14625, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "chirpy-dock-unruly-avenue", "time": "2025-01-10 13:50:09.917038", "cmd": 1} {"id": 20328, "parent": 14625, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "lisp-unify-tutu-caviar", "time": "2024-10-25 03:03:58.499096", "cmd": 1} {"id": 28014, "parent": 28013, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "prior-tablet-recoil-mute", "time": "2024-12-06 15:01:49.273538", "cmd": 1} {"id": 28015, "parent": 28014, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "mumps-curdle-choosy-ooze", "time": "2024-12-06 15:02:24.554846", "cmd": 1} {"id": 28016, "parent": 28015, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "neuron-ridden-gonad-props", "time": "2024-12-06 15:03:18.520823", "cmd": 1} {"id": 28018, "parent": 28017, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "stood-emit-marlin-proved", "time": "2024-12-06 15:04:04.021703", "cmd": 1} {"id": 17476, "parent": 14625, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "saucy-poplar-resort-clammy", "time": "2024-10-11 13:46:11.812375", "cmd": 1} {"id": 17474, "parent": 14625, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "mute-going-fool-shout", "time": "2024-10-11 13:45:00.492669", "cmd": 1} {"id": 28019, "parent": 28018, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "willow-twine-relic-dining", "time": "2024-12-06 15:04:23.904642", "cmd": 1} {"id": 28020, "parent": 28019, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "crying-oppose-squash-vibes", "time": "2024-12-06 15:07:58.813416", "cmd": 1} {"id": 28028, "parent": 14625, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "barman-sloppy-usual-legume", "time": "2024-12-07 15:13:58.394869", "cmd": 1} {"id": 17417, "parent": 17416, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "pretty-imply-lizard-reword", "time": "2024-10-07 21:38:10.062162", "cmd": 1} {"id": 24538, "parent": 14625, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "thaw-blouse-ipad-scale", "time": "2024-11-20 13:45:18.974674", "cmd": 1} {"id": 17416, "parent": 14625, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "proofs-state-ditzy-expend", "time": "2024-10-07 21:37:58.719840", "cmd": 1} {"id": 21377, "parent": 21376, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "lend-icon-blob-cactus", "time": "2024-11-03 20:07:10.447479", "cmd": 1} {"id": 28317, "parent": 14625, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "nimbly-cedar-return-rebate", "time": "2024-12-09 09:57:26.335036", "cmd": 1} {"id": 27942, "parent": 14625, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "define-slush-precut-flask", "time": "2024-12-05 13:42:07.570885", "cmd": 1} {"id": 21378, "parent": 21377, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "unhook-coerce-raft-these", "time": "2024-11-03 20:12:38.316348", "cmd": 1} {"id": 27988, "parent": null, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "little-spoon-myself-affair", "time": "2024-12-06 11:05:59.487139", "cmd": 1} {"id": 28405, "parent": 28404, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "lip-plural-urchin-aroma", "time": "2024-12-11 10:38:08.827831", "cmd": 1} {"id": 27826, "parent": null, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "spruce-robin-google-bubble", "time": "2024-12-03 10:32:21.570177", "cmd": 1} {"id": 27827, "parent": 14625, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "dove-worst-deceit-hummus", "time": "2024-12-03 10:55:16.221628", "cmd": 1} {"id": 28021, "parent": 28020, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "violin-rush-copied-pastel", "time": "2024-12-06 15:16:41.541627", "cmd": 1} {"id": 28402, "parent": 28401, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "alarm-tricky-stump-tall", "time": "2024-12-11 08:41:53.283085", "cmd": 1} {"id": 28314, "parent": 28313, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "nervy-coma-skiing-lurch", "time": "2024-12-09 09:37:12.889687", "cmd": 1} {"id": 27849, "parent": null, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "mango-dean-nuclei-deputy", "time": "2024-12-04 11:14:49.785909", "cmd": 1} {"id": 21376, "parent": null, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "grader-ankle-hybrid-sturdy", "time": "2024-11-03 20:06:50.233141", "cmd": 1} {"id": 27848, "parent": 14625, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "jovial-diaper-precut-daybed", "time": "2024-12-04 10:13:15.201538", "cmd": 1} {"id": 27863, "parent": 14625, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "perm-echo-email-carol", "time": "2024-12-04 11:33:40.205627", "cmd": 1} {"id": 27847, "parent": null, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "defile-lens-rosy-eaten", "time": "2024-12-04 09:37:56.647059", "cmd": 1} {"id": 27703, "parent": null, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "chive-spiffy-bronco-sweep", "time": "2024-11-26 11:16:26.357364", "cmd": 1} {"id": 28584, "parent": 14625, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "anyhow-circle-slinky-yield", "time": "2024-12-13 19:42:25.593967", "cmd": 1} {"id": 24597, "parent": 14625, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "muzzle-bauble-eagle-clay", "time": "2024-11-21 10:59:21.798992", "cmd": 1} {"id": 28401, "parent": null, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "sleet-carton-rerun-gaffe", "time": "2024-12-11 08:41:39.638355", "cmd": 1} {"id": 20760, "parent": 14625, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.color = GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "stick-streak-flail-ended", "time": "2024-10-28 14:58:48.468724", "cmd": 1} {"id": 17439, "parent": 17438, "code": "module appendixA/addressBook2\n\nsig Addr, Name { }\n\nsig Book {\n\taddr: Name -> (Name + Addr)\n\t}\n\npred inv [b: Book] {\n\tlet addr = b.addr |\n\t\tall n: Name {\n\t\t\tn not in n.^addr\n\t\t\tsome addr.n => some n.^addr & Addr\n\t\t}\n\t}\n\npred add [b, b\": Book, n: Name, t: Name+Addr] {\n\tb\".addr = b.addr + n->t\n\t}\n\npred del [b, b\": Book, n: Name, t: Name+Addr] {\n\tb\".addr = b.addr - n->t\n\t}\n\nfun lookup [b: Book, n: Name] : set Addr {\n\tn.^(b.addr) & Addr\n\t}\n\nrun {} for 4", "permalink": "morse-dinghy-budget-chug", "time": "2024-10-08 19:45:33.676754", "cmd": 1} {"id": 17438, "parent": 17437, "code": "module appendixA/addressBook2\n\nsig Addr, Name { }\n\nsig Book {\n\taddr: Name -> (Name + Addr)\n\t}\n\npred inv [b: Book] {\n\tlet addr = b.addr |\n\t\tall n: Name {\n\t\t\tn not in n.^addr\n\t\t\tsome addr.n => some n.^addr & Addr\n\t\t}\n\t}\n\npred add [b, b\": Book, n: Name, t: Name+Addr] {\n\tb\".addr = b.addr + n->t\n\t}\n\npred del [b, b\": Book, n: Name, t: Name+Addr] {\n\tb\".addr = b.addr - n->t\n\t}\n\nfun lookup [b: Book, n: Name] : set Addr {\n\tn.^(b.addr) & Addr\n\t}\n\nrun {} for 4", "permalink": "affair-eatery-acts-chunk", "time": "2024-10-08 19:45:29.391272", "cmd": 1} {"id": 17480, "parent": null, "code": "sig Person {spouse: Person, shaken: set Person}\none sig Jocelyn, Hilary extends Person {}\nfact ShakingProtocol {\n// nobody shakes own or spouse's hand\\r\\n\" + //\n all p: Person | no (p + p.spouse) & p.shaken\n\t// if p shakes q, q shakes p\\r\\n\" + //\n\tall p, q: Person | p in q.shaken => q in p.shaken\n}\n\nfact Spouses {\n\tall p, q: Person | p!=q => {\n\t// if q is p's spouse, p is q's spouse\\r\\n\" + //\n\tp.spouse = q => q.spouse = p\n\tno spouse sharing\n\tp.spouse != q.spouse\n}\nall p: Person {\n\ta person is his or her spouse's spouse\n\tp.spouse.spouse = p\n\t// nobody is his or her own spouse\\r\\n\" + //\n\tp != p.spouse\n}\n}\n //\npred Puzzle {\n // everyone but Jocelyn has shaken a different number of hands\\r\\n\" + //\n\tall p,q: Person - Jocelyn | p!=q => #p.shaken != #q.shaken\n\t// Hilary's spouse is Jocelyn\\r\\n\" + //\n\tHilary.spouse = Jocelyn\n\t}\n\t\nrun Puzzle for exactly 2 Person, 3 int", "permalink": "amino-wrath-preset-decaf", "time": "2024-10-11 20:28:58.322814", "cmd": 1} {"id": 17481, "parent": 17480, "code": "sig Person {spouse: Person, shaken: set Person}\none sig Jocelyn, Hilary extends Person {}\nfact ShakingProtocol {\n// nobody shakes own or spouse's hand\\r\\n\" + //\n all p: Person | no (p + p.spouse) & p.shaken\n\t// if p shakes q, q shakes p\\r\\n\" + //\n\tall p, q: Person | p in q.shaken => q in p.shaken\n}\n\nfact Spouses {\n\tall p, q: Person | p!=q => {\n\t// if q is p's spouse, p is q's spouse\\r\\n\" + //\n\tp.spouse = q => q.spouse = p\n\t// no spouse sharing\n\tp.spouse != q.spouse\n}\nall p: Person {\n\ta person is his or her spouse's spouse\n\tp.spouse.spouse = p\n\t// nobody is his or her own spouse\\r\\n\" + //\n\tp != p.spouse\n}\n}\n //\npred Puzzle {\n // everyone but Jocelyn has shaken a different number of hands\\r\\n\" + //\n\tall p,q: Person - Jocelyn | p!=q => #p.shaken != #q.shaken\n\t// Hilary's spouse is Jocelyn\\r\\n\" + //\n\tHilary.spouse = Jocelyn\n\t}\n\t\nrun Puzzle for exactly 2 Person, 3 int", "permalink": "swarm-impale-cosmic-cartel", "time": "2024-10-11 20:29:27.748847", "cmd": 1} {"id": 17482, "parent": 17481, "code": "sig Person {spouse: Person, shaken: set Person}\none sig Jocelyn, Hilary extends Person {}\nfact ShakingProtocol {\n// nobody shakes own or spouse's hand\\r\\n\" + //\n all p: Person | no (p + p.spouse) & p.shaken\n\t// if p shakes q, q shakes p\\r\\n\" + //\n\tall p, q: Person | p in q.shaken => q in p.shaken\n}\n\nfact Spouses {\n\tall p, q: Person | p!=q => {\n\t// if q is p's spouse, p is q's spouse\\r\\n\" + //\n\tp.spouse = q => q.spouse = p\n\t// no spouse sharing\n\tp.spouse != q.spouse\n}\nall p: Person {\n\t//a person is his or her spouse's spouse\n\tp.spouse.spouse = p\n\t// nobody is his or her own spouse\\r\\n\" + //\n\tp != p.spouse\n}\n}\n //\npred Puzzle {\n // everyone but Jocelyn has shaken a different number of hands\\r\\n\" + //\n\tall p,q: Person - Jocelyn | p!=q => #p.shaken != #q.shaken\n\t// Hilary's spouse is Jocelyn\\r\\n\" + //\n\tHilary.spouse = Jocelyn\n\t}\n\t\nrun Puzzle for exactly 2 Person, 3 int", "permalink": "bunt-unfold-sitter-chug", "time": "2024-10-11 20:29:42.343121", "cmd": 1} {"id": 17484, "parent": 17482, "code": "sig Person {spouse: Person, shaken: set Person}\none sig Jocelyn, Hilary extends Person {}\nfact ShakingProtocol {\n// nobody shakes own or spouse's hand\\r\\n\" + //\n all p: Person | no (p + p.spouse) & p.shaken\n\t// if p shakes q, q shakes p\\r\\n\" + //\n\tall p, q: Person | p in q.shaken => q in p.shaken\n}\n\nfact Spouses {\n\tall p, q: Person | p!=q => {\n\t// if q is p's spouse, p is q's spouse\\r\\n\" + //\n\tp.spouse = q => q.spouse = p\n\t// no spouse sharing\n\tp.spouse != q.spouse\n}\nall p: Person {\n\t//a person is his or her spouse's spouse\n\tp.spouse.spouse = p\n\t// nobody is his or her own spouse\\r\\n\" + //\n\tp != p.spouse\n}\n}\n //\npred Puzzle {\n // everyone but Jocelyn has shaken a different number of hands\\r\\n\" + //\n\tall p,q: Person - Jocelyn | p!=q => #p.shaken != #q.shaken\n\t// Hilary's spouse is Jocelyn\\r\\n\" + //\n\tHilary.spouse = Jocelyn\n\t}\n\t\nrun Puzzle for exactly 1000 Person, 15 int", "permalink": "sudoku-raft-ramp-nephew", "time": "2024-10-11 20:40:55.773251", "cmd": 1} {"id": 17528, "parent": 17527, "code": "/* sched_puzz.als (1) */\n// sig Person{}\nabstract sig Person{}\n\n/* sched_puzz.als (2) */\nrun{\n some Person\n} for 5\n\n/* sched_puzz.als (3) */\n// sig Day{}\nabstract sig Day{}\n\n/* sched_puzz.als (4) */\nrun show_Day_only{\n no Person\n some Day\n} for 5\n\n/* sched_puzz.als (5) */\nsig Meeting{\n Facilitator : one Person,\n Supporter : one Person, \n HoldingDay : some Day,\n}\n\n/* sched_puzz.als (6) */\nrun show_Meeting{\n some Meeting\n} for 3\n\n/* sched_puzz.als (7) */\nrun show_Meeting_but_no_instance{\n some Meeting\n no Person\n} for 3\n\n/* sched_puzz.als (8) */\nlet Schedule = Person -> Day\n\n/* sched_puzz.als (9) */\npred hold_meeting_every_day{\n all d: Day|\n -- 任意の日dについて、\n some m: Meeting|\n -- あるミーティングmが存在する\n m.HoldingDay = d\n -- mの開催日がdであるような。\n}\n\n/* sched_puzz.als (10) */\npred everyone_becomes_facilitator{\n all p: Person|\n -- 任意のメンバーpについて、\n some m: Meeting|\n -- あるミーティングmが存在する\n m.Facilitator = p\n -- mのファシリテータ役がpであるような。\n}\n\n/* sched_puzz.als (11) */\npred everyone_becomes_supporter{\n all p: Person|\n -- 任意のメンバーpについて、\n some m: Meeting|\n -- あるミーティングmが存在する\n m.Supporter = p\n -- mのサポーター役がpであるような。\n}\n\n/* sched_puzz.als (12) */\npred facilitator_and_supporter_are_different_person{\n all m: Meeting|\n -- 任意のミーティングmについて、\n no m.Facilitator & m.Supporter\n -- mのファシリテータとmのサポーター役が被ることはない\n}\n\n/* sched_puzz.als (13) */\npred every_meeting_is_on_staff_schedule[schedule: Schedule]{\n all m: Meeting|\n -- 任意のミーティングmと、\n let staff = m.Facilitator + m.Supporter|\n -- \"スタッフ\"とは、mのファシリテータ役とサポータ役であるとして、\n all s: staff|\n -- 任意のスタッフsについて、\n let available_days = s.schedule|\n -- \"参加可能日\"とは、スケジュールに記載されているsの参加可能日であるとして、\n m.HoldingDay in available_days\n -- mの開催日は参加可能日に含まれる。\n}\n\n/* sched_puzz.als (14) */\npred requirement[schedule: Schedule]{\n -- requirement 1\n hold_meeting_every_day\n -- requirement 2\n everyone_becomes_facilitator\n -- requirement 3\n everyone_becomes_supporter\n -- requirement 4\n facilitator_and_supporter_are_different_person\n -- requirement 5\n every_meeting_is_on_staff_schedule[schedule]\n}\n\n/* sched_puzz.als (15) */\nrun requirement_1to4{\n -- requirement 1\n hold_meeting_every_day\n -- requirement 2\n everyone_becomes_facilitator\n -- requirement 3\n everyone_becomes_supporter\n -- requirement 4\n facilitator_and_supporter_are_different_person\n -- requirement 5\n // It's necessary to give schedule information.\n // every_meeting_is_on_staff_schedule[?]\n} for 5\n\n/* sched_puzz.als (16) */\none sig A,B,C,D,E extends Person{}\n\n/* sched_puzz.als (17) */\none sig Mon,Tue,Wed,Thu,Fri extends Day{}\n\n/* sched_puzz.als (18) */\nlet Schedule_2023 ={\n A -> (Mon + Tue + Thu ) +\n B -> ( Tue + Wed + Thu + Fri) +\n C -> (Mon + Thu ) +\n D -> (Mon + Thu + Fri) +\n E -> ( Tue + Wed + Thu )\n}\n\n/* sched_puzz.als (19) */\nrun find_plan_2023{\n requirement[Schedule_2023]\n} for 5\n\n/* sched_puzz.als (20) */\nlet Schedule_2024 = Schedule_2023 ++ (C -> (Mon))\n\n/* sched_puzz.als (21) */\nrun find_plan_2024{\n requirement[Schedule_2024]\n} for 5\n\n/* sched_puzz.als (22) */\npred everyone_becomes_supporter_except_busy_person[schedule: Schedule]{\n let busy_person = \n -- \"忙しいメンバー\"とは、\n {p: Person| \n let available_days = p.schedule|\n -- (\"自分(p)の参加可能日\"とは、スケジュールに記載されている自分(p)の参加可能日とすれば、)\n lone available_days}|\n -- \"自分の参加可能日\"が一日以下のメンバーである。\n -- と定義した場合、\n all p: Person - busy_person|\n -- \"忙しいメンバー\"以外の任意のメンバーpについて、\n some m: Meeting|\n -- あるミーティングmが存在する\n m.Supporter = p\n -- mのサポーター役がpであるような。\n}\n\n/* sched_puzz.als (23) */\npred requirement_ver2[schedule: Schedule]{\n -- requirement 1\n hold_meeting_every_day\n -- requirement 2\n everyone_becomes_facilitator\n -- requirement 3\n // everyone_becomes_supporter\n everyone_becomes_supporter_except_busy_person[schedule]\n -- requirement 4\n facilitator_and_supporter_are_different_person\n -- requirement 5\n every_meeting_is_on_staff_schedule[schedule]\n}\n\n/* sched_puzz.als (24) */\nrun find_planB_2024{\n requirement_ver2[Schedule_2024]\n} for 5\n\n/* sched_puzz.als (25) */\nlet Schedule_2025 = Schedule_2024 ++ (D -> (Mon + Thu))\n\n/* sched_puzz.als (26) */\nrun find_plan_2025{\n requirement_ver2[Schedule_2025]\n} for 5\n\n/* sched_puzz.als (27) */\npred plan_someone_changes_available_days[schedule: Schedule]{\n one TheHelper[schedule]\n -- 与えられてスケジュールscheduleにおいて、「助けびと」が1名いる。\n}\n\n/* sched_puzz.als (28) */\nfun TheHelper[schedule: Schedule]: set Person{\n-- そのスケジュールでの「助けびと」とは、\n {p: Person|{\n -- 次のようなことが成立するメンバーpのことである。\n kept_available_days_except[schedule,p]\n -- p以外のメンバーの参加可能日は変更がなく、\n let available_days = AvailableDays[schedule,p]|\n some out_day: available_days|\n -- pの現在の参加可能日の中のある日をout_dayとし、\n some in_day: Day-available_days{\n -- pの現在の参加不能日の中のある日をin_dayとして、\n let\n alternative_available_days = available_days - out_day + in_day,\n -- (ちにみに、ここで、参加可能日変更案とは、\n --  現在のpの参加可能日から out_day を抜いて、in_day を加えた案であり、\n TheHelper_schedule = p -> alternative_available_days,\n -- 助けびとのスケジュールとは、pの参加可能日変更案であり、\n draft_schedule = schedule ++ TheHelper_schedule|\n -- スケジュール案とは、\n --  現在のスケジュールに助けびとのスケジュールを上書きしたものである。)\n requirement_ver2[draft_schedule]\n -- スケジュール案が開催要件version2を満たすこと。\n }\n }\n }\n}\n\n/* sched_puzz.als (29) */\npred kept_available_days_except[sched: Schedule, helper: Person]{\n-- helper以外のメンバーの参加可能日は変更がないとは、\n all m: Meeting|\n -- 任意のミーティングmについて、\n let \n f = m.Facilitator,\n s = m.Supporter,\n hd = m.HoldingDay{\n f != helper => hd in AvailableDays[sched, f]\n -- mのファシリテータ役fがhelperでないなら、mの開催日は、fの参加可能日であり、\n s != helper => hd in AvailableDays[sched, s]\n -- mのサポーター役sがhelperでないなら、mの開催日は、sの参加可能日である。\n }\n}\n\n/* sched_puzz.als (30) */\nlet AvailableDays[sched, x] = x.sched\n-- スケジュールに記載しているメンバーxのDay群をメンバーxの参加可能日と呼びます。\n\n/* sched_puzz.als (31) */\nrun find_planB_2025{\n\tplan_someone_changes_available_days[Schedule_2025]\n} for 5\n\n/* sched_puzz.als (32) */\nrun A_is_TheHelper_in_2025{\n A = TheHelper[Schedule_2025]\n} for 5\n\n/* sched_puzz.als (33) */\nrun B_is_TheHelper_in_2025{\n B = TheHelper[Schedule_2025]\n} for 5\n\n/* sched_puzz.als (34) */\nrun C_is_TheHelper_in_2025{\n C = TheHelper[Schedule_2025]\n} for 5\n\n/* sched_puzz.als (35) */\nrun D_is_TheHelper_in_2025{\n D = TheHelper[Schedule_2025]\n} for 5", "permalink": "spouse-fervor-stick-rally", "time": "2024-10-14 09:48:55.473832", "cmd": 2} {"id": 17530, "parent": 17529, "code": "/* sched_puzz.als (1) */\n// sig Person{}\nabstract sig Person{}\n\n/* sched_puzz.als (2) */\nrun{\n some Person\n} for 5\n\n/* sched_puzz.als (3) */\n// sig Day{}\nabstract sig Day{}\n\n/* sched_puzz.als (4) */\nrun show_Day_only{\n no Person\n some Day\n} for 5\n\n/* sched_puzz.als (5) */\nsig Meeting{\n Facilitator : one Person,\n Supporter : one Person, \n HoldingDay : some Day,\n}\n\n/* sched_puzz.als (6) */\nrun show_Meeting{\n some Meeting\n} for 3\n\n/* sched_puzz.als (7) */\nrun show_Meeting_but_no_instance{\n some Meeting\n no Person\n} for 3\n\n/* sched_puzz.als (8) */\nlet Schedule = Person -> Day\n\n/* sched_puzz.als (9) */\npred hold_meeting_every_day{\n all d: Day|\n -- 任意の日dについて、\n some m: Meeting|\n -- あるミーティングmが存在する\n m.HoldingDay = d\n -- mの開催日がdであるような。\n}\n\n/* sched_puzz.als (10) */\npred everyone_becomes_facilitator{\n all p: Person|\n -- 任意のメンバーpについて、\n some m: Meeting|\n -- あるミーティングmが存在する\n m.Facilitator = p\n -- mのファシリテータ役がpであるような。\n}\n\n/* sched_puzz.als (11) */\npred everyone_becomes_supporter{\n all p: Person|\n -- 任意のメンバーpについて、\n some m: Meeting|\n -- あるミーティングmが存在する\n m.Supporter = p\n -- mのサポーター役がpであるような。\n}\n\n/* sched_puzz.als (12) */\npred facilitator_and_supporter_are_different_person{\n all m: Meeting|\n -- 任意のミーティングmについて、\n no m.Facilitator & m.Supporter\n -- mのファシリテータとmのサポーター役が被ることはない\n}\n\n/* sched_puzz.als (13) */\npred every_meeting_is_on_staff_schedule[schedule: Schedule]{\n all m: Meeting|\n -- 任意のミーティングmと、\n let staff = m.Facilitator + m.Supporter|\n -- \"スタッフ\"とは、mのファシリテータ役とサポータ役であるとして、\n all s: staff|\n -- 任意のスタッフsについて、\n let available_days = s.schedule|\n -- \"参加可能日\"とは、スケジュールに記載されているsの参加可能日であるとして、\n m.HoldingDay in available_days\n -- mの開催日は参加可能日に含まれる。\n}\n\n/* sched_puzz.als (14) */\npred requirement[schedule: Schedule]{\n -- requirement 1\n hold_meeting_every_day\n -- requirement 2\n everyone_becomes_facilitator\n -- requirement 3\n everyone_becomes_supporter\n -- requirement 4\n facilitator_and_supporter_are_different_person\n -- requirement 5\n every_meeting_is_on_staff_schedule[schedule]\n}\n\n/* sched_puzz.als (15) */\nrun requirement_1to4{\n -- requirement 1\n hold_meeting_every_day\n -- requirement 2\n everyone_becomes_facilitator\n -- requirement 3\n everyone_becomes_supporter\n -- requirement 4\n facilitator_and_supporter_are_different_person\n -- requirement 5\n // It's necessary to give schedule information.\n // every_meeting_is_on_staff_schedule[?]\n} for 5\n\n/* sched_puzz.als (16) */\none sig A,B,C,D,E extends Person{}\n\n/* sched_puzz.als (17) */\none sig Mon,Tue,Wed,Thu,Fri extends Day{}\n\n/* sched_puzz.als (18) */\nlet Schedule_2023 ={\n A -> (Mon + Tue + Thu ) +\n B -> ( Tue + Wed + Thu + Fri) +\n C -> (Mon + Thu ) +\n D -> (Mon + Thu + Fri) +\n E -> ( Tue + Wed + Thu )\n}\n\n/* sched_puzz.als (19) */\nrun find_plan_2023{\n requirement[Schedule_2023]\n} for 5\n\n/* sched_puzz.als (20) */\nlet Schedule_2024 = Schedule_2023 ++ (C -> (Mon))\n\n/* sched_puzz.als (21) */\nrun find_plan_2024{\n requirement[Schedule_2024]\n} for 5\n\n/* sched_puzz.als (22) */\npred everyone_becomes_supporter_except_busy_person[schedule: Schedule]{\n let busy_person = \n -- \"忙しいメンバー\"とは、\n {p: Person| \n let available_days = p.schedule|\n -- (\"自分(p)の参加可能日\"とは、スケジュールに記載されている自分(p)の参加可能日とすれば、)\n lone available_days}|\n -- \"自分の参加可能日\"が一日以下のメンバーである。\n -- と定義した場合、\n all p: Person - busy_person|\n -- \"忙しいメンバー\"以外の任意のメンバーpについて、\n some m: Meeting|\n -- あるミーティングmが存在する\n m.Supporter = p\n -- mのサポーター役がpであるような。\n}\n\n/* sched_puzz.als (23) */\npred requirement_ver2[schedule: Schedule]{\n -- requirement 1\n hold_meeting_every_day\n -- requirement 2\n everyone_becomes_facilitator\n -- requirement 3\n // everyone_becomes_supporter\n everyone_becomes_supporter_except_busy_person[schedule]\n -- requirement 4\n facilitator_and_supporter_are_different_person\n -- requirement 5\n every_meeting_is_on_staff_schedule[schedule]\n}\n\n/* sched_puzz.als (24) */\nrun find_planB_2024{\n requirement_ver2[Schedule_2024]\n} for 5\n\n/* sched_puzz.als (25) */\nlet Schedule_2025 = Schedule_2024 ++ (D -> (Mon + Thu))\n\n/* sched_puzz.als (26) */\nrun find_plan_2025{\n requirement_ver2[Schedule_2025]\n} for 5\n\n/* sched_puzz.als (27) */\npred plan_someone_changes_available_days[schedule: Schedule]{\n one TheHelper[schedule]\n -- 与えられてスケジュールscheduleにおいて、「助けびと」が1名いる。\n}\n\n/* sched_puzz.als (28) */\nfun TheHelper[schedule: Schedule]: set Person{\n-- そのスケジュールでの「助けびと」とは、\n {p: Person|{\n -- 次のようなことが成立するメンバーpのことである。\n kept_available_days_except[schedule,p]\n -- p以外のメンバーの参加可能日は変更がなく、\n let available_days = AvailableDays[schedule,p]|\n some out_day: available_days|\n -- pの現在の参加可能日の中のある日をout_dayとし、\n some in_day: Day-available_days{\n -- pの現在の参加不能日の中のある日をin_dayとして、\n let\n alternative_available_days = available_days - out_day + in_day,\n -- (ちにみに、ここで、参加可能日変更案とは、\n --  現在のpの参加可能日から out_day を抜いて、in_day を加えた案であり、\n TheHelper_schedule = p -> alternative_available_days,\n -- 助けびとのスケジュールとは、pの参加可能日変更案であり、\n draft_schedule = schedule ++ TheHelper_schedule|\n -- スケジュール案とは、\n --  現在のスケジュールに助けびとのスケジュールを上書きしたものである。)\n requirement_ver2[draft_schedule]\n -- スケジュール案が開催要件version2を満たすこと。\n }\n }\n }\n}\n\n/* sched_puzz.als (29) */\npred kept_available_days_except[sched: Schedule, helper: Person]{\n-- helper以外のメンバーの参加可能日は変更がないとは、\n all m: Meeting|\n -- 任意のミーティングmについて、\n let \n f = m.Facilitator,\n s = m.Supporter,\n hd = m.HoldingDay{\n f != helper => hd in AvailableDays[sched, f]\n -- mのファシリテータ役fがhelperでないなら、mの開催日は、fの参加可能日であり、\n s != helper => hd in AvailableDays[sched, s]\n -- mのサポーター役sがhelperでないなら、mの開催日は、sの参加可能日である。\n }\n}\n\n/* sched_puzz.als (30) */\nlet AvailableDays[sched, x] = x.sched\n-- スケジュールに記載しているメンバーxのDay群をメンバーxの参加可能日と呼びます。\n\n/* sched_puzz.als (31) */\nrun find_planB_2025{\n\tplan_someone_changes_available_days[Schedule_2025]\n} for 5\n\n/* sched_puzz.als (32) */\nrun A_is_TheHelper_in_2025{\n A = TheHelper[Schedule_2025]\n} for 5\n\n/* sched_puzz.als (33) */\nrun B_is_TheHelper_in_2025{\n B = TheHelper[Schedule_2025]\n} for 5\n\n/* sched_puzz.als (34) */\nrun C_is_TheHelper_in_2025{\n C = TheHelper[Schedule_2025]\n} for 5\n\n/* sched_puzz.als (35) */\nrun D_is_TheHelper_in_2025{\n D = TheHelper[Schedule_2025]\n} for 5", "permalink": "pager-studio-remold-easter", "time": "2024-10-14 09:49:08.792277", "cmd": 14} {"id": 17531, "parent": 17530, "code": "/* sched_puzz.als (1) */\n// sig Person{}\nabstract sig Person{}\n\n/* sched_puzz.als (2) */\nrun{\n some Person\n} for 5\n\n/* sched_puzz.als (3) */\n// sig Day{}\nabstract sig Day{}\n\n/* sched_puzz.als (4) */\nrun show_Day_only{\n no Person\n some Day\n} for 5\n\n/* sched_puzz.als (5) */\nsig Meeting{\n Facilitator : one Person,\n Supporter : one Person, \n HoldingDay : some Day,\n}\n\n/* sched_puzz.als (6) */\nrun show_Meeting{\n some Meeting\n} for 3\n\n/* sched_puzz.als (7) */\nrun show_Meeting_but_no_instance{\n some Meeting\n no Person\n} for 3\n\n/* sched_puzz.als (8) */\nlet Schedule = Person -> Day\n\n/* sched_puzz.als (9) */\npred hold_meeting_every_day{\n all d: Day|\n -- 任意の日dについて、\n some m: Meeting|\n -- あるミーティングmが存在する\n m.HoldingDay = d\n -- mの開催日がdであるような。\n}\n\n/* sched_puzz.als (10) */\npred everyone_becomes_facilitator{\n all p: Person|\n -- 任意のメンバーpについて、\n some m: Meeting|\n -- あるミーティングmが存在する\n m.Facilitator = p\n -- mのファシリテータ役がpであるような。\n}\n\n/* sched_puzz.als (11) */\npred everyone_becomes_supporter{\n all p: Person|\n -- 任意のメンバーpについて、\n some m: Meeting|\n -- あるミーティングmが存在する\n m.Supporter = p\n -- mのサポーター役がpであるような。\n}\n\n/* sched_puzz.als (12) */\npred facilitator_and_supporter_are_different_person{\n all m: Meeting|\n -- 任意のミーティングmについて、\n no m.Facilitator & m.Supporter\n -- mのファシリテータとmのサポーター役が被ることはない\n}\n\n/* sched_puzz.als (13) */\npred every_meeting_is_on_staff_schedule[schedule: Schedule]{\n all m: Meeting|\n -- 任意のミーティングmと、\n let staff = m.Facilitator + m.Supporter|\n -- \"スタッフ\"とは、mのファシリテータ役とサポータ役であるとして、\n all s: staff|\n -- 任意のスタッフsについて、\n let available_days = s.schedule|\n -- \"参加可能日\"とは、スケジュールに記載されているsの参加可能日であるとして、\n m.HoldingDay in available_days\n -- mの開催日は参加可能日に含まれる。\n}\n\n/* sched_puzz.als (14) */\npred requirement[schedule: Schedule]{\n -- requirement 1\n hold_meeting_every_day\n -- requirement 2\n everyone_becomes_facilitator\n -- requirement 3\n everyone_becomes_supporter\n -- requirement 4\n facilitator_and_supporter_are_different_person\n -- requirement 5\n every_meeting_is_on_staff_schedule[schedule]\n}\n\n/* sched_puzz.als (15) */\nrun requirement_1to4{\n -- requirement 1\n hold_meeting_every_day\n -- requirement 2\n everyone_becomes_facilitator\n -- requirement 3\n everyone_becomes_supporter\n -- requirement 4\n facilitator_and_supporter_are_different_person\n -- requirement 5\n // It's necessary to give schedule information.\n // every_meeting_is_on_staff_schedule[?]\n} for 5\n\n/* sched_puzz.als (16) */\none sig A,B,C,D,E extends Person{}\n\n/* sched_puzz.als (17) */\none sig Mon,Tue,Wed,Thu,Fri extends Day{}\n\n/* sched_puzz.als (18) */\nlet Schedule_2023 ={\n A -> (Mon + Tue + Thu ) +\n B -> ( Tue + Wed + Thu + Fri) +\n C -> (Mon + Thu ) +\n D -> (Mon + Thu + Fri) +\n E -> ( Tue + Wed + Thu )\n}\n\n/* sched_puzz.als (19) */\nrun find_plan_2023{\n requirement[Schedule_2023]\n} for 5\n\n/* sched_puzz.als (20) */\nlet Schedule_2024 = Schedule_2023 ++ (C -> (Mon))\n\n/* sched_puzz.als (21) */\nrun find_plan_2024{\n requirement[Schedule_2024]\n} for 5\n\n/* sched_puzz.als (22) */\npred everyone_becomes_supporter_except_busy_person[schedule: Schedule]{\n let busy_person = \n -- \"忙しいメンバー\"とは、\n {p: Person| \n let available_days = p.schedule|\n -- (\"自分(p)の参加可能日\"とは、スケジュールに記載されている自分(p)の参加可能日とすれば、)\n lone available_days}|\n -- \"自分の参加可能日\"が一日以下のメンバーである。\n -- と定義した場合、\n all p: Person - busy_person|\n -- \"忙しいメンバー\"以外の任意のメンバーpについて、\n some m: Meeting|\n -- あるミーティングmが存在する\n m.Supporter = p\n -- mのサポーター役がpであるような。\n}\n\n/* sched_puzz.als (23) */\npred requirement_ver2[schedule: Schedule]{\n -- requirement 1\n hold_meeting_every_day\n -- requirement 2\n everyone_becomes_facilitator\n -- requirement 3\n // everyone_becomes_supporter\n everyone_becomes_supporter_except_busy_person[schedule]\n -- requirement 4\n facilitator_and_supporter_are_different_person\n -- requirement 5\n every_meeting_is_on_staff_schedule[schedule]\n}\n\n/* sched_puzz.als (24) */\nrun find_planB_2024{\n requirement_ver2[Schedule_2024]\n} for 5\n\n/* sched_puzz.als (25) */\nlet Schedule_2025 = Schedule_2024 ++ (D -> (Mon + Thu))\n\n/* sched_puzz.als (26) */\nrun find_plan_2025{\n requirement_ver2[Schedule_2025]\n} for 5\n\n/* sched_puzz.als (27) */\npred plan_someone_changes_available_days[schedule: Schedule]{\n one TheHelper[schedule]\n -- 与えられてスケジュールscheduleにおいて、「助けびと」が1名いる。\n}\n\n/* sched_puzz.als (28) */\nfun TheHelper[schedule: Schedule]: set Person{\n-- そのスケジュールでの「助けびと」とは、\n {p: Person|{\n -- 次のようなことが成立するメンバーpのことである。\n kept_available_days_except[schedule,p]\n -- p以外のメンバーの参加可能日は変更がなく、\n let available_days = AvailableDays[schedule,p]|\n some out_day: available_days|\n -- pの現在の参加可能日の中のある日をout_dayとし、\n some in_day: Day-available_days{\n -- pの現在の参加不能日の中のある日をin_dayとして、\n let\n alternative_available_days = available_days - out_day + in_day,\n -- (ちにみに、ここで、参加可能日変更案とは、\n --  現在のpの参加可能日から out_day を抜いて、in_day を加えた案であり、\n TheHelper_schedule = p -> alternative_available_days,\n -- 助けびとのスケジュールとは、pの参加可能日変更案であり、\n draft_schedule = schedule ++ TheHelper_schedule|\n -- スケジュール案とは、\n --  現在のスケジュールに助けびとのスケジュールを上書きしたものである。)\n requirement_ver2[draft_schedule]\n -- スケジュール案が開催要件version2を満たすこと。\n }\n }\n }\n}\n\n/* sched_puzz.als (29) */\npred kept_available_days_except[sched: Schedule, helper: Person]{\n-- helper以外のメンバーの参加可能日は変更がないとは、\n all m: Meeting|\n -- 任意のミーティングmについて、\n let \n f = m.Facilitator,\n s = m.Supporter,\n hd = m.HoldingDay{\n f != helper => hd in AvailableDays[sched, f]\n -- mのファシリテータ役fがhelperでないなら、mの開催日は、fの参加可能日であり、\n s != helper => hd in AvailableDays[sched, s]\n -- mのサポーター役sがhelperでないなら、mの開催日は、sの参加可能日である。\n }\n}\n\n/* sched_puzz.als (30) */\nlet AvailableDays[sched, x] = x.sched\n-- スケジュールに記載しているメンバーxのDay群をメンバーxの参加可能日と呼びます。\n\n/* sched_puzz.als (31) */\nrun find_planB_2025{\n\tplan_someone_changes_available_days[Schedule_2025]\n} for 5\n\n/* sched_puzz.als (32) */\nrun A_is_TheHelper_in_2025{\n A = TheHelper[Schedule_2025]\n} for 5\n\n/* sched_puzz.als (33) */\nrun B_is_TheHelper_in_2025{\n B = TheHelper[Schedule_2025]\n} for 5\n\n/* sched_puzz.als (34) */\nrun C_is_TheHelper_in_2025{\n C = TheHelper[Schedule_2025]\n} for 5\n\n/* sched_puzz.als (35) */\nrun D_is_TheHelper_in_2025{\n D = TheHelper[Schedule_2025]\n} for 5", "permalink": "stuck-plow-comma-chump", "time": "2024-10-14 09:50:03.542150", "cmd": 13} {"id": 17527, "parent": 17526, "code": "/* sched_puzz.als (1) */\n// sig Person{}\nabstract sig Person{}\n\n/* sched_puzz.als (2) */\nrun{\n some Person\n} for 5\n\n/* sched_puzz.als (3) */\n// sig Day{}\nabstract sig Day{}\n\n/* sched_puzz.als (4) */\nrun show_Day_only{\n no Person\n some Day\n} for 5\n\n/* sched_puzz.als (5) */\nsig Meeting{\n Facilitator : one Person,\n Supporter : one Person, \n HoldingDay : some Day,\n}\n\n/* sched_puzz.als (6) */\nrun show_Meeting{\n some Meeting\n} for 3\n\n/* sched_puzz.als (7) */\nrun show_Meeting_but_no_instance{\n some Meeting\n no Person\n} for 3\n\n/* sched_puzz.als (8) */\nlet Schedule = Person -> Day\n\n/* sched_puzz.als (9) */\npred hold_meeting_every_day{\n all d: Day|\n -- 任意の日dについて、\n some m: Meeting|\n -- あるミーティングmが存在する\n m.HoldingDay = d\n -- mの開催日がdであるような。\n}\n\n/* sched_puzz.als (10) */\npred everyone_becomes_facilitator{\n all p: Person|\n -- 任意のメンバーpについて、\n some m: Meeting|\n -- あるミーティングmが存在する\n m.Facilitator = p\n -- mのファシリテータ役がpであるような。\n}\n\n/* sched_puzz.als (11) */\npred everyone_becomes_supporter{\n all p: Person|\n -- 任意のメンバーpについて、\n some m: Meeting|\n -- あるミーティングmが存在する\n m.Supporter = p\n -- mのサポーター役がpであるような。\n}\n\n/* sched_puzz.als (12) */\npred facilitator_and_supporter_are_different_person{\n all m: Meeting|\n -- 任意のミーティングmについて、\n no m.Facilitator & m.Supporter\n -- mのファシリテータとmのサポーター役が被ることはない\n}\n\n/* sched_puzz.als (13) */\npred every_meeting_is_on_staff_schedule[schedule: Schedule]{\n all m: Meeting|\n -- 任意のミーティングmと、\n let staff = m.Facilitator + m.Supporter|\n -- \"スタッフ\"とは、mのファシリテータ役とサポータ役であるとして、\n all s: staff|\n -- 任意のスタッフsについて、\n let available_days = s.schedule|\n -- \"参加可能日\"とは、スケジュールに記載されているsの参加可能日であるとして、\n m.HoldingDay in available_days\n -- mの開催日は参加可能日に含まれる。\n}\n\n/* sched_puzz.als (14) */\npred requirement[schedule: Schedule]{\n -- requirement 1\n hold_meeting_every_day\n -- requirement 2\n everyone_becomes_facilitator\n -- requirement 3\n everyone_becomes_supporter\n -- requirement 4\n facilitator_and_supporter_are_different_person\n -- requirement 5\n every_meeting_is_on_staff_schedule[schedule]\n}\n\n/* sched_puzz.als (15) */\nrun requirement_1to4{\n -- requirement 1\n hold_meeting_every_day\n -- requirement 2\n everyone_becomes_facilitator\n -- requirement 3\n everyone_becomes_supporter\n -- requirement 4\n facilitator_and_supporter_are_different_person\n -- requirement 5\n // It's necessary to give schedule information.\n // every_meeting_is_on_staff_schedule[?]\n} for 5\n\n/* sched_puzz.als (16) */\none sig A,B,C,D,E extends Person{}\n\n/* sched_puzz.als (17) */\none sig Mon,Tue,Wed,Thu,Fri extends Day{}\n\n/* sched_puzz.als (18) */\nlet Schedule_2023 ={\n A -> (Mon + Tue + Thu ) +\n B -> ( Tue + Wed + Thu + Fri) +\n C -> (Mon + Thu ) +\n D -> (Mon + Thu + Fri) +\n E -> ( Tue + Wed + Thu )\n}\n\n/* sched_puzz.als (19) */\nrun find_plan_2023{\n requirement[Schedule_2023]\n} for 5\n\n/* sched_puzz.als (20) */\nlet Schedule_2024 = Schedule_2023 ++ (C -> (Mon))\n\n/* sched_puzz.als (21) */\nrun find_plan_2024{\n requirement[Schedule_2024]\n} for 5\n\n/* sched_puzz.als (22) */\npred everyone_becomes_supporter_except_busy_person[schedule: Schedule]{\n let busy_person = \n -- \"忙しいメンバー\"とは、\n {p: Person| \n let available_days = p.schedule|\n -- (\"自分(p)の参加可能日\"とは、スケジュールに記載されている自分(p)の参加可能日とすれば、)\n lone available_days}|\n -- \"自分の参加可能日\"が一日以下のメンバーである。\n -- と定義した場合、\n all p: Person - busy_person|\n -- \"忙しいメンバー\"以外の任意のメンバーpについて、\n some m: Meeting|\n -- あるミーティングmが存在する\n m.Supporter = p\n -- mのサポーター役がpであるような。\n}\n\n/* sched_puzz.als (23) */\npred requirement_ver2[schedule: Schedule]{\n -- requirement 1\n hold_meeting_every_day\n -- requirement 2\n everyone_becomes_facilitator\n -- requirement 3\n // everyone_becomes_supporter\n everyone_becomes_supporter_except_busy_person[schedule]\n -- requirement 4\n facilitator_and_supporter_are_different_person\n -- requirement 5\n every_meeting_is_on_staff_schedule[schedule]\n}\n\n/* sched_puzz.als (24) */\nrun find_planB_2024{\n requirement_ver2[Schedule_2024]\n} for 5\n\n/* sched_puzz.als (25) */\nlet Schedule_2025 = Schedule_2024 ++ (D -> (Mon + Thu))\n\n/* sched_puzz.als (26) */\nrun find_plan_2025{\n requirement_ver2[Schedule_2025]\n} for 5\n\n/* sched_puzz.als (27) */\npred plan_someone_changes_available_days[schedule: Schedule]{\n one TheHelper[schedule]\n -- 与えられてスケジュールscheduleにおいて、「助けびと」が1名いる。\n}\n\n/* sched_puzz.als (28) */\nfun TheHelper[schedule: Schedule]: set Person{\n-- そのスケジュールでの「助けびと」とは、\n {p: Person|{\n -- 次のようなことが成立するメンバーpのことである。\n kept_available_days_except[schedule,p]\n -- p以外のメンバーの参加可能日は変更がなく、\n let available_days = AvailableDays[schedule,p]|\n some out_day: available_days|\n -- pの現在の参加可能日の中のある日をout_dayとし、\n some in_day: Day-available_days{\n -- pの現在の参加不能日の中のある日をin_dayとして、\n let\n alternative_available_days = available_days - out_day + in_day,\n -- (ちにみに、ここで、参加可能日変更案とは、\n --  現在のpの参加可能日から out_day を抜いて、in_day を加えた案であり、\n TheHelper_schedule = p -> alternative_available_days,\n -- 助けびとのスケジュールとは、pの参加可能日変更案であり、\n draft_schedule = schedule ++ TheHelper_schedule|\n -- スケジュール案とは、\n --  現在のスケジュールに助けびとのスケジュールを上書きしたものである。)\n requirement_ver2[draft_schedule]\n -- スケジュール案が開催要件version2を満たすこと。\n }\n }\n }\n}\n\n/* sched_puzz.als (29) */\npred kept_available_days_except[sched: Schedule, helper: Person]{\n-- helper以外のメンバーの参加可能日は変更がないとは、\n all m: Meeting|\n -- 任意のミーティングmについて、\n let \n f = m.Facilitator,\n s = m.Supporter,\n hd = m.HoldingDay{\n f != helper => hd in AvailableDays[sched, f]\n -- mのファシリテータ役fがhelperでないなら、mの開催日は、fの参加可能日であり、\n s != helper => hd in AvailableDays[sched, s]\n -- mのサポーター役sがhelperでないなら、mの開催日は、sの参加可能日である。\n }\n}\n\n/* sched_puzz.als (30) */\nlet AvailableDays[sched, x] = x.sched\n-- スケジュールに記載しているメンバーxのDay群をメンバーxの参加可能日と呼びます。\n\n/* sched_puzz.als (31) */\nrun find_planB_2025{\n\tplan_someone_changes_available_days[Schedule_2025]\n} for 5\n\n/* sched_puzz.als (32) */\nrun A_is_TheHelper_in_2025{\n A = TheHelper[Schedule_2025]\n} for 5\n\n/* sched_puzz.als (33) */\nrun B_is_TheHelper_in_2025{\n B = TheHelper[Schedule_2025]\n} for 5\n\n/* sched_puzz.als (34) */\nrun C_is_TheHelper_in_2025{\n C = TheHelper[Schedule_2025]\n} for 5\n\n/* sched_puzz.als (35) */\nrun D_is_TheHelper_in_2025{\n D = TheHelper[Schedule_2025]\n} for 5", "permalink": "create-scary-feisty-april", "time": "2024-10-14 09:47:54.425815", "cmd": 1} {"id": 17529, "parent": 17528, "code": "/* sched_puzz.als (1) */\n// sig Person{}\nabstract sig Person{}\n\n/* sched_puzz.als (2) */\nrun{\n some Person\n} for 5\n\n/* sched_puzz.als (3) */\n// sig Day{}\nabstract sig Day{}\n\n/* sched_puzz.als (4) */\nrun show_Day_only{\n no Person\n some Day\n} for 5\n\n/* sched_puzz.als (5) */\nsig Meeting{\n Facilitator : one Person,\n Supporter : one Person, \n HoldingDay : some Day,\n}\n\n/* sched_puzz.als (6) */\nrun show_Meeting{\n some Meeting\n} for 3\n\n/* sched_puzz.als (7) */\nrun show_Meeting_but_no_instance{\n some Meeting\n no Person\n} for 3\n\n/* sched_puzz.als (8) */\nlet Schedule = Person -> Day\n\n/* sched_puzz.als (9) */\npred hold_meeting_every_day{\n all d: Day|\n -- 任意の日dについて、\n some m: Meeting|\n -- あるミーティングmが存在する\n m.HoldingDay = d\n -- mの開催日がdであるような。\n}\n\n/* sched_puzz.als (10) */\npred everyone_becomes_facilitator{\n all p: Person|\n -- 任意のメンバーpについて、\n some m: Meeting|\n -- あるミーティングmが存在する\n m.Facilitator = p\n -- mのファシリテータ役がpであるような。\n}\n\n/* sched_puzz.als (11) */\npred everyone_becomes_supporter{\n all p: Person|\n -- 任意のメンバーpについて、\n some m: Meeting|\n -- あるミーティングmが存在する\n m.Supporter = p\n -- mのサポーター役がpであるような。\n}\n\n/* sched_puzz.als (12) */\npred facilitator_and_supporter_are_different_person{\n all m: Meeting|\n -- 任意のミーティングmについて、\n no m.Facilitator & m.Supporter\n -- mのファシリテータとmのサポーター役が被ることはない\n}\n\n/* sched_puzz.als (13) */\npred every_meeting_is_on_staff_schedule[schedule: Schedule]{\n all m: Meeting|\n -- 任意のミーティングmと、\n let staff = m.Facilitator + m.Supporter|\n -- \"スタッフ\"とは、mのファシリテータ役とサポータ役であるとして、\n all s: staff|\n -- 任意のスタッフsについて、\n let available_days = s.schedule|\n -- \"参加可能日\"とは、スケジュールに記載されているsの参加可能日であるとして、\n m.HoldingDay in available_days\n -- mの開催日は参加可能日に含まれる。\n}\n\n/* sched_puzz.als (14) */\npred requirement[schedule: Schedule]{\n -- requirement 1\n hold_meeting_every_day\n -- requirement 2\n everyone_becomes_facilitator\n -- requirement 3\n everyone_becomes_supporter\n -- requirement 4\n facilitator_and_supporter_are_different_person\n -- requirement 5\n every_meeting_is_on_staff_schedule[schedule]\n}\n\n/* sched_puzz.als (15) */\nrun requirement_1to4{\n -- requirement 1\n hold_meeting_every_day\n -- requirement 2\n everyone_becomes_facilitator\n -- requirement 3\n everyone_becomes_supporter\n -- requirement 4\n facilitator_and_supporter_are_different_person\n -- requirement 5\n // It's necessary to give schedule information.\n // every_meeting_is_on_staff_schedule[?]\n} for 5\n\n/* sched_puzz.als (16) */\none sig A,B,C,D,E extends Person{}\n\n/* sched_puzz.als (17) */\none sig Mon,Tue,Wed,Thu,Fri extends Day{}\n\n/* sched_puzz.als (18) */\nlet Schedule_2023 ={\n A -> (Mon + Tue + Thu ) +\n B -> ( Tue + Wed + Thu + Fri) +\n C -> (Mon + Thu ) +\n D -> (Mon + Thu + Fri) +\n E -> ( Tue + Wed + Thu )\n}\n\n/* sched_puzz.als (19) */\nrun find_plan_2023{\n requirement[Schedule_2023]\n} for 5\n\n/* sched_puzz.als (20) */\nlet Schedule_2024 = Schedule_2023 ++ (C -> (Mon))\n\n/* sched_puzz.als (21) */\nrun find_plan_2024{\n requirement[Schedule_2024]\n} for 5\n\n/* sched_puzz.als (22) */\npred everyone_becomes_supporter_except_busy_person[schedule: Schedule]{\n let busy_person = \n -- \"忙しいメンバー\"とは、\n {p: Person| \n let available_days = p.schedule|\n -- (\"自分(p)の参加可能日\"とは、スケジュールに記載されている自分(p)の参加可能日とすれば、)\n lone available_days}|\n -- \"自分の参加可能日\"が一日以下のメンバーである。\n -- と定義した場合、\n all p: Person - busy_person|\n -- \"忙しいメンバー\"以外の任意のメンバーpについて、\n some m: Meeting|\n -- あるミーティングmが存在する\n m.Supporter = p\n -- mのサポーター役がpであるような。\n}\n\n/* sched_puzz.als (23) */\npred requirement_ver2[schedule: Schedule]{\n -- requirement 1\n hold_meeting_every_day\n -- requirement 2\n everyone_becomes_facilitator\n -- requirement 3\n // everyone_becomes_supporter\n everyone_becomes_supporter_except_busy_person[schedule]\n -- requirement 4\n facilitator_and_supporter_are_different_person\n -- requirement 5\n every_meeting_is_on_staff_schedule[schedule]\n}\n\n/* sched_puzz.als (24) */\nrun find_planB_2024{\n requirement_ver2[Schedule_2024]\n} for 5\n\n/* sched_puzz.als (25) */\nlet Schedule_2025 = Schedule_2024 ++ (D -> (Mon + Thu))\n\n/* sched_puzz.als (26) */\nrun find_plan_2025{\n requirement_ver2[Schedule_2025]\n} for 5\n\n/* sched_puzz.als (27) */\npred plan_someone_changes_available_days[schedule: Schedule]{\n one TheHelper[schedule]\n -- 与えられてスケジュールscheduleにおいて、「助けびと」が1名いる。\n}\n\n/* sched_puzz.als (28) */\nfun TheHelper[schedule: Schedule]: set Person{\n-- そのスケジュールでの「助けびと」とは、\n {p: Person|{\n -- 次のようなことが成立するメンバーpのことである。\n kept_available_days_except[schedule,p]\n -- p以外のメンバーの参加可能日は変更がなく、\n let available_days = AvailableDays[schedule,p]|\n some out_day: available_days|\n -- pの現在の参加可能日の中のある日をout_dayとし、\n some in_day: Day-available_days{\n -- pの現在の参加不能日の中のある日をin_dayとして、\n let\n alternative_available_days = available_days - out_day + in_day,\n -- (ちにみに、ここで、参加可能日変更案とは、\n --  現在のpの参加可能日から out_day を抜いて、in_day を加えた案であり、\n TheHelper_schedule = p -> alternative_available_days,\n -- 助けびとのスケジュールとは、pの参加可能日変更案であり、\n draft_schedule = schedule ++ TheHelper_schedule|\n -- スケジュール案とは、\n --  現在のスケジュールに助けびとのスケジュールを上書きしたものである。)\n requirement_ver2[draft_schedule]\n -- スケジュール案が開催要件version2を満たすこと。\n }\n }\n }\n}\n\n/* sched_puzz.als (29) */\npred kept_available_days_except[sched: Schedule, helper: Person]{\n-- helper以外のメンバーの参加可能日は変更がないとは、\n all m: Meeting|\n -- 任意のミーティングmについて、\n let \n f = m.Facilitator,\n s = m.Supporter,\n hd = m.HoldingDay{\n f != helper => hd in AvailableDays[sched, f]\n -- mのファシリテータ役fがhelperでないなら、mの開催日は、fの参加可能日であり、\n s != helper => hd in AvailableDays[sched, s]\n -- mのサポーター役sがhelperでないなら、mの開催日は、sの参加可能日である。\n }\n}\n\n/* sched_puzz.als (30) */\nlet AvailableDays[sched, x] = x.sched\n-- スケジュールに記載しているメンバーxのDay群をメンバーxの参加可能日と呼びます。\n\n/* sched_puzz.als (31) */\nrun find_planB_2025{\n\tplan_someone_changes_available_days[Schedule_2025]\n} for 5\n\n/* sched_puzz.als (32) */\nrun A_is_TheHelper_in_2025{\n A = TheHelper[Schedule_2025]\n} for 5\n\n/* sched_puzz.als (33) */\nrun B_is_TheHelper_in_2025{\n B = TheHelper[Schedule_2025]\n} for 5\n\n/* sched_puzz.als (34) */\nrun C_is_TheHelper_in_2025{\n C = TheHelper[Schedule_2025]\n} for 5\n\n/* sched_puzz.als (35) */\nrun D_is_TheHelper_in_2025{\n D = TheHelper[Schedule_2025]\n} for 5", "permalink": "gilled-lint-lid-blunt", "time": "2024-10-14 09:49:01.429801", "cmd": 2} {"id": 17532, "parent": 17531, "code": "---\ntitle: 分散合意アルゴリズム(Paxos/形式的仕様)\n---\n\n\n\n\n\n\n- [Definition](#definition)\n - [Node](#node)\n - [Proposer](#proposer)\n - [Acceptor](#acceptor)\n - [Learner](#learner)\n - [Protocol](#protocol)\n - [prepare](#prepare)\n - [promise](#promise)\n - [accept](#accept)\n - [choice](#choice)\n- [Simulation](#simulation)\n - [Transition](#transition)\n - [Init](#init)\n - [Phase](#phase)\n - [Paxos Modeling](#paxos-modeling)\n - [Verification](#verification)\n - [Example](#example)\n\n\n\nTODO\n状態遷移の長さを減らすため、Phase1a, Phase1b をPhase1にまとめる。Phase2 も同様。\n\n## Definition\n```alloy\nopen util/integer\n\nsome sig Value {}\nvar sig ProposedValue in Value{}\n\nabstract sig Phase{}\none sig Phase1a, Phase1b, Phase2a, Phase2b extends Phase{}\n\nabstract sig Event{}\none sig Prepare, Promise, Accept, Choice extends Event{}\n\nsig Node{}\n\nlet ProposalNumber = Int\nlet true = some univ\n```\n### Node\n#### Proposer\n```alloy\nsome sig Proposer in Node{\n\tvar phase: lone Phase,\n\tvar proposal_number: ProposalNumber,\n\tvar accepted_info: Acceptor -> ProposalNumber -> Value, \n\tvar _event: lone Event,\n}\n\npred reset[p: Proposer]{\n\tp.phase' = Phase1a\n\tp.proposal_number' = max[Proposer.proposal_number].next\n\tno p.accepted_info'\n}\n\npred log_to[e: Event, p: Proposer]{\n\tp._event' = e\n\tall x: Proposer - p{\n\t\tx.phase' = x.phase\n\t\tx.proposal_number' = x.proposal_number\n\t\tx.accepted_info' = x.accepted_info\n\t\tx._event' = x._event\n\t}\n}\n\nvar lone sig Leader in Proposer{}\n```\n#### Acceptor\n```alloy\nsome sig Acceptor in Node{\n\tvar promised: lone ProposalNumber,\n\tvar accepted: ProposalNumber lone -> lone Value, \n\tvar _context: lone Proposer,\n}\n\npred is_quorum[A: set Acceptor]{\n\tlet anti = Acceptor - A|\n\t#A > #anti\n}\n\nfact Acceptor{\n\t#Acceptor > 1\n\tno i: Int| mul[i,2] = #Acceptor\n}\n```\n#### Learner\n```alloy\nsome sig Learner in Node{\n\tvar value: set Value,\n}\n```\n### Protocol\n#### prepare\n```alloy\npred prepare[leader: Proposer]{\n-- precondtion\n\tleader.phase = Phase1a\n\tleader in Leader\n\n-- postcondtion\n\tleader.phase' = Phase1b\n\tall a: Acceptor| \n\tlet n = leader.proposal_number{\n\t\t{-- can communicate and can promise\n\t\t-- precondition part\n\t\t\tn.is_newer_proposal_for[a]\n\t\t\tno a._context \n\t\t-- postcondition part\n\t\t\ta.promised' = n\n\t\t\ta._context' = leader\n\t\t}\n\t\tor\n\t\t{-- can't communication or can't promise \n\t\t-- precondition part\n\t\t\tleader != a // acceptor is not the proposer in this case.\n\t\t-- postcondition part\n\t\t\ta.promised' = a.promised\n\t\t\ta._context' = a._context\n\t\t}\t\t\n\t}\n\tPrepare.log_to[leader]\n\n-- frame condition\n\tall p: Proposer{\n\t\tp != leader => p.phase' = p.phase\n\t\tp.proposal_number' = p.proposal_number\n\t\tp.accepted_info' = p.accepted_info\n\t}\n\tall a: Acceptor{\n\t\t// a.promised' = a.promised\n\t\ta.accepted' = a.accepted\n\t\t// a._context' = a._context\n\t}\n\tall l: Learner{\n\t\tl.value' = l.value\n\t}\n\tProposedValue' = ProposedValue\n}\n\npred is_newer_proposal_for[n: Int, a: Acceptor]{\n\tno a.promised or (a.promised < n)\n}\n```\n#### promise\n```alloy\npred promise[leader: Proposer]{\n-- precondtion\n\tleader.phase = Phase1b\n\tleader in Leader\n\n-- postcondtion\n\tpromised_acceptors[leader].is_quorum =>{\n\t\tleader.phase' = Phase2a\n\t\tleader.proposal_number' = leader.proposal_number\n\t\tleader.accepted_info' = \n\t\t\t{a: Acceptor, n: ProposalNumber, v: Value| \n\t\t\t\ta in promised_acceptors[leader] and n -> v = a.accepted}\n\t} else {\n\t\tleader.reset\n\t}\n\tall a: Acceptor{\n\t\ta._context = leader =>\n\t\t\tno a._context'\n\t\telse\n\t\t\ta._context' = a._context\n\t}\n\tPromise.log_to[leader]\n\n-- frame condition\n\tall p: Proposer{\n\t\tp != leader => p.phase' = p.phase\n\t\tp != leader => p.proposal_number' = p.proposal_number\n\t\tp != leader => p.accepted_info' = p.accepted_info\n\t}\n\tall a: Acceptor{\n\t\ta.promised' = a.promised\n\t\ta.accepted' = a.accepted\n\t\t// a._context' = a._context\n\t}\n\tall l: Learner{\n\t\tl.value' = l.value\n\t}\n\tProposedValue' = ProposedValue\n}\n\nfun promised_acceptors[p: Proposer]: set Acceptor{\n\t{a: Acceptor| a.promised = p.proposal_number}\n}\n\nfun promised_acceptor: Proposer -> Acceptor{\n\t{p: Proposer, a: Acceptor| a in p.promised_acceptors}\n}\n```\n#### accept\n```alloy\npred accept[leader: set Proposer]{\n-- precondtion\n\tleader.phase = Phase2a\n\tleader in Leader\n\n-- postcondtion\n\tlet my_proposal_acceptors = leader.promised_acceptors|\n\tlet current_proposal_acceptors = \n\t\t{a: my_proposal_acceptors| a.promised = leader.proposal_number and no a._context}|\n\tlet accepted_num_and_val = leader.accepted_info[univ]|\n\tlet accepted_numbers = accepted_num_and_val.univ|\n\tlet most_recent_n = max[accepted_numbers]|\n\t{\n\t\tcurrent_proposal_acceptors.is_quorum =>{\n\t\t\tleader.phase' = Phase2b\n\t\t\tleader.proposal_number' = leader.proposal_number\n\t\t} else {\n\t\t\tleader.reset\n\t\t}\n\t\tsome most_recent_n =>{\n\t\t\tlet proposal_v = accepted_num_and_val[most_recent_n]{\n\t\t\t\tall a: Acceptor{\n\t\t\t\t\ta in current_proposal_acceptors =>{\n\t\t\t\t\t\ta.accepted' = a.promised -> proposal_v\n\t\t\t\t\t\ta._context' = leader\n\t\t\t\t\t} else {\n\t\t\t\t\t\ta.accepted' = a.accepted\n\t\t\t\t\t\ta._context' = a._context\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tProposedValue' = ProposedValue + proposal_v\n\t\t\t}\n\t\t} else {\n\t\t\tone proposal_v: Value{\n\t\t\t\tall a: Acceptor{\n\t\t\t\t\ta in current_proposal_acceptors =>{\n\t\t\t\t\t\ta.accepted' = a.promised -> proposal_v\n\t\t\t\t\t\ta._context' = leader\n\t\t\t\t\t} else {\n\t\t\t\t\t\ta.accepted' = a.accepted\n\t\t\t\t\t\ta._context' = a._context\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tProposedValue' = ProposedValue + proposal_v\n\t\t\t}\n\t\t}\n\t}\n\tAccept.log_to[leader]\n\t\n-- frame condition\n\tall p: Proposer{\n\t\tp != leader => p.phase' = p.phase\n\t\tp != leader => p.proposal_number' = p.proposal_number\n\t\tp != leader => p.accepted_info' = p.accepted_info\n\t}\n\tall a: Acceptor{\n\t\ta.promised' = a.promised\n\t\t// a.accepted' = a.accepted\n\t\t// a._context' = a._context\n\t}\n\tall l: Learner{\n\t\tl.value' = l.value\n\t}\n}\n```\n#### choice\n```alloy\npred choice[leader: Proposer]{\n-- precondtion\n\tleader.phase = Phase2b\n\tleader in Leader\n\n-- postcondtion\n\tno leader.phase'\tlet current_proposal_acceptors = \n\t\t{a: leader.promised_acceptors| a._context = leader}|\n\t{\n\t\tall l: Learner|\n\t\t\tcurrent_proposal_acceptors.is_quorum =>{\n\t\t\t\tlet proposal_V = current_proposal_acceptors.accepted[leader.proposal_number]|\n\t\t\t\tl.value' = l.value + proposal_V\n\t\t\t} else {\n\t\t\t\tl.value' = l.value\n\t\t\t}\n\t\tall a: Acceptor|\n\t\t\ta._context = leader =>\n\t\t\t\tno a._context'\n\t\t\telse\n\t\t\t\ta._context' = a._context\n\t}\n\tLeader' != leader\n\tChoice.log_to[leader]\n\n-- frame condition\n\tall p: Proposer{\n\t\tp != leader => p.phase' = p.phase\n\t\tp.proposal_number' = p.proposal_number\n\t\tp.accepted_info' = p.accepted_info\n\t}\n\tall a: Acceptor{\n\t\ta.promised' = a.promised\n\t\ta.accepted' = a.accepted\n\t\t// a._context' = a._context\n\t}\n\t// all l: Learner{\n\t// \tl.value' = l.value\n\t// }\n\tProposedValue' = ProposedValue\n}\n```\n## Simulation\n### Transition\n#### Init\n```alloy\n\npred Init{\n\tall p: Proposer{\n\t\tp.phase = Phase1a\n\t\tp.proposal_number.gte[0]\n\t\tno p.accepted_info\n\t\tno p._event\n\t}\n\tall disj p1,p2: Proposer{\n\t\tp1.proposal_number != p2.proposal_number\n\t}\n\tone Leader\n\n\tall a: Acceptor{\n\t\tno a.promised\n\t\tno a.accepted\n\t\tno a._context\n\t}\n\n\tall l: Learner{\n\t\tno l.value\n\t}\n\n\tno ProposedValue\n}\n```\n#### Phase\n```alloy\npred Phase1a{\n\tsome leader: Leader| leader.prepare\n}\n\npred Phase1b{\n\tsome leader: Leader| leader.promise\n}\n\npred Phase2a{\n\tsome leader: Leader| leader.accept\n}\n\npred Phase2b{\n\tsome leader: Leader| leader.choice\n}\n\npred End{\n\t-- precondition\n\tall p: Proposer| no p.phase\n\n\t-- post condition\n\t-- n/a\n\n\t-- frame condition\n\tall p: Proposer{\n\t\tp.phase' = p.phase\n\t\tp.proposal_number' = p.proposal_number\n\t\tp.accepted_info' = p.accepted_info\n\t\tp._event' = p._event\n\t}\n\tall a: Acceptor{\n\t\ta.promised' = a.promised\n\t\ta.accepted' = a.accepted\n\t\ta._context' = a._context\n\t}\n\tall l: Learner{\n\t\tl.value' = l.value\n\t}\n\tProposedValue' = ProposedValue\n}\n```\n### Paxos Modeling\n```alloy\npred Paxos{\n\tInit\n\talways{\n\t\tPhase1a or Phase1b or Phase2a or Phase2b or End \n\t}\n}\n```\n### Verification \n```alloy\n\nrun all_proposer_are_acceptor{\n\t// #Proposer = 1//ok\n\t// #Proposer = 2//ok\n\t#Proposer = 3//ok\n\t#Acceptor = 3\n\t#Learner = 1\n\t// eventually #ProposedValue = 2\n\tall p: Proposer| p in Acceptor\n\tno Proposer & Learner\n\tno Acceptor & Learner\n\tPaxos\n} \nfor 3 but exactly 4 Node, 15 steps\n\nrun Two_proposed_value{\n\t// #Proposer = 1\n\t#Proposer = 2\n\t#Acceptor = 3\n\t#Learner = 1\n\teventually #ProposedValue = 2\n\tno Proposer & Acceptor\n\tno Proposer & Learner\n\tno Acceptor & Learner\n\tPaxos\n} \nfor 3 but exactly 6 Node, 15 steps\n\nrun Multiple_roal{\n\t#Proposer = 2\n\t// #Proposer = 3 // NIF\n\t#Acceptor = 3\n\t#Learner = 3\n\teventually #ProposedValue > 1\n\tPaxos\n}\nfor 3 but exactly 3 Node, 15 steps\n// for 3 but 18 steps\n// for 3 but 5 Node//, exactly 1 Proposer, 3 Acceptor, 1 Learner\n\npred Only_a_value_that_has_been_proposed_may_be_chosen{\n\talways all l: Learner| l.value in ProposedValue\n}\n\npred Only_a_single_value_is_chosen{\n\talways lone Learner.value\n}\n\nrun Safety{\n\t#Proposer = 3\n\t#Acceptor = 3\n\t#Learner = 3\n\tPaxos\n\tOnly_a_value_that_has_been_proposed_may_be_chosen\n\tOnly_a_single_value_is_chosen\n}\nfor 3 but 13 steps\n\ncheck Safety{\n\t{\n\t\t#Proposer = 3\n\t\t#Acceptor = 3\n\t\t#Learner = 3\n\t\tPaxos \n\t} => {\n\t\tOnly_a_value_that_has_been_proposed_may_be_chosen\n\t\tOnly_a_single_value_is_chosen\n\t}\n}\nfor 3 but 13 steps\n\n\npred Some_proposed_value_is_eventually_chosen{\n\teventually some Learner.value\n}\n\nrun Liveness{\n\t#Proposer = 3\n\t#Acceptor = 3\n\t#Learner = 3\n\tPaxos\n\tSome_proposed_value_is_eventually_chosen\n}\nfor 3 but 13 steps\n\ncheck Liveness{\n\t{\n\t\t#Proposer = 3\n\t\t#Acceptor = 3\n\t\t#Learner = 3\n\t\tPaxos\n\t} => {\n\t\tSome_proposed_value_is_eventually_chosen\n\t}\n}\nfor 3 but exactly 3 Node, 13 steps\n```\n\n### Example\n```alloy\none sig ラーメン, カレー extends Value{}\none sig Aさん, Bさん, Cさん, Dさん, Eさん extends Node{}\n\nlet 全員 = Node\nlet 発案者 = Proposer\nlet\t案を選ぶ人 = Acceptor\nlet 合意に従う人 = Learner\n\npred 今回の提案は[V: set Value]{\n\teventually ProposedValue = V\n}\n\npred ランチ合意の前提{\n\t全員 = Aさん + Bさん + Cさん + Dさん + Eさん\n\t発案者 = Aさん + Bさん\n\t案を選ぶ人 = 全員\n\t合意に従う人 = 全員\n\t今回の提案は[ラーメン + カレー]\n}\n\npred Paxosによるランチ合意形成{\n\tランチ合意の前提\n\tPaxos\n}\n\nrun Paxosによるランチ合意形成 for 3 but exactly 5 Node, 2 Value, 13 steps\n\n\n\npred ランチ合意の前提2{\n\t全員 = Aさん + Bさん + Cさん + Dさん + Eさん\n\t発案者 = Aさん\n\t案を選ぶ人 = 全員\n\t合意に従う人 = 全員\n\t今回の提案は[ラーメン + カレー]\n}\n\npred Paxosによるランチ合意形成2{\n\tランチ合意の前提2\n\tPaxos\n}\n\nrun Paxosによるランチ合意形成2 for 3 but exactly 5 Node, 2 Value, 16 steps\n```", "permalink": "rehire-outwit-aged-amber", "time": "2024-10-14 09:52:48.946424", "cmd": 2} {"id": 18440, "parent": 18439, "code": "// % video: https://www.youtube.com/watch?v=ilgA1j22o9M&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=4\n\n% 1 If the train arrives late and there are no \n% taxis at the station, then John is late \n% for his meeting.\n( (trainLate & !taxi -> johnLate) &\n\n% 2 John is not late for his meeting.\n (!johnLate) &\n\n% 3 The train did arrive late.\n (trainLate)\n) ->\n\n% 4 Therefore, there were taxis at the station.\ntaxi", "permalink": "smugly-hazing-sliced-dense", "time": "2024-10-18 17:31:16.052536", "cmd": 1} {"id": 20296, "parent": 20295, "code": "// video: https://www.youtube.com/watch?v=cwnjBUyCNdM&list=PLGyeoukah9NYq9ULsIuADG2r2QjX530nf&index=6\n\n// simple, temporal model of a traffic light (unsafe) \nabstract sig Light {\n var color : one Color,\n var car : lone Car\n} {\n always (some car implies eventually color = GREEN)\n}\n\nsig Car {}\nenum Color {GREEN, RED}\n\n// concrete traffic lights in the scenario\none sig LightA, LightB extends Light {}\n\npred crash {\n LightA.col GREEN and LightB.color = GREEN\n}\n\nfact initiallyBothRed {\n Light.color = RED\n}\n\nassert neverCrash {always not crash}\n\ncheck neverCrash", "permalink": "gap-vegan-errand-hatred", "time": "2024-10-23 13:03:57.975777", "cmd": 1} {"id": 20299, "parent": null, "code": "open util/integer\n\n// Alloy model generated for deep embedding\n\none sig FM {\n root: one Feature,\n group: set Feature,\n require: ConstraintNode -> ConstraintNode,\n exclude: ConstraintNode -> ConstraintNode,\n config: set Instance\n}\n\nabstract sig Feature {\n groupCardinality: set Intervall,\n groupInstanceCardinality: set Intervall,\n cardinality: some Intervall,\n parent: lone Feature,\n instances: set Instance\n}\n\nsig Instance {\n feature: one Feature,\n instanceParent: lone Instance\n}\n\nsig Intervall {\n lowerBound: Int,\n upperBound: Int + KleeneStar\n}\n\nabstract sig ConstraintNode {\n feature: one Feature,\n cardinality: some Intervall\n}\n\none sig KleeneStar {}\n\npred IsRoot (f: Feature) {\n f = FM.root\n}\n\npred IsPossibleCardinality (f: Feature, d: Int) {\n one i: Intervall | i in f.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupCardinality (f: Feature, d: Int) {\n one i: Intervall | i in f.groupCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsPossibleGroupInstanceCardinality (f: Feature, d: Int) {\n one i: Intervall | i in f.groupInstanceCardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\npred IsInsideConstraintIntervall (c: ConstraintNode, d: Int) {\n one i: Intervall | i in c.cardinality && d >= i.lowerBound && (d <= i.upperBound || i.upperBound = KleeneStar)\n}\n\nfact intervallPositive {\n all i: Intervall | i.lowerBound >= 0 && (i.upperBound >= i.lowerBound || i.upperBound = KleeneStar)\n}\n\nfact intervallIsAttribute {\n all i: Intervall | (i in Feature.cardinality || i in Feature.groupCardinality || i in Feature.groupInstanceCardinality || i in ConstraintNode.cardinality)\n}\n\nfact noClustering {\n all i, j: Intervall | no f: Feature | i != j && i in f.cardinality && j in f.cardinality && OverlappingIntervall[i, j]\n all i, j: Intervall | no f: Feature | i != j && i in f.groupCardinality && j in f.groupCardinality && OverlappingIntervall[i, j]\n all i, j: Intervall | no f: Feature | i != j && i in f.groupInstanceCardinality && j in f.groupInstanceCardinality && OverlappingIntervall[i, j]\n all i, j: Intervall | no c: ConstraintNode | i != j && i in c.cardinality && j in c.cardinality && OverlappingIntervall[i, j]\n}\n\npred OverlappingIntervall(i: Intervall, j: Intervall) {\n (i.lowerBound <= j.lowerBound && (i.upperBound >= j.lowerBound || i.upperBound = KleeneStar)) || i.lowerBound = j.upperBound.plus[1]\n}\n\nfact rootTree {\n all f: Feature | FM.root in f.*parent\n all f: FM.root | no f.parent\n all f: Feature - FM.root | one f.parent\n no f: Feature | f in f.^parent\n}\n\nfact configuration {\n all i: Instance | i in FM.config\n}\n\nfact root{\n all f: FM.root | IsPossibleCardinality[f, #(f.instances)]\n all f: Feature | f in FM.group || f in FM.root\n}\n\nfact inGroupOrSingleton {\n all f: Feature | some (f.~parent & FM.group) implies #(f.~parent & FM.group) = #f.~parent\n}\n\nfact onlyGroupNodeCanHaveGroupCardinalities {\n all f: Feature | all i: Intervall | #(f.~parent & FM.group) = 0 implies !(i in f.groupCardinality || i in f.groupInstanceCardinality)\n}\n\nfact childParentConstraint {\n all i: Instance | not i in FM.root.instances implies #i.instanceParent = 1 else #i.instanceParent = 0\n}\n\nfact constraintNodeOnlyInConstraintEdge {\n all c1: ConstraintNode | some c2: ConstraintNode | c1 in FM.require[c2] || c2 in FM.require[c1] || c1 in FM.exclude[c2] || c2 in FM.exclude[c1]\n}\n\nfact groupCardinalityConstraint {\n all i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupCardinality[i.feature, #(i.~instanceParent.feature & FM.group)]\n}\n\nfact groupInstanceCardinalityConstraint {\n all i: Instance | some (i.feature.~parent & FM.group) implies IsPossibleGroupInstanceCardinality[i.feature, #(i.~instanceParent & FM.group.instances)]\n}\n\nfact instanceParent {\n all i: Instance | not IsRoot[i.feature] implies #(i.instanceParent & i.feature.parent.instances) = 1\n all i: Instance | all f: Feature | f in i.feature.~parent implies IsPossibleCardinality[f, #(i.~instanceParent & f.instances)] || #(i.~instanceParent & f.instances) = 0\n}\n\nfact instanceFeatureMapping {\n all i: Instance, f: Feature | f in i.feature implies i in f.instances else not i in f.instances\n}\n\nfact requireConstraint {\n all f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.require[c].feature)\n all c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && c2 in FM.require[c1] implies IsInsideConstraintIntervall[c2, #(c2.feature.instances)]\n}\n\nfact excludeConstraint {\n all f: Feature | all c: ConstraintNode | f in c.feature implies !(f in FM.exclude[c].feature)\n all c1, c2: ConstraintNode | IsInsideConstraintIntervall[c1, #(c1.feature.instances)] && (c2 in FM.exclude[c1] || c1 in FM.exclude[c2]) implies !(IsInsideConstraintIntervall[c2, #(c2.feature.instances)])\n}\n\none sig CoffeeMachine, CoffeeType, Espresso, DripCoffee extends Feature {}\n\none sig i1, i2, i3, i4, i5, i6, i7, i8 extends Intervall {}\n\nfact {\n i1.lowerBound = 1\n i1.upperBound = 1\n CoffeeMachine.cardinality = i1\n i2.lowerBound = 1\n i2.upperBound = KleeneStar\n CoffeeMachine.groupInstanceCardinality = i2\n i3.lowerBound = 1\n i3.upperBound = 1\n CoffeeMachine.groupCardinality = i3\n CoffeeType.parent = CoffeeMachine\n i4.lowerBound = 1\n i4.upperBound = 2\n CoffeeType.cardinality = i4\n i5.lowerBound = 1\n i5.upperBound = 2\n CoffeeType.groupInstanceCardinality = i5\n i6.lowerBound = 1\n i6.upperBound = 2\n CoffeeType.groupCardinality = i6\n Espresso.parent = CoffeeType\n i7.lowerBound = 0\n i7.upperBound = 1\n Espresso.cardinality = i7\n DripCoffee.parent = CoffeeType\n i8.lowerBound = 0\n i8.upperBound = 1\n DripCoffee.cardinality = i8\n}\n\n\nrun {} for 5 but 4 Int,0 Feature, 0 ConstraintNode", "permalink": "rebel-nifty-grip-stand", "time": "2024-10-23 16:02:38.987442", "cmd": 1} {"id": 20300, "parent": 20299, "code": "// Alloy model generated from Feature model\n\none sig CoffeeMachine {\n children: set CoffeeType\n} {\n # children & CoffeeType >= 1\n # children & CoffeeType <= 2\n # children >= 1\n}\nsig CoffeeType {\n children: set Espresso + DripCoffee\n} {\n # children & Espresso >= 0\n # children & Espresso <= 1\n # children & DripCoffee >= 0\n # children & DripCoffee <= 1\n # children >= 1\n # children <= 2\n}\nsig Espresso {}\n\nsig DripCoffee {}\n\n\n\nfact childrenBelongToParent {\n CoffeeMachine.children = CoffeeType\n CoffeeType.children = Espresso + DripCoffee\n}\nfact coffeemachineGroupTypeCardinality {\n all coffeemachine: CoffeeMachine | \n (some coffeemachine.children & (CoffeeType))\n}\nfact coffeetypeGroupTypeCardinality {\n all coffeetype: CoffeeType | \n (some coffeetype.children & (Espresso) and no coffeetype.children & DripCoffee) or (some coffeetype.children & (DripCoffee) and no coffeetype.children & Espresso) or (some coffeetype.children & (Espresso + DripCoffee))\n}\n\nrun {} for 5 but 4 Int", "permalink": "oat-wrench-brim-perish", "time": "2024-10-23 16:03:04.792405", "cmd": 1} {"id": 20301, "parent": 20300, "code": "// Alloy model generated from Feature model\n\none sig CoffeeMachine {\n children: set CoffeeType\n} {\n # children & CoffeeType >= 1\n # children & CoffeeType <= 2\n # children >= 1\n}\nsig CoffeeType {\n children: set Espresso + DripCoffee\n} {\n # children & Espresso >= 0\n # children & Espresso <= 1\n # children & DripCoffee >= 0\n # children & DripCoffee <= 1\n # children >= 1\n # children <= 2\n}\nsig Espresso {}\n\nsig DripCoffee {}\n\n\n\nfact childrenBelongToParent {\n CoffeeMachine.children = CoffeeType\n CoffeeType.children = Espresso + DripCoffee\n}\nfact noMultipleParents {\n all child: CoffeeType + Espresso + DripCoffee | lone parent: CoffeeMachine + CoffeeType | child in parent.children\n}\nfact coffeemachineGroupTypeCardinality {\n all coffeemachine: CoffeeMachine | \n (some coffeemachine.children & (CoffeeType))\n}\nfact coffeetypeGroupTypeCardinality {\n all coffeetype: CoffeeType | \n (some coffeetype.children & (Espresso) and no coffeetype.children & DripCoffee) or (some coffeetype.children & (DripCoffee) and no coffeetype.children & Espresso) or (some coffeetype.children & (Espresso + DripCoffee))\n}\n\nrun {} for 5 but 4 Int", "permalink": "sizing-spilt-pod-pasta", "time": "2024-10-23 16:05:47.017042", "cmd": 1} {"id": 20302, "parent": 20301, "code": "// Alloy model generated from Feature model\n\none sig CoffeeMachine {\n children: set CoffeeType\n} {\n # children & CoffeeType >= 1\n # children & CoffeeType <= 2\n # children >= 1\n}\nsig CoffeeType {\n children: set Espresso + DripCoffee\n} {\n # children & Espresso >= 0\n # children & Espresso <= 1\n # children & DripCoffee >= 0\n # children & DripCoffee <= 1\n # children >= 1\n # children <= 2\n}\nsig Espresso {}\n\nsig DripCoffee {}\n\n\n\nfact childrenBelongToParent {\n CoffeeMachine.children = CoffeeType\n CoffeeType.children = Espresso + DripCoffee\n}\nfact noMultipleParents {\n all child: CoffeeType + Espresso + DripCoffee | lone parent: CoffeeMachine + CoffeeType | child in parent.coffeeTypes + parent.coffeeVariants\n}\n\nfact coffeemachineGroupTypeCardinality {\n all coffeemachine: CoffeeMachine | \n (some coffeemachine.children & (CoffeeType))\n}\nfact coffeetypeGroupTypeCardinality {\n all coffeetype: CoffeeType | \n (some coffeetype.children & (Espresso) and no coffeetype.children & DripCoffee) or (some coffeetype.children & (DripCoffee) and no coffeetype.children & Espresso) or (some coffeetype.children & (Espresso + DripCoffee))\n}\n\nrun {} for 5 but 4 Int", "permalink": "verse-mascot-petted-jury", "time": "2024-10-23 16:08:18.508007", "cmd": 1} {"id": 20303, "parent": 20302, "code": "// Alloy model generated from Feature model\n\none sig CoffeeMachine {\n children: set CoffeeType\n} {\n # children & CoffeeType >= 1\n # children & CoffeeType <= 2\n # children >= 1\n}\nsig CoffeeType {\n children: set Espresso + DripCoffee\n} {\n # children & Espresso >= 0\n # children & Espresso <= 1\n # children & DripCoffee >= 0\n # children & DripCoffee <= 1\n # children >= 1\n # children <= 2\n}\nsig Espresso {}\n\nsig DripCoffee {}\n\n\n\nfact childrenBelongToParent {\n CoffeeMachine.children = CoffeeType\n CoffeeType.children = Espresso + DripCoffee\n}\nfact noMultipleParents {\n all child: CoffeeType + Espresso + DripCoffee | lone parent: CoffeeMachine + CoffeeType | child in parent.coffeeTypes + parent.coffeeVariants\n}\n\nfact coffeemachineGroupTypeCardinality {\n all coffeemachine: CoffeeMachine | \n (some coffeemachine.children & (CoffeeType))\n}\nfact coffeetypeGroupTypeCardinality {\n all coffeetype: CoffeeType | \n (some coffeetype.children & (Espresso) and no coffeetype.children & DripCoffee) or (some coffeetype.children & (DripCoffee) and no coffeetype.children & Espresso) or (some coffeetype.children & (Espresso + DripCoffee))\n}\n\nrun {} for 5 but 4 Int", "permalink": "gizmo-streak-uproot-eleven", "time": "2024-10-23 16:08:21.546891", "cmd": 1} {"id": 20304, "parent": 20303, "code": "one sig CoffeeMachine {\n coffeeTypes: set CoffeeType\n} {\n # coffeeTypes & CoffeeType >= 1\n # coffeeTypes & CoffeeType <= 2\n # coffeeTypes >= 1\n}\nsig CoffeeType {\n coffeeVariants: set Espresso + DripCoffee\n} {\n # coffeeVariants & Espresso >= 0\n # coffeeVariants & Espresso <= 1\n # coffeeVariants & DripCoffee >= 0\n # coffeeVariants & DripCoffee <= 1\n # coffeeVariants >= 1\n # coffeeVariants <= 2\n}\nsig Espresso {}\n\nsig DripCoffee {}\n\n\nfact childrenBelongToParent {\n CoffeeMachine.coffeeTypes = CoffeeType\n CoffeeType.coffeeVariants = Espresso + DripCoffee\n}\n\nfact noMultipleParents {\n all child: CoffeeType + Espresso + DripCoffee | \n lone parent: CoffeeMachine + CoffeeType | \n (child in parent.coffeeTypes or child in parent.coffeeVariants)\n}\n\nfact coffeemachineGroupTypeCardinality {\n all coffeemachine: CoffeeMachine | \n (some coffeemachine.coffeeTypes & (CoffeeType))\n}\n\nfact coffeetypeGroupTypeCardinality {\n all coffeetype: CoffeeType | \n (some coffeetype.coffeeVariants & (Espresso) and no coffeetype.coffeeVariants & DripCoffee) or \n (some coffeetype.coffeeVariants & (DripCoffee) and no coffeetype.coffeeVariants & Espresso) or \n (some coffeetype.coffeeVariants & (Espresso + DripCoffee))\n}\n\nrun {} for 5 but 4 Int", "permalink": "prior-duo-traps-grill", "time": "2024-10-23 16:09:13.338810", "cmd": 1} {"id": 20310, "parent": null, "code": "// a person can be either a Student or a professor\nabstract sig Person {}\n\nsig Student, Professor extends Person {}\nsig Class {\n instructor: one Professor,\n assistant: set Student\n}\nsig Assignment {\n associated_with: set Class,\n assigned_to: some Student\n}\n// assignment is associated with atleast one class\nfact{\n all a : Assignment | one a.associated_with\n}\n\nrun {} ", "permalink": "entree-fiber-bogus-apache", "time": "2024-10-24 09:07:58.238852", "cmd": 1} {"id": 20313, "parent": 20312, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\nsig Assignment{}\nsig Class {}\n\nrun {}", "permalink": "pod-copier-say-anyway", "time": "2024-10-24 11:18:59.500310", "cmd": 1} {"id": 20314, "parent": 6739, "code": "// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and \n// may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with \n// one or more Classes and is assigned \n// to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\nrun {}", "permalink": "jump-halved-anchor-decree", "time": "2024-10-24 11:24:03.209907", "cmd": 1} {"id": 20315, "parent": 20310, "code": "// a person can be either a Student or a professor\nabstract sig Person {}\n\nsig Student, Professor extends Person {}\nsig Class {\n instructor: one Professor,\n assistant: set Student\n}\nsig Assignment {\n associated_with: set Class,\n assigned_to: some Student\n}\n// assignment is associated with atleast one class\nfact{\n all a : Assignment | one a.associated_with\n}\n\n\n// Assert NoOneCanGradeTheirOwnAssignment checks that no Person can grade their own Assignment.\n// assert NoOneCanGradeTheirOwnAssignment {\n// all p : Person, a : Assignment |\n// PolicyAllowsGrading[p, a] implies not p in a.assigned_to\n// }\nrun {} ", "permalink": "depict-clever-moaner-halt", "time": "2024-10-24 11:30:07.104466", "cmd": 1} {"id": 20316, "parent": 20311, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {all a : Assignment | one a.associated_with}\n\n// Predicate PolicyAllowsGrading defines the policy for allowing grading of an Assignment by a Person.\npred PolicyAllowsGrading(p: Person, a: Assignment) {\n p in a.associated_with.assistant or \n p in a.associated_with.instructor\n}\n\n// Assert NoOneCanGradeTheirOwnAssignment checks that no Person can grade their own Assignment.\nassert NoOneCanGradeTheirOwnAssignment {\n all p : Person, a : Assignment |\n PolicyAllowsGrading[p, a] implies not p in a.assigned_to\n}\n\ncheck NoOneCanGradeTheirOwnAssignment for 2", "permalink": "suds-array-print-hush", "time": "2024-10-24 11:43:34.516148", "cmd": 1} {"id": 20317, "parent": 20316, "code": "/**\n * This Alloy model represents a system for grading assignments in a university.\n * It defines the concepts of Person, Student, Professor, Class, and Assignment.\n */\n\n// A Person can be either a Student or a Professor.\nabstract sig Person {}\nsig Student, Professor extends Person {}\n\n// A Class has one instructor (Professor) and may have multiple assistants (Students).\nsig Class {\n instructor: one Professor, \n assistant: set Student\n}\n\n// An Assignment is associated with one or more Classes and is assigned to one or more Students.\nsig Assignment {\n associated_with: set Class, \n assigned_to: some Student\n}\n\n// Each Assignment is associated with at least one Class.\nfact {all a : Assignment | one a.associated_with}\n\n// Predicate PolicyAllowsGrading defines the policy for allowing grading of an Assignment by a Person.\npred PolicyAllowsGrading(p: Person, a: Assignment) {\n p in a.associated_with.assistant or \n p in a.associated_with.instructor\n}\n\n// Assert NoOneCanGradeTheirOwnAssignment checks that no Person can grade their own Assignment.\nassert NoOneCanGradeTheirOwnAssignment {\n all p : Person, a : Assignment |\n PolicyAllowsGrading[p, a] implies not p in a.assigned_to\n}\n\ncheck NoOneCanGradeTheirOwnAssignment for 2", "permalink": "motto-grunt-grew-cope", "time": "2024-10-24 11:44:33.863330", "cmd": 1} {"id": 21086, "parent": 21085, "code": "module SimpleExample\n\n-- Declaring signatures\nsig Person {\n owns: lone Car\n}\n\nsig Car {\n owner: lone Person\n}\n\n-- Constraints and facts\nfact Ownership {\n all p: Person | one p.owns => p.owns.owner = p\n}\n\n-- Simple predicate to find if any car is owned\npred findOwnership() {\n some Car.owner\n}\n\n-- Run command to execute the predicate and check the model\nrun findOwnership for 3", "permalink": "bring-shrink-voter-coat", "time": "2024-10-30 08:23:51.533813", "cmd": 1} {"id": 27941, "parent": 21086, "code": "module SimpleExample\n\n-- Declaring signatures\nsig Person {\n owns: lone Car\n}\n\nsig Car {\n owner: lone Person\n}\n\n-- Constraints and facts\nfact Ownership {\n all p: Person | one p.owns => p.owns.owner = p\n}\n\n-- Simple predicate to find if any car is owned\npred findOwnership() {\n some Car.owner\n}\n\n-- Run command to execute the predicate and check the model\nrun findOwnership for 3", "permalink": "peso-pebbly-vibes-porous", "time": "2024-12-05 13:41:17.016910", "cmd": 1} {"id": 27936, "parent": 21086, "code": "module SimpleExample\n\n-- Declaring signatures\nsig Person {\n owns: lone Car\n}\n\nsig Car {\n owner: lone Person\n}\n\n-- Constraints and facts\nfact Ownership {\n all p: Person | one p.owns => p.owns.owner = p\n}\n\n-- Simple predicate to find if any car is owned\npred findOwnership() {\n some Car.owner\n}\n\n-- Run command to execute the predicate and check the model\nrun findOwnership for 3", "permalink": "obtuse-aging-worry-decree", "time": "2024-12-04 22:54:37.466665", "cmd": 1} {"id": 27940, "parent": 21086, "code": "module SimpleExample\n\n-- Declaring signatures\nsig Person {\n owns: lone Car\n}\n\nsig Car {\n owner: lone Person\n}\n\n-- Constraints and facts\nfact Ownership {\n all p: Person | one p.owns => p.owns.owner = p\n}\n\n-- Simple predicate to find if any car is owned\npred findOwnership() {\n some Car.owner\n}\n\n-- Run command to execute the predicate and check the model\nrun findOwnership for 3", "permalink": "robin-idly-decree-mop", "time": "2024-12-05 10:54:22.603173", "cmd": 1} {"id": 30538, "parent": 21086, "code": "module SimpleExample\n\n-- Declaring signatures\nsig Person {\n owns: lone Car\n}\n\nsig Car {\n owner: lone Person\n}\n\n-- Constraints and facts\nfact Ownership {\n all p: Person | one p.owns => p.owns.owner = p\n}\n\n-- Simple predicate to find if any car is owned\npred findOwnership() {\n some Car.owner\n}\n\n-- Run command to execute the predicate and check the model\nrun findOwnership for 3", "permalink": "gnat-docile-gorged-retype", "time": "2025-01-09 13:44:12.901598", "cmd": 1} {"id": 21390, "parent": null, "code": "sig Person {\n father: lone Person\n son: set Person\n}\n\nsig Man extends Person {\n\n}{\n father.son = self\n}", "permalink": "scotch-bundle-crier-wow", "time": "2024-11-04 08:59:49.958148", "cmd": 1} {"id": 21391, "parent": 21390, "code": "sig Person {\n father: lone Person,\n son: set Person\n}\n\nsig Man extends Person {\n\n}{\n father.son = self\n}", "permalink": "wooing-breath-cozy-unhook", "time": "2024-11-04 08:59:57.671691", "cmd": 1} {"id": 21392, "parent": 21391, "code": "sig Person {\n father: lone Person,\n son: set Person\n}\n\nsig Man extends Person {\n\n}\n\nfact {\n Man.father.son = Man\n}", "permalink": "egging-object-subway-tables", "time": "2024-11-04 09:00:40.152017", "cmd": 1} {"id": 21393, "parent": 21392, "code": "sig Person {\n father: lone Person,\n son: set Person\n}\n\none sig Man extends Person {\n\n}\n\n// Man has no siblings\nfact {\n Man.father.son = Man\n}\n\none sig Potrait extends Person{}\n\nfact {\n Potrait.father in Man.father.son\n}", "permalink": "food-maybe-ipad-rubble", "time": "2024-11-04 09:02:20.092157", "cmd": 1} {"id": 21394, "parent": 21393, "code": "sig Person {\n father: lone Person,\n son: set Person\n}\n\none sig Man extends Person {\n\n}\n\n// Man has no siblings\nfact {\n Man.father.son = Man\n}\n\nfact {\n no (iden & father)\n}\n\none sig Potrait extends Person{}\n\nfact {\n Potrait.father in Man.father.son\n}", "permalink": "lurch-twelve-shock-uptake", "time": "2024-11-04 09:03:37.654712", "cmd": 1} {"id": 21395, "parent": 21394, "code": "sig Person {\n father: lone Person,\n son: set Person\n}\n\none sig Man extends Person {\n\n}\n\n// Man has no siblings\nfact {\n Man.father.son = Man\n}\n\nfact {\n no (iden & father)\n}\n\nfact {\n father = ~son\n}\none sig Potrait extends Person{}\n\nfact {\n Potrait.father in Man.father.son\n}", "permalink": "wiry-pulse-wobbly-mumbo", "time": "2024-11-04 09:05:56.040373", "cmd": 1} {"id": 21396, "parent": 21395, "code": "sig Person {\n father: lone Person,\n son: set Person\n}\n\none sig Man extends Person {\n\n}\n\n// Man has no siblings\nfact NoSiblings{\n Man.father.son = Man\n}\n\nfact NoSelfFather{\n no (iden & father)\n}\n\nfact FatherSon{\n father = ~son\n}\none sig Potrait extends Person{}\n\nfact Riddle{\n Potrait.father in Man.father.son\n}", "permalink": "astute-cheer-debug-setup", "time": "2024-11-04 09:06:57.103722", "cmd": 1} {"id": 21397, "parent": 21396, "code": " sig Person {\n father: lone Person,\n son: set Person\n}\n\none sig Man extends Person {\n\n}\n\nfact NoSiblings{\n Man.father.son = Man\n}\n\nfact NoSelfFather{\n no (iden & father)\n}\n\nfact FatherSon{\n father = ~son\n}\none sig Potrait extends Person{}\n\nfact Riddle{\n Potrait.father in Man.father.son\n}", "permalink": "arena-navy-winter-dodge", "time": "2024-11-04 09:08:49.980277", "cmd": 1} {"id": 21398, "parent": 21397, "code": " sig Person {\n father: lone Person,\n son: set Person\n}\n\none sig Man extends Person {\n\n}\n\nfact NoSiblings{\n Man.father.son = Man\n}\n\nfact NoSelfFather{\n no (iden & father)\n}\n\nfact FatherSon{\n father = ~son\n}\none sig Potrait extends Person{}\n\nfact Riddle{\n Potrait.father in Man.father.son\n}\n\nrun for 3", "permalink": "yoga-hankie-prism-banana", "time": "2024-11-04 09:09:09.659408", "cmd": 1} {"id": 21455, "parent": 21454, "code": " sig Person {\n father: lone Person,\n son: set Person\n}\n\none sig Man extends Person {\n\n}\n\nfact NoSiblings{\n Man.father.son = Man\n}\n\nfact NoSelfFather{\n no (iden & father)\n}\n\nfact FatherSon{\n father = ~son\n}\none sig Potrait extends Person{}\n\nfact Riddle{\n Potrait.father in Man.father.son\n}\n\nrun {} for 3", "permalink": "nuclei-alive-backup-blot", "time": "2024-11-05 12:17:40.277406", "cmd": 1} {"id": 21399, "parent": 21398, "code": " sig Person {\n father: lone Person,\n son: set Person\n}\n\none sig Man extends Person {\n\n}\n\nfact NoSiblings{\n Man.father.son = Man\n}\n\nfact NoSelfFather{\n no (iden & father)\n}\n\nfact FatherSon{\n father = ~son\n}\none sig Potrait extends Person{}\n\nfact Riddle{\n Potrait.father in Man.father.son\n}\n\nrun {} for 3", "permalink": "sudden-silent-affirm-uptown", "time": "2024-11-04 09:09:30.872264", "cmd": 1} {"id": 21454, "parent": 21453, "code": " sig Person {\n father: lone Person,\n son: set Person\n}\n\none sig Man extends Person {\n\n}\n\nfact NoSiblings{\n Man.father.son = Man\n}\n\nfact NoSelfFather{\n no (iden & father)\n}\n\nfact FatherSon{\n father = ~son\n}\none sig Potrait extends Person{}\n\nfact Riddle{\n Potrait.father in Man.father.son\n}\n\nrun {} for 4", "permalink": "humbly-skies-dime-coerce", "time": "2024-11-05 12:17:14.893230", "cmd": 1} {"id": 21402, "parent": 21401, "code": " sig Person {\n father: lone Person,\n son: set Person\n}\n\none sig Man extends Person {\n\n}\n\nfact NoSiblings{\n Man.father.son = Man\n}\n\nfact NoSelfFather{\n no (iden & father)\n}\n\nfact FatherSon{\n father = ~son\n}\none sig Potrait extends Person{}\n\nfact Riddle{\n Potrait.father in Man.father.son\n}\n\nrun {} for 4", "permalink": "pounce-whiny-awaken-comic", "time": "2024-11-04 09:10:12.352966", "cmd": 1} {"id": 21400, "parent": 21399, "code": " sig Person {\n father: lone Person,\n son: set Person\n}\n\none sig Man extends Person {\n\n}\n\nfact NoSiblings{\n Man.father.son = Man\n}\n\nfact NoSelfFather{\n no (iden & father)\n}\n\nfact FatherSon{\n father = ~son\n}\none sig Potrait extends Person{}\n\nfact Riddle{\n Potrait.father in Man.father.son\n}\n\nrun {} for 4", "permalink": "cedar-depth-frosty-slinky", "time": "2024-11-04 09:09:52.468212", "cmd": 1} {"id": 21457, "parent": null, "code": " sig Person {\n father: lone Person,\n son: set Person\n}\n\none sig Man extends Person {\n\n}\n\nfact NoSiblings{\n Man.father.son = Man\n}\n\nfact NoSelfFather{\n no (iden & father)\n}\n\nfact FatherSon{\n father = ~son\n}\none sig Potrait extends Person{}\n\nfact Riddle{\n Potrait.father in Man.father.son\n}\n", "permalink": "ion-strung-gravel-cape", "time": "2024-11-05 14:59:41.525999", "cmd": 1} {"id": 21456, "parent": 21455, "code": " sig Person {\n father: lone Person,\n son: set Person\n}\n\none sig Man extends Person {\n\n}\n\nfact NoSiblings{\n Man.father.son = Man\n}\n\nfact NoSelfFather{\n no (iden & father)\n}\n\nfact FatherSon{\n father = ~son\n}\none sig Potrait extends Person{}\n\nfact Riddle{\n Potrait.father in Man.father.son\n}\n", "permalink": "shank-whiff-unify-salon", "time": "2024-11-05 12:17:49.846450", "cmd": 1} {"id": 21453, "parent": null, "code": " sig Person {\n father: lone Person,\n son: set Person\n}\n\none sig Man extends Person {\n\n}\n\nfact NoSiblings{\n Man.father.son = Man\n}\n\nfact NoSelfFather{\n no (iden & father)\n}\n\nfact FatherSon{\n father = ~son\n}\none sig Potrait extends Person{}\n\nfact Riddle{\n Potrait.father in Man.father.son\n}\n", "permalink": "drone-thaw-raft-deploy", "time": "2024-11-05 12:16:47.397023", "cmd": 1} {"id": 21401, "parent": 21400, "code": " sig Person {\n father: lone Person,\n son: set Person\n}\n\none sig Man extends Person {\n\n}\n\nfact NoSiblings{\n Man.father.son = Man\n}\n\nfact NoSelfFather{\n no (iden & father)\n}\n\nfact FatherSon{\n father = ~son\n}\none sig Potrait extends Person{}\n\nfact Riddle{\n Potrait.father in Man.father.son\n}\n", "permalink": "awoke-gerbil-flying-feast", "time": "2024-11-04 09:10:01.843339", "cmd": 1} {"id": 21403, "parent": 21402, "code": " sig Person {\n father: one Person,\n son: set Person\n}\n\none sig Man extends Person {\n\n}\n\nfact NoSiblings{\n Man.father.son = Man\n}\n\nfact NoSelfFather{\n no (iden & father)\n}\n\nfact FatherSon{\n father = ~son\n}\none sig Potrait extends Person{}\n\nfact Riddle{\n Potrait.father in Man.father.son\n}\n\nrun {} for 4", "permalink": "shame-cleat-banter-velcro", "time": "2024-11-04 09:11:08.196190", "cmd": 1} {"id": 21404, "parent": 21403, "code": " sig Person {\n father: one Person,\n son: set Person\n}\n\none sig Man extends Person {\n\n}\n\nfact NoSiblings{\n Man.father.son = Man\n}\n\nfact NoSelfFather{\n no (iden & ^father)\n}\n\nfact FatherSon{\n father = ~son\n}\none sig Potrait extends Person{}\n\nfact Riddle{\n Potrait.father in Man.father.son\n}\n\nrun {} for 4", "permalink": "flock-scone-sitcom-apache", "time": "2024-11-04 09:11:37.456213", "cmd": 1} {"id": 21405, "parent": 21404, "code": " sig Person {\n father: lone Person,\n son: set Person\n}\n\none sig Man extends Person {\n\n}\n\nfact NoSiblings{\n Man.father.son = Man\n}\n\nfact NoSelfFather{\n no (iden & ^father)\n}\n\nfact FatherSon{\n father = ~son\n}\none sig Potrait extends Person{}\n\nfact Riddle{\n Potrait.father in Man.father.son\n}\n\nrun {} for 4", "permalink": "swung-huff-rely-barge", "time": "2024-11-04 09:14:36.412405", "cmd": 1} {"id": 21406, "parent": 21405, "code": " sig Person {\n father: lone Person,\n son: set Person\n}\n\none sig Man extends Person {\n\n}\n\nfact NoSiblings{\n Man.father.son = Man\n}\n\nfact NoSelfFather{\n no (iden & ^father)\n}\n\nfact FatherSon{\n father = ~son\n}\none sig Potrait extends Person{}\n\nfact Riddle{\n Potrait.father in Man.father.son\n}\n\nrun {some Man.father} for 4", "permalink": "curled-mummy-chomp-mold", "time": "2024-11-04 09:15:09.122358", "cmd": 1} {"id": 21407, "parent": 21406, "code": " sig Person {\n father: lone Person,\n son: set Person\n}\n\none sig Man extends Person {\n\n}\n\nfact NoSiblings{\n Man.father.son = Man\n}\n\nfact NoSelfFather{\n no (iden & ^father)\n}\n\nfact FatherSon{\n father = ~son\n}\none sig Potrait extends Person{}\n\nfact Riddle{\n Potrait.father in Man.father.son\n some Potrait.father\n some Man.father\n}\n\nrun {} for 4", "permalink": "step-wing-slaw-nag", "time": "2024-11-04 09:17:29.096289", "cmd": 1} {"id": 21436, "parent": null, "code": "abstract sig Person {\n\tid: disj Person\n}\n\nsig Candidato extends Person {\n votiRicevuti: Int\n}\n\nsig Elettore extends Person {\n votiDati: set Voto\n}\n\nsig Voto {\n votante: Elettore,\n votato: Candidato\n}\n\nfact {\n #Candidato > 0\n #Elettore > 0\n}\n\n \nrun {} for 3 but 3 Elettore, 3 Candidato, 3 Int", "permalink": "cusp-turtle-hazy-grout", "time": "2024-11-04 12:04:29.649524", "cmd": 1} {"id": 30554, "parent": null, "code": "abstract sig Person {\n id: disj Int\n} {id > 0}\n\nsig Candidato extends Person {\n votiRicevuti: Int\n}\n\nsig Elettore extends Person {\n votiDati: set Voto\n}\n\nsig Voto {\n votante: Elettore,\n votato: Candidato\n}\n\nfact {\n #Candidato > 0\n #Elettore > 0\n}\n\nrun {} for 4 but 4 Elettore, 4 Candidato", "permalink": "raging-claim-booted-gurgle", "time": "2025-01-10 13:29:35.163579", "cmd": 1} {"id": 21441, "parent": 21437, "code": "abstract sig Person {\n id: disj Int\n} {id > 0}\n\nsig Candidato extends Person {\n votiRicevuti: Int\n}\n\nsig Elettore extends Person {\n votiDati: set Voto\n}\n\nsig Voto {\n votante: Elettore,\n votato: Candidato\n}\n\nfact {\n #Candidato > 0\n #Elettore > 0\n}\n\nrun {} for 4 but 4 Elettore, 4 Candidato", "permalink": "foe-dice-kiwi-spilt", "time": "2024-11-04 20:09:18.769138", "cmd": 1} {"id": 21439, "parent": 21437, "code": "abstract sig Person {\n id: disj Int\n} {id > 0}\n\nsig Candidato extends Person {\n votiRicevuti: Int\n}\n\nsig Elettore extends Person {\n votiDati: set Voto\n}\n\nsig Voto {\n votante: Elettore,\n votato: Candidato\n}\n\nfact {\n #Candidato > 0\n #Elettore > 0\n}\n\nrun {} for 4 but 4 Elettore, 4 Candidato", "permalink": "from-daybed-stream-musket", "time": "2024-11-04 14:45:53.257135", "cmd": 1} {"id": 21437, "parent": null, "code": "abstract sig Person {\n id: disj Int\n} {id > 0}\n\nsig Candidato extends Person {\n votiRicevuti: Int\n}\n\nsig Elettore extends Person {\n votiDati: set Voto\n}\n\nsig Voto {\n votante: Elettore,\n votato: Candidato\n}\n\nfact {\n #Candidato > 0\n #Elettore > 0\n}\n\nrun {} for 4 but 4 Elettore, 4 Candidato", "permalink": "reflux-casino-dollar-vibes", "time": "2024-11-04 12:22:32.812114", "cmd": 1} {"id": 30484, "parent": 21437, "code": "abstract sig Person {\n id: disj Int\n} {id > 0}\n\nsig Candidato extends Person {\n votiRicevuti: Int\n}\n\nsig Elettore extends Person {\n votiDati: set Voto\n}\n\nsig Voto {\n votante: Elettore,\n votato: Candidato\n}\n\nfact {\n #Candidato > 0\n #Elettore > 0\n}\n\nrun {} for 4 but 4 Elettore, 4 Candidato", "permalink": "simile-crouch-scrap-morale", "time": "2025-01-08 11:07:07.305279", "cmd": 1} {"id": 21440, "parent": 21437, "code": "abstract sig Person {}\n\nsig Candidato extends Person {\n\tvotiRicevuti: Int\n} {some e : Elezione | this in e.candidati}\n\nsig Elettore extends Person {\n\tvotiDati: some Voto\n} { some e : Elezione | this in e.elettori}\n\nsig Voto {\n\tvotante: Elettore,\n\tvotato: Candidato\n}\n\nsig Elezione {\n\tcandidati: set Candidato,\n\telettori: set Elettore\n} {#candidati > 0 && #elettori > 0}\n\npred ritornaVotanti [c : Candidato] : set Elettore {\n\tresult = {e : Elettore | some v : Voto | v.votante = e && v.votato = c}\n}\n\nrun {} for 5 but 5 Elettore, 5 Candidato", "permalink": "haste-comply-strum-barge", "time": "2024-11-04 16:47:02.029973", "cmd": 1} {"id": 21814, "parent": null, "code": "\nsig Center {\n}\n\nsig Patient {\n originCenter: one (Center - GroupCenter),\n virtualCenter: one Center\n}\n\nsig PT {\n worksIn: some (Center - GroupCenter)\n}\n\nsig GroupCenter extends Center{\n partOfGroup: some Center\n}\n\nfact patientsInCenterImpliesPTInCenter{\n all p: Patient, c: one (Center - GroupCenter) | c = p.originCenter => (some pt: PT | c in pt.worksIn)\n}\n\nfact allGroupCentersContainMoreThanTwoCenters{\n all gc: GroupCenter | #(gc.partOfGroup) >= 2\n}\n\nfact groupCentersDoesnotRecursivelyIncludeThemselves{\n all gc: GroupCenter | gc not in gc.^partOfGroup\n}\n\nfact noTwoGroupCentersHaveSameCenters{\n all gc1, gc2: GroupCenter, c: Center | (gc1 != gc2 && c in gc1.partOfGroup) => c not in gc2.partOfGroup\n}\n\nfact patientVirtualCenterGroupOrSameAsOrigin{\n all p: Patient | (p.virtualCenter in GroupCenter) || (p.originCenter = p.virtualCenter)\n}\n\nfact patientsInGroupCentersCanNotHaveOrignNotInSameGroup{\n all p: Patient, gc: one GroupCenter | (p.originCenter in gc.partOfGroup) <=> gc = p.virtualCenter\n}\n\nfact noCentersWithNoPatients{\n all c: (Center - GroupCenter) | one p: Patient | p.originCenter = c\n}\n\npred somePatientsAreInGroupCenter{\n some p: Patient | p.originCenter != p.virtualCenter \n}\n\npred somePatientsAreNotInGroupCenter{\n some p: Patient | p.originCenter = p.virtualCenter \n}\n\npred sampleData {\n #Patient >= 3 &&\n #PT >= 4 &&\n #Center <= 5 &&\n #GroupCenter >= 1 &&\n somePatientsAreInGroupCenter &&\n somePatientsAreNotInGroupCenter\n}\n\nrun sampleData for 10", "permalink": "greedy-matrix-rule-cube", "time": "2024-11-06 18:58:59.521536", "cmd": 1} {"id": 21816, "parent": 21814, "code": "\nsig Center {\n}\n\nsig Patient {\n originCenter: one (Center - GroupCenter),\n virtualCenter: one Center\n}\n\nsig PT {\n worksIn: some (Center - GroupCenter)\n}\n\nsig GroupCenter extends Center{\n partOfGroup: some Center\n}\n\nfact patientsInCenterImpliesPTInCenter{\n all p: Patient, c: one (Center - GroupCenter) | c = p.originCenter => (some pt: PT | c in pt.worksIn)\n}\n\nfact allGroupCentersContainMoreThanTwoCenters{\n all gc: GroupCenter | #(gc.partOfGroup) >= 2\n}\n\nfact groupCentersDoesnotRecursivelyIncludeThemselves{\n all gc: GroupCenter | gc not in gc.^partOfGroup\n}\n\nfact noTwoGroupCentersHaveSameCenters{\n all gc1, gc2: GroupCenter, c: Center | (gc1 != gc2 && c in gc1.partOfGroup) => c not in gc2.partOfGroup\n}\n\nfact patientVirtualCenterGroupOrSameAsOrigin{\n all p: Patient | (p.virtualCenter in GroupCenter) || (p.originCenter = p.virtualCenter)\n}\n\nfact patientsInGroupCentersCanNotHaveOrignNotInSameGroup{\n all p: Patient, gc: one GroupCenter | (p.originCenter in gc.partOfGroup) <=> gc = p.virtualCenter\n}\n\nfact noCentersWithNoPatients{\n all c: (Center - GroupCenter) | one p: Patient | p.originCenter = c\n}\n\npred somePatientsAreInGroupCenter{\n some p: Patient | p.originCenter != p.virtualCenter \n}\n\npred somePatientsAreNotInGroupCenter{\n some p: Patient | p.originCenter = p.virtualCenter \n}\n\npred sampleData {\n #Patient >= 3 &&\n #PT >= 4 &&\n #Center <= 5 &&\n #GroupCenter >= 1 &&\n somePatientsAreInGroupCenter &&\n somePatientsAreNotInGroupCenter\n}\n\nrun sampleData for 10", "permalink": "lurk-pesky-slept-yonder", "time": "2024-11-06 19:00:39.580976", "cmd": 1} {"id": 22859, "parent": 22858, "code": "one sig List { \n header: lone Node,\n size : Int\n} \n\nsig Node {\n link: lone Node \n}\n\nfact sizeOk {\n List.size = #List.header.*link \n}\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3 but 30 Int", "permalink": "other-aim-clock-legged", "time": "2024-11-10 11:39:59.287281", "cmd": 1} {"id": 22860, "parent": 22859, "code": "one sig List { \n header: lone Node,\n size : Int\n} \n\nsig Node {\n link: lone Node \n}\n\nfact sizeOk {\n List.size = #List.header.*link \n}\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nrun acyclic for 3 but 5 Int", "permalink": "shiny-preset-suffix-bagel", "time": "2024-11-10 11:41:30.464153", "cmd": 1} {"id": 22922, "parent": null, "code": "module addressBook\n\nsig Name, Addr { }\n\nsig Book {\n\taddr: Name -> lone Addr\n}\n\npred show [b: Book] {\n\t#b.addr > 1\n\t#Name.(b.addr) > 1\n}\n\nrun show for 3 but 1 Book", "permalink": "scrap-twice-truck-ensure", "time": "2024-11-11 12:06:02.490031", "cmd": 1} {"id": 22925, "parent": 22922, "code": "module addressBook\n\nsig Name, Addr { }\n\nsig Book {\n\taddr: Name -> lone Addr\n}\n\npred show [b: Book] {\n\t#b.addr > 1\n\t#Name.(b.addr) > 1\n}\n\nrun show for 3 but 1 Book", "permalink": "romp-atrium-ipod-travel", "time": "2024-11-11 13:25:38.408133", "cmd": 1} {"id": 23068, "parent": 23067, "code": "one sig List { \n header: lone Node,\n} \n\nsig Node {\n link: lone Node,\n elem : Int\n}\n\nfact ordered {\n all n : Node | \n some n.link implies \n n.elem < n.link.elem\n}\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nrun acyclic for 5", "permalink": "unmade-scarce-sadden-haste", "time": "2024-11-12 09:28:54.316025", "cmd": 1} {"id": 23074, "parent": 23073, "code": "one sig List { \n header: lone Node,\n} \n\nsig Node {\n link: lone Node,\n elem : Int\n}\n\nfact ordered {\n all n : Node | \n some n.link implies \n n.elem < n.link.elem\n}\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nrun acyclic for 5", "permalink": "amply-chute-parcel-claim", "time": "2024-11-12 09:31:54.618940", "cmd": 1} {"id": 23073, "parent": 23072, "code": "one sig List { \n header: lone Node,\n} \n\nsig Node {\n link: lone Node,\n elem : Int\n}\n\nfact ordered {\n all n : Node | \n some n.link implies \n n.elem < n.link.elem\n}\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\nrun acyclic for 5", "permalink": "nail-vice-unsaid-fading", "time": "2024-11-12 09:31:52.104061", "cmd": 1} {"id": 23069, "parent": 23068, "code": "one sig List { \n header: lone Node,\n} \n\nsig Node {\n link: lone Node,\n elem : Int\n}\n\nfact ordered {\n all n : Node | \n some n.link implies \n n.elem < n.link.elem\n}\n\npred acyclic(){\n no List.header or \n all n : List.header.*link | no n.link\n}\n\nrun acyclic for 5", "permalink": "shrug-glory-food-affirm", "time": "2024-11-12 09:29:55.167027", "cmd": 1} {"id": 23072, "parent": 23069, "code": "one sig List { \n header: lone Node,\n} \n\nsig Node {\n link: lone Node,\n elem : Int\n}\n\nfact ordered {\n all n : Node | \n some n.link implies \n n.elem < n.link.elem\n}\n\npred acyclic(){\n no List.header or \n some n : List.header.+link | no n.link\n}\n\nrun acyclic for 5", "permalink": "parcel-mutate-gerbil-gulf", "time": "2024-11-12 09:31:42.599709", "cmd": 1} {"id": 23077, "parent": 23074, "code": "one sig List { \n header: lone Node,\n} \n\nsig Node {\n link: lone Node,\n elem : Int\n}\n\nfact ordered {\n all n : Node | \n some n.link implies \n n.elem < n.link.elem\n}\n\npred acyclic(){\n no List.header or \n some n : List.header.*link | no n.link\n}\n\n/* No floating nodes constraint */\nfact noFloatingNodes {\n all n: Node | n in List.header.*link\n}\n\nrun acyclic for 5", "permalink": "scorer-tipoff-peso-snare", "time": "2024-11-12 09:33:44.939444", "cmd": 1} {"id": 23179, "parent": 23178, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // No borrower should have the same book listed more than once\n all br: Borrower | br.borrowedBooks = br.borrowedBooks\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\nrun borrowBook for 3 Book, 3 Borrower\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "flying-ouch-ragged-boxy", "time": "2024-11-14 07:55:03.860902", "cmd": 1} {"id": 23180, "parent": 23179, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // No borrower should have the same book listed more than once\n all br: Borrower | br.borrowedBooks = br.borrowedBooks\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\nrun borrowBook for 3 Book, 3 Borrower\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "rascal-purple-blurry-dismay", "time": "2024-11-14 07:55:10.053325", "cmd": 1} {"id": 23178, "parent": 23177, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // No borrower should have the same book listed more than once\n all br: Borrower | br.borrowedBooks = br.borrowedBooks\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\nrun borrowBook for 3 Book, 3 Borrower\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "agile-train-hurdle-anemic", "time": "2024-11-14 07:54:58.106294", "cmd": 2} {"id": 23149, "parent": 23148, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // No borrower should have the same book listed more than once\n all br: Borrower | br.borrowedBooks = br.borrowedBooks\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\nrun borrowBook for 3 Book, 3 Borrower\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "tweet-utter-job-scoop", "time": "2024-11-14 07:30:19.760245", "cmd": 1} {"id": 23150, "parent": 23149, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // No borrower should have the same book listed more than once\n all br: Borrower | br.borrowedBooks = br.borrowedBooks\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\nrun borrowBook for 3 Book, 3 Borrower\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "circus-ouch-quiet-open", "time": "2024-11-14 07:30:46.660980", "cmd": 1} {"id": 23181, "parent": 23180, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // No borrower should have the same book listed more than once\n all br: Borrower | br.borrowedBooks = br.borrowedBooks\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\nrun borrowBook for 3 Book, 3 Borrower\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "aqua-chatty-sierra-blunt", "time": "2024-11-14 07:56:55.356374", "cmd": 1} {"id": 23151, "parent": 23150, "code": "sig Queue { root: Node }\nsig Node { next: lone Node }\nrun{} for 2", "permalink": "kick-author-bamboo-chop", "time": "2024-11-14 07:33:06.434246", "cmd": 1} {"id": 23152, "parent": 23151, "code": "sig Queue { root: Node }\nsig Node { next: lone Node }\nrun{} for 4", "permalink": "urging-sponge-collar-yogurt", "time": "2024-11-14 07:33:52.053373", "cmd": 1} {"id": 23153, "parent": 23152, "code": "// Signatures\nabstract sig LightColor {}\none sig Red, Yellow, Green extends LightColor {}\n\nsig TrafficLight {\n color: one LightColor,\n location: one String\n}\n\n// Facts\nfact SafeTrafficFlow {\n // Two traffic lights at the same intersection cannot be green at the same time\n all t1, t2: TrafficLight | \n t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Assertions\nassert NoConflictingGreen {\n // Ensures there are no two green lights at the same location\n all t1, t2: TrafficLight | \n t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Predicates\npred changeLight(t: TrafficLight, newColor: LightColor) {\n // Changes the color of a traffic light to a new color\n t.color = newColor\n}\n\n// Run and Check Statements\nrun changeLight for 3 TrafficLight, 3 LightColor\ncheck NoConflictingGreen for 3 TrafficLight, 3 LightColor", "permalink": "pueblo-step-trout-pounce", "time": "2024-11-14 07:34:22.529216", "cmd": 1} {"id": 23155, "parent": 23154, "code": "// Signatures\nabstract sig LightColor {}\none sig Red, Yellow, Green extends LightColor {}\n\nsig TrafficLight {\n color: one LightColor,\n location: one String\n}\n\n// Facts\nfact SafeTrafficFlow {\n // Two traffic lights at the same intersection cannot be green at the same time\n all t1, t2: TrafficLight | t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Assertions\nassert NoConflictingGreen {\n // Ensures there are no two green lights at the same location\n all t1, t2: TrafficLight | \n t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Predicates\npred changeLight(t: TrafficLight, newColor: LightColor) {\n // Changes the color of a traffic light to a new color\n t.color = newColor\n}\n\n// Run and Check Statements\nrun changeLight for 3 TrafficLight, 3 LightColor\ncheck NoConflictingGreen for 3 TrafficLight, 3 LightColor", "permalink": "wilder-pox-repeal-tinker", "time": "2024-11-14 07:35:11.989027", "cmd": 1} {"id": 23156, "parent": 23155, "code": "// Signatures\nabstract sig LightColor {}\none sig Red, Yellow, Green extends LightColor {}\n\nsig TrafficLight {\n color: one LightColor,\n location: one String\n}\n\n// Facts\nfact SafeTrafficFlow {\n // Two traffic lights at the same intersection cannot be green at the same time\n all t1, t2: TrafficLight | t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Assertions\nassert NoConflictingGreen {\n // Ensures there are no two green lights at the same location\n all t1, t2: TrafficLight | \n t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Predicates\npred changeLight(t: TrafficLight, newColor: LightColor) {\n // Changes the color of a traffic light to a new color\n t.color = newColor\n}\n\n// Run and Check Statements\nrun changeLight for 3 TrafficLight, 3 LightColor\ncheck NoConflictingGreen for 3 TrafficLight, 3 LightColor", "permalink": "famine-chrome-snore-feed", "time": "2024-11-14 07:35:13.313386", "cmd": 1} {"id": 23154, "parent": 23153, "code": "// Signatures\nabstract sig LightColor {}\none sig Red, Yellow, Green extends LightColor {}\n\nsig TrafficLight {\n color: one LightColor,\n location: one String\n}\n\n// Facts\nfact SafeTrafficFlow {\n // Two traffic lights at the same intersection cannot be green at the same time\n all t1, t2: TrafficLight | t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Assertions\nassert NoConflictingGreen {\n // Ensures there are no two green lights at the same location\n all t1, t2: TrafficLight | \n t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Predicates\npred changeLight(t: TrafficLight, newColor: LightColor) {\n // Changes the color of a traffic light to a new color\n t.color = newColor\n}\n\n// Run and Check Statements\nrun changeLight for 3 TrafficLight, 3 LightColor\ncheck NoConflictingGreen for 3 TrafficLight, 3 LightColor", "permalink": "crane-anyone-sly-pushup", "time": "2024-11-14 07:35:10.612572", "cmd": 1} {"id": 23157, "parent": 23156, "code": "// Signatures\nabstract sig LightColor {}\none sig Red, Yellow, Green extends LightColor {}\n\nsig TrafficLight {\n color: one LightColor,\n location: one String\n}\n\n// Facts\nfact SafeTrafficFlow {\n // Two traffic lights at the same intersection cannot be green at the same time\n all t1, t2: TrafficLight | t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Assertions\nassert NoConflictingGreen {\n // Ensures there are no two green lights at the same location\n all t1, t2: TrafficLight | \n t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Predicates\npred changeLight(t: TrafficLight, newColor: LightColor) {\n // Changes the color of a traffic light to a new color\n t.color = newColor\n}\n\n// Run and Check Statements\nrun changeLight for 3 TrafficLight, 3 LightColor\n//check NoConflictingGreen for 3 TrafficLight, 3 LightColor", "permalink": "bunion-sprang-pencil-scuff", "time": "2024-11-14 07:35:35.766226", "cmd": 1} {"id": 23159, "parent": 23158, "code": "// Signatures\nabstract sig LightColor {}\none sig Red, Yellow, Green extends LightColor {}\n\nsig TrafficLight {\n color: one LightColor,\n location: one String\n}\n\n// Facts\nfact SafeTrafficFlow {\n // Two traffic lights at the same intersection cannot be green at the same time\n all t1, t2: TrafficLight | t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Assertions\nassert NoConflictingGreen {\n // Ensures there are no two green lights at the same location\n all t1, t2: TrafficLight | \n t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Predicates\npred changeLight(t: TrafficLight, newColor: LightColor) {\n // Changes the color of a traffic light to a new color\n t.color = newColor\n}\n\n// Run and Check Statements\nrun changeLight for 3 TrafficLight, 3 LightColor\n//check NoConflictingGreen for 3 TrafficLight, 3 LightColor", "permalink": "silver-accent-garden-work", "time": "2024-11-14 07:35:38.232431", "cmd": 1} {"id": 23158, "parent": 23157, "code": "// Signatures\nabstract sig LightColor {}\none sig Red, Yellow, Green extends LightColor {}\n\nsig TrafficLight {\n color: one LightColor,\n location: one String\n}\n\n// Facts\nfact SafeTrafficFlow {\n // Two traffic lights at the same intersection cannot be green at the same time\n all t1, t2: TrafficLight | t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Assertions\nassert NoConflictingGreen {\n // Ensures there are no two green lights at the same location\n all t1, t2: TrafficLight | \n t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Predicates\npred changeLight(t: TrafficLight, newColor: LightColor) {\n // Changes the color of a traffic light to a new color\n t.color = newColor\n}\n\n// Run and Check Statements\nrun changeLight for 3 TrafficLight, 3 LightColor\n//check NoConflictingGreen for 3 TrafficLight, 3 LightColor", "permalink": "jawed-rants-popper-lying", "time": "2024-11-14 07:35:37.132836", "cmd": 1} {"id": 23160, "parent": 23159, "code": "// Signatures\nabstract sig LightColor {}\none sig Red, Yellow, Green extends LightColor {}\n\nsig TrafficLight {\n color: one LightColor,\n location: one String\n}\n\n// Facts\nfact SafeTrafficFlow {\n // Two traffic lights at the same intersection cannot be green at the same time\n all t1, t2: TrafficLight | t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Assertions\nassert NoConflictingGreen {\n // Ensures there are no two green lights at the same location\n all t1, t2: TrafficLight | \n t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Predicates\npred changeLight(t: TrafficLight, newColor: LightColor) {\n // Changes the color of a traffic light to a new color\n t.color = newColor\n}\n\n// Run and Check Statements\nrun show for 3\n//check NoConflictingGreen for 3 TrafficLight, 3 Light", "permalink": "bless-paver-jelly-amid", "time": "2024-11-14 07:37:05.523229", "cmd": 1} {"id": 23161, "parent": 23160, "code": "// Signatures\nabstract sig LightColor {}\none sig Red, Yellow, Green extends LightColor {}\n\nsig TrafficLight {\n color: one LightColor,\n location: one String\n}\n\n// Facts\nfact SafeTrafficFlow {\n // Two traffic lights at the same intersection cannot be green at the same time\n all t1, t2: TrafficLight | t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Assertions\nassert NoConflictingGreen {\n // Ensures there are no two green lights at the same location\n all t1, t2: TrafficLight | \n t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Predicates\npred changeLight(t: TrafficLight, newColor: LightColor) {\n // Changes the color of a traffic light to a new color\n t.color = newColor\n}\n\n// Run and Check Statements\nrun show for 3\n//check NoConflictingGreen for 3 TrafficLight, 3 Light", "permalink": "porous-poach-goofy-cope", "time": "2024-11-14 07:37:18.513060", "cmd": 1} {"id": 23162, "parent": 23161, "code": "// Signatures\nabstract sig LightColor {}\none sig Red, Yellow, Green extends LightColor {}\n\nsig TrafficLight {\n color: one LightColor,\n location: one String\n}\n\n// Facts\nfact SafeTrafficFlow {\n // Two traffic lights at the same intersection cannot be green at the same time\n all t1, t2: TrafficLight | t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Assertions\nassert NoConflictingGreen {\n // Ensures there are no two green lights at the same location\n all t1, t2: TrafficLight | \n t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Predicates\npred changeLight(t: TrafficLight, newColor: LightColor) {\n // Changes the color of a traffic light to a new color\n t.color = newColor\n}\n\n// Run and Check Statements\nrun show for 3\n//check NoConflictingGreen for 3 TrafficLight, 3 Light", "permalink": "kiwi-unholy-sedate-apache", "time": "2024-11-14 07:37:21.259191", "cmd": 1} {"id": 23163, "parent": 23162, "code": "// Signatures\nabstract sig LightColor {}\none sig Red, Yellow, Green extends LightColor {}\n\nsig TrafficLight {\n color: one LightColor,\n location: one String\n}\n\n// Facts\nfact SafeTrafficFlow {\n // Two traffic lights at the same intersection cannot be green at the same time\n all t1, t2: TrafficLight | t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Assertions\nassert NoConflictingGreen {\n // Ensures there are no two green lights at the same location\n all t1, t2: TrafficLight | \n t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Predicates\npred changeLight(t: TrafficLight, newColor: LightColor) {\n // Changes the color of a traffic light to a new color\n t.color = newColor\n}\n\n// Run and Check Statements\nrun{} for 3\n//check NoConflictingGreen for 3 TrafficLight, 3 Light", "permalink": "alias-reborn-treat-album", "time": "2024-11-14 07:37:57.156500", "cmd": 1} {"id": 23164, "parent": 23163, "code": "// Signatures\nabstract sig LightColor {}\none sig Red, Yellow, Green extends LightColor {}\n\nsig TrafficLight {\n color: one LightColor,\n location: one String\n}\n\n// Facts\nfact SafeTrafficFlow {\n // Two traffic lights at the same intersection cannot be green at the same time\n all t1, t2: TrafficLight | t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Assertions\nassert NoConflictingGreen {\n // Ensures there are no two green lights at the same location\n all t1, t2: TrafficLight | \n t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Predicates\npred changeLight(t: TrafficLight, newColor: LightColor) {\n // Changes the color of a traffic light to a new color\n t.color = newColor\n}\n\n// Run and Check Statements\nrun{} for 2\n//check NoConflictingGreen for 3 TrafficLight, 3 Light", "permalink": "vessel-manual-purity-aged", "time": "2024-11-14 07:38:29.649213", "cmd": 1} {"id": 23165, "parent": 23164, "code": "// Signatures\nabstract sig LightColor {}\none sig Red, Yellow, Green extends LightColor {}\n\nsig TrafficLight {\n color: one LightColor,\n location: one String\n}\n\n// Facts\nfact SafeTrafficFlow {\n // Two traffic lights at the same intersection cannot be green at the same time\n all t1, t2: TrafficLight | t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Assertions\nassert NoConflictingGreen {\n // Ensures there are no two green lights at the same location\n all t1, t2: TrafficLight | \n t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Predicates\npred changeLight(t: TrafficLight, newColor: LightColor) {\n // Changes the color of a traffic light to a new color\n t.color = newColor\n}\n\n// Run and Check Statements\nrun{} for 2\ncheck NoConflictingGreen for 3 TrafficLight, 3 Light", "permalink": "gloomy-kimono-kudos-bulge", "time": "2024-11-14 07:38:40.924700", "cmd": 1} {"id": 23167, "parent": 23166, "code": "// Signatures\nabstract sig LightColor {}\none sig Red, Yellow, Green extends LightColor {}\n\nsig TrafficLight {\n color: one LightColor,\n location: one String\n}\n\n// Facts\nfact SafeTrafficFlow {\n // Two traffic lights at the same intersection cannot be green at the same time\n all t1, t2: TrafficLight | t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Assertions\nassert NoConflictingGreen {\n // Ensures there are no two green lights at the same location\n all t1, t2: TrafficLight | \n t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Predicates\npred changeLight(t: TrafficLight, newColor: LightColor) {\n // Changes the color of a traffic light to a new color\n t.color = newColor\n}\n\n// Run and Check Statements\nrun{} for 2 TrafficLight, 3 Light\n//check NoConflictingGreen for 3 TrafficLight, 3 Light", "permalink": "open-punk-chummy-raven", "time": "2024-11-14 07:39:31.716083", "cmd": 1} {"id": 23166, "parent": 23165, "code": "// Signatures\nabstract sig LightColor {}\none sig Red, Yellow, Green extends LightColor {}\n\nsig TrafficLight {\n color: one LightColor,\n location: one String\n}\n\n// Facts\nfact SafeTrafficFlow {\n // Two traffic lights at the same intersection cannot be green at the same time\n all t1, t2: TrafficLight | t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Assertions\nassert NoConflictingGreen {\n // Ensures there are no two green lights at the same location\n all t1, t2: TrafficLight | \n t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Predicates\npred changeLight(t: TrafficLight, newColor: LightColor) {\n // Changes the color of a traffic light to a new color\n t.color = newColor\n}\n\n// Run and Check Statements\nrun{} for 2 TrafficLight, 3 Light\n//check NoConflictingGreen for 3 TrafficLight, 3 Light", "permalink": "carded-rented-whacky-defuse", "time": "2024-11-14 07:39:21.349741", "cmd": 1} {"id": 23168, "parent": 23167, "code": "// Signatures\nabstract sig LightColor {}\none sig Red, Yellow, Green extends LightColor {}\n\nsig TrafficLight {\n color: one LightColor,\n location: one String\n}\n\n// Facts\nfact SafeTrafficFlow {\n // Two traffic lights at the same intersection cannot be green at the same time\n all t1, t2: TrafficLight | t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Assertions\nassert NoConflictingGreen {\n // Ensures there are no two green lights at the same location\n all t1, t2: TrafficLight | \n t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Predicates\npred changeLight(t: TrafficLight, newColor: LightColor) {\n // Changes the color of a traffic light to a new color\n t.color = newColor\n}\n\n// Run and Check Statements\nrun{} for 2 TrafficLight, 3 Lightcolor\n//check NoConflictingGreen for 3 TrafficLight, 3 Light", "permalink": "plasma-blast-whoops-puppet", "time": "2024-11-14 07:39:42.392905", "cmd": 1} {"id": 23169, "parent": 23168, "code": "// Signatures\nabstract sig LightColor {}\none sig Red, Yellow, Green extends LightColor {}\n\nsig TrafficLight {\n color: one LightColor,\n location: one String\n}\n\n// Facts\nfact SafeTrafficFlow {\n // Two traffic lights at the same intersection cannot be green at the same time\n all t1, t2: TrafficLight | t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Assertions\nassert NoConflictingGreen {\n // Ensures there are no two green lights at the same location\n all t1, t2: TrafficLight | \n t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Predicates\npred changeLight(t: TrafficLight, newColor: LightColor) {\n // Changes the color of a traffic light to a new color\n t.color = newColor\n}\n\n// Run and Check Statements\nrun{} for 2 TrafficLight, 3 LightColor\n//check NoConflictingGreen for 3 TrafficLight, 3 Light", "permalink": "cacti-slush-cover-heave", "time": "2024-11-14 07:40:02.139943", "cmd": 1} {"id": 23170, "parent": 23169, "code": "// Signatures\nabstract sig LightColor {}\none sig Red, Yellow, Green extends LightColor {}\n\nsig TrafficLight {\n color: one LightColor,\n location: one String\n}\n\n// Facts\nfact SafeTrafficFlow {\n // Two traffic lights at the same intersection cannot be green at the same time\n all t1, t2: TrafficLight | t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Assertions\nassert NoConflictingGreen {\n // Ensures there are no two green lights at the same location\n all t1, t2: TrafficLight | \n t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Predicates\npred changeLight(t: TrafficLight, newColor: LightColor) {\n // Changes the color of a traffic light to a new color\n t.color = newColor\n}\n\n// Run and Check Statements\nrun{} for 2 TrafficLight, 3 LightColor\ncheck NoConflictingGreen for 3 TrafficLight, 3 Light", "permalink": "luster-relax-reset-clear", "time": "2024-11-14 07:40:16.940162", "cmd": 1} {"id": 23171, "parent": 23170, "code": "// Signatures\nabstract sig LightColor {}\none sig Red, Yellow, Green extends LightColor {}\n\nsig TrafficLight {\n color: one LightColor,\n location: one String\n}\n\n// Facts\nfact SafeTrafficFlow {\n // Two traffic lights at the same intersection cannot be green at the same time\n all t1, t2: TrafficLight | t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Assertions\nassert NoConflictingGreen {\n // Ensures there are no two green lights at the same location\n all t1, t2: TrafficLight | \n t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Predicates\npred changeLight(t: TrafficLight, newColor: LightColor) {\n // Changes the color of a traffic light to a new color\n t.color = newColor\n}\n\n// Run and Check Statements\nrun{} for 2 TrafficLight, 3 LightColor\ncheck NoConflictingGreen for 3 TrafficLight, 3 LightColor", "permalink": "afoot-affix-nibble-idly", "time": "2024-11-14 07:40:28.548689", "cmd": 1} {"id": 23172, "parent": 23171, "code": "// Signatures\nabstract sig LightColor {}\none sig Red, Yellow, Green extends LightColor {}\n\nsig TrafficLight {\n color: one LightColor,\n location: one String\n}\n\n// Facts\nfact SafeTrafficFlow {\n // Two traffic lights at the same intersection cannot be green at the same time\n all t1, t2: TrafficLight | t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Assertions\nassert NoConflictingGreen {\n // Ensures there are no two green lights at the same location\n all t1, t2: TrafficLight | \n t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Predicates\npred changeLight(t: TrafficLight, newColor: LightColor) {\n // Changes the color of a traffic light to a new color\n t.color = newColor\n}\n\n// Run and Check Statements\n//check NoConflictingGreen for 3 TrafficLight, 3 Ligh", "permalink": "retake-slit-aids-subway", "time": "2024-11-14 07:41:16.481160", "cmd": 2} {"id": 23173, "parent": 23172, "code": "// Signatures\nabstract sig LightColor {}\none sig Red, Yellow, Green extends LightColor {}\n\nsig TrafficLight {\n color: one LightColor,\n location: one String\n}\n\n// Facts\nfact SafeTrafficFlow {\n // Two traffic lights at the same intersection cannot be green at the same time\n all t1, t2: TrafficLight | t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Assertions\nassert NoConflictingGreen {\n // Ensures there are no two green lights at the same location\n all t1, t2: TrafficLight | \n t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Predicates\npred changeLight(t: TrafficLight, newColor: LightColor) {\n // Changes the color of a traffic light to a new color\n t.color = newColor\n}\n\n// Run and Check Statements\n//check NoConflictingGreen for 3 TrafficLight, 3 Ligh", "permalink": "impish-swung-self-groovy", "time": "2024-11-14 07:41:22.880357", "cmd": 2} {"id": 23174, "parent": 23173, "code": "// Signatures\nabstract sig LightColor {}\none sig Red, Yellow, Green extends LightColor {}\n\nsig TrafficLight {\n color: one LightColor,\n location: one String\n}\n\n// Facts\nfact SafeTrafficFlow {\n // Two traffic lights at the same intersection cannot be green at the same time\n all t1, t2: TrafficLight | t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Assertions\nassert NoConflictingGreen {\n // Ensures there are no two green lights at the same location\n all t1, t2: TrafficLight | \n t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Predicates\npred changeLight(t: TrafficLight, newColor: LightColor) {\n // Changes the color of a traffic light to a new color\n t.color = newColor\n}\n\n// Run and Check Statements\ncheck NoConflictingGreen for 3 TrafficLight, 3 Ligh", "permalink": "wad-scope-groggy-saga", "time": "2024-11-14 07:41:31.176553", "cmd": 2} {"id": 23175, "parent": 23174, "code": "// Signatures\nabstract sig LightColor {}\none sig Red, Yellow, Green extends LightColor {}\n\nsig TrafficLight {\n color: one LightColor,\n location: one String\n}\n\n// Facts\nfact SafeTrafficFlow {\n // Two traffic lights at the same intersection cannot be green at the same time\n all t1, t2: TrafficLight | t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Assertions\nassert NoConflictingGreen {\n // Ensures there are no two green lights at the same location\n all t1, t2: TrafficLight | \n t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Predicates\npred changeLight(t: TrafficLight, newColor: LightColor) {\n // Changes the color of a traffic light to a new color\n t.color = newColor\n}\n\n// Run and Check Statements\ncheck NoConflictingGreen for 3 TrafficLight, 3 LightColor", "permalink": "deny-resize-graves-lark", "time": "2024-11-14 07:41:40.027304", "cmd": 2} {"id": 23176, "parent": 23175, "code": "// Signatures\nabstract sig LightColor {}\none sig Red, Yellow, Green extends LightColor {}\n\nsig TrafficLight {\n color: one LightColor,\n location: one String\n}\n\n// Facts\nfact SafeTrafficFlow {\n // Two traffic lights at the same intersection cannot be green at the same time\n all t1, t2: TrafficLight | t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Assertions\nassert NoConflictingGreen {\n // Ensures there are no two green lights at the same location\n all t1, t2: TrafficLight | \n t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Predicates\npred changeLight(t: TrafficLight, newColor: LightColor) {\n // Changes the color of a traffic light to a new color\n t.color = newColor\n}\n\n// Run and Check Statements\ncheck NoConflictingGreen for 3 TrafficLight, 3 LightColor", "permalink": "rectal-large-defame-paging", "time": "2024-11-14 07:41:57.757922", "cmd": 2} {"id": 23177, "parent": 23176, "code": "// Signatures\nabstract sig LightColor {}\none sig Red, Yellow, Green extends LightColor {}\n\nsig TrafficLight {\n color: one LightColor,\n location: one String\n}\n\n// Facts\nfact SafeTrafficFlow {\n // Two traffic lights at the same intersection cannot be green at the same time\n all t1, t2: TrafficLight | t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Assertions\nassert NoConflictingGreen {\n // Ensures there are no two green lights at the same location\n all t1, t2: TrafficLight | \n t1 != t2 and t1.location = t2.location implies \n not (t1.color = Green and t2.color = Green)\n}\n\n// Predicates\npred changeLight(t: TrafficLight, newColor: LightColor) {\n // Changes the color of a traffic light to a new color\n t.color = newColor\n}\n\n// Run and Check Statements\ncheck NoConflictingGreen for 3 TrafficLight, 3 LightColor", "permalink": "shelve-footer-french-jailer", "time": "2024-11-14 07:54:31.250744", "cmd": 1} {"id": 23186, "parent": 23185, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // No borrower should have the same book listed more than once\n all br: Borrower | br.borrowedBooks = br.borrowedBooks\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\n//run borrowBook for 3 Book, 3 Borrower\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "old-client-oyster-drone", "time": "2024-11-14 07:59:16.640715", "cmd": 1} {"id": 23187, "parent": 23186, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // No borrower should have the same book listed more than once\n all br: Borrower | br.borrowedBooks = br.borrowedBooks\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\n//run borrowBook for 3 Book, 3 Borrower\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "obtain-sash-gothic-aching", "time": "2024-11-14 07:59:58.684842", "cmd": 1} {"id": 23184, "parent": 23183, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // No borrower should have the same book listed more than once\n all br: Borrower | br.borrowedBooks = br.borrowedBooks\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\n//run borrowBook for 3 Book, 3 Borrower\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "geiger-deuce-sank-trout", "time": "2024-11-14 07:58:33.050313", "cmd": 1} {"id": 23183, "parent": 23182, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // No borrower should have the same book listed more than once\n all br: Borrower | br.borrowedBooks = br.borrowedBooks\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\n//run borrowBook for 3 Book, 3 Borrower\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "yeah-slang-gamma-matron", "time": "2024-11-14 07:58:25.777516", "cmd": 1} {"id": 23185, "parent": 23184, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // No borrower should have the same book listed more than once\n all br: Borrower | br.borrowedBooks = br.borrowedBooks\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\n//run borrowBook for 3 Book, 3 Borrower\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "grit-cymbal-hasty-swerve", "time": "2024-11-14 07:58:36.707165", "cmd": 1} {"id": 23182, "parent": 23181, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // No borrower should have the same book listed more than once\n all br: Borrower | br.borrowedBooks = br.borrowedBooks\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\n//run borrowBook for 3 Book, 3 Borrower\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "quail-header-gecko-onward", "time": "2024-11-14 07:58:21.087980", "cmd": 1} {"id": 23189, "parent": 23188, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // Ensures that a borrower does not borrow the same book multiple times\n all br: Borrower | no br.borrowedBooks & (br.borrowedBooks - br.borrowedBooks)\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n // Adds a book to the borrower's borrowed books\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\nrun borrowBook for 3 Book, 3 Borrower\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "moving-dubbed-status-elves", "time": "2024-11-14 08:02:15.093661", "cmd": 2} {"id": 23188, "parent": 23187, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // Ensures that a borrower does not borrow the same book multiple times\n all br: Borrower | no br.borrowedBooks & (br.borrowedBooks - br.borrowedBooks)\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n // Adds a book to the borrower's borrowed books\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\nrun borrowBook for 3 Book, 3 Borrower\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "ocelot-crux-ounce-thaw", "time": "2024-11-14 08:02:09.502966", "cmd": 1} {"id": 23190, "parent": 23189, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // Ensures that a borrower does not borrow the same book multiple times\n all br: Borrower | no br.borrowedBooks & (br.borrowedBooks - br.borrowedBooks)\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n // Adds a book to the borrower's borrowed books\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\nrun borrowBook for 3 \ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "drove-lying-sauna-yippee", "time": "2024-11-14 08:02:41.182058", "cmd": 1} {"id": 23192, "parent": 23191, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // Ensures that a borrower does not borrow the same book multiple times\n all br: Borrower | no br.borrowedBooks & (br.borrowedBooks - br.borrowedBooks)\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n // Adds a book to the borrower's borrowed books\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\nrun borrowBook for 3 \ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "salute-stamp-raft-kindle", "time": "2024-11-14 08:02:57.228223", "cmd": 1} {"id": 23191, "parent": 23190, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // Ensures that a borrower does not borrow the same book multiple times\n all br: Borrower | no br.borrowedBooks & (br.borrowedBooks - br.borrowedBooks)\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n // Adds a book to the borrower's borrowed books\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\nrun borrowBook for 3 ,3\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "kilt-sheet-yahoo-tiptop", "time": "2024-11-14 08:02:48.756937", "cmd": 1} {"id": 23193, "parent": 23192, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // Ensures that a borrower does not borrow the same book multiple times\n all br: Borrower | no br.borrowedBooks & (br.borrowedBooks - br.borrowedBooks)\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n // Adds a book to the borrower's borrowed books\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\nrun {} for 3 \ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "wildly-output-sleek-trend", "time": "2024-11-14 08:03:16.724344", "cmd": 1} {"id": 23194, "parent": 23193, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // Ensures that a borrower does not borrow the same book multiple times\n all br: Borrower | no br.borrowedBooks & (br.borrowedBooks - br.borrowedBooks)\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n // Adds a book to the borrower's borrowed books\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\nrun {} for 3 \ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "wiry-scheme-rascal-oasis", "time": "2024-11-14 08:03:22.477568", "cmd": 1} {"id": 23195, "parent": 23194, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // Ensures that a borrower does not borrow the same book multiple times\n all br: Borrower | no br.borrowedBooks & (br.borrowedBooks - br.borrowedBooks)\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n // Adds a book to the borrower's borrowed books\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\nrun {} for 3 Book, 3 Borrower\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "shrill-banked-bottom-judo", "time": "2024-11-14 08:03:33.085430", "cmd": 1} {"id": 23198, "parent": 23197, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // Ensures that a borrower does not borrow the same book multiple times\n all br: Borrower | no br.borrowedBooks & (br.borrowedBooks - br.borrowedBooks)\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n // Adds a book to the borrower's borrowed books\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\nrun {} for 3 Book, 3 Borrower\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "buzz-simply-tweak-tremor", "time": "2024-11-14 08:03:40.880734", "cmd": 1} {"id": 23199, "parent": 23198, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // Ensures that a borrower does not borrow the same book multiple times\n all br: Borrower | no br.borrowedBooks & (br.borrowedBooks - br.borrowedBooks)\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n // Adds a book to the borrower's borrowed books\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\nrun {} for 3 Book, 3 Borrower\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "fondue-exit-silica-guy", "time": "2024-11-14 08:03:43.206017", "cmd": 1} {"id": 23196, "parent": 23195, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // Ensures that a borrower does not borrow the same book multiple times\n all br: Borrower | no br.borrowedBooks & (br.borrowedBooks - br.borrowedBooks)\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n // Adds a book to the borrower's borrowed books\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\nrun {} for 3 Book, 3 Borrower\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "ashes-possum-sage-yo-yo", "time": "2024-11-14 08:03:34.729153", "cmd": 1} {"id": 23197, "parent": 23196, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // Ensures that a borrower does not borrow the same book multiple times\n all br: Borrower | no br.borrowedBooks & (br.borrowedBooks - br.borrowedBooks)\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n // Adds a book to the borrower's borrowed books\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\nrun {} for 3 Book, 3 Borrower\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "ritzy-cash-purist-grip", "time": "2024-11-14 08:03:35.536300", "cmd": 1} {"id": 23200, "parent": 23199, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // Ensures that a borrower does not borrow the same book multiple times\n all br: Borrower | no br.borrowedBooks & (br.borrowedBooks - br.borrowedBooks)\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n // Adds a book to the borrower's borrowed books\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\nrun {} for 3 Book, 3 Borrower\n//check NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "enrich-clammy-karate-stooge", "time": "2024-11-14 08:03:57.946217", "cmd": 1} {"id": 23201, "parent": 23200, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // Ensures that a borrower does not borrow the same book multiple times\n all br: Borrower | no br.borrowedBooks & (br.borrowedBooks - br.borrowedBooks)\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n // Adds a book to the borrower's borrowed books\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\nrun {} for 3 Book, 3 Borrower\n//check NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "entomb-jam-waged-float", "time": "2024-11-14 08:03:59.218412", "cmd": 1} {"id": 23202, "parent": 23201, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // Ensures that a borrower does not borrow the same book multiple times\n all br: Borrower | no br.borrowedBooks & (br.borrowedBooks - br.borrowedBooks)\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n // Adds a book to the borrower's borrowed books\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\nrun {} for 4 Book, 3 Borrower\n//check NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "crept-subway-embark-runway", "time": "2024-11-14 08:04:18.971823", "cmd": 1} {"id": 23203, "parent": 23202, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // Ensures that a borrower does not borrow the same book multiple times\n all br: Borrower | no br.borrowedBooks & (br.borrowedBooks - br.borrowedBooks)\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n // Adds a book to the borrower's borrowed books\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\n//run {} for 4 Book, 3 Borrower\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "detail-cod-prissy-umpire", "time": "2024-11-14 08:04:47.742465", "cmd": 1} {"id": 23204, "parent": 23203, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // Ensures that a borrower does not borrow the same book multiple times\n all br: Borrower | no br.borrowedBooks & (br.borrowedBooks - br.borrowedBooks)\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n // Adds a book to the borrower's borrowed books\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\n//run {} for 4 Book, 3 Borrower\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "churn-gaming-study-rants", "time": "2024-11-14 08:04:49.832170", "cmd": 1} {"id": 23208, "parent": 23207, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // Ensures that a borrower does not borrow the same book multiple times\n all br: Borrower | no br.borrowedBooks & (br.borrowedBooks - br.borrowedBooks)\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n // Adds a book to the borrower's borrowed books\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\n//run {} for 4 Book, 3 Borrower\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "caddy-gift-serve-task", "time": "2024-11-14 08:06:50.527782", "cmd": 1} {"id": 23209, "parent": 23208, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // Ensures that a borrower does not borrow the same book multiple times\n all br: Borrower | no br.borrowedBooks & (br.borrowedBooks - br.borrowedBooks)\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n // Adds a book to the borrower's borrowed books\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\n//run {} for 4 Book, 3 Borrower\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "femur-trash-camera-broken", "time": "2024-11-14 08:06:52.375489", "cmd": 1} {"id": 23207, "parent": 23206, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // Ensures that a borrower does not borrow the same book multiple times\n all br: Borrower | no br.borrowedBooks & (br.borrowedBooks - br.borrowedBooks)\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n // Adds a book to the borrower's borrowed books\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\n//run {} for 4 Book, 3 Borrower\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "manor-untidy-floss-thrash", "time": "2024-11-14 08:06:32.999355", "cmd": 1} {"id": 23205, "parent": 23204, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // Ensures that a borrower does not borrow the same book multiple times\n all br: Borrower | no br.borrowedBooks & (br.borrowedBooks - br.borrowedBooks)\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n // Adds a book to the borrower's borrowed books\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\n//run {} for 4 Book, 3 Borrower\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "sandal-unreal-gulp-unreal", "time": "2024-11-14 08:05:22.689690", "cmd": 1} {"id": 23206, "parent": 23205, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // Ensures that a borrower does not borrow the same book multiple times\n all br: Borrower | no br.borrowedBooks & (br.borrowedBooks - br.borrowedBooks)\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n // Adds a book to the borrower's borrowed books\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\n//run {} for 4 Book, 3 Borrower\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "proud-paving-drone-bobble", "time": "2024-11-14 08:05:24.177380", "cmd": 1} {"id": 23210, "parent": 23209, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // Ensures that a borrower does not borrow the same book multiple times\n all br: Borrower | no br.borrowedBooks & (br.borrowedBooks - br.borrowedBooks)\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n // Adds a book to the borrower's borrowed books\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\n//run {} for 4 Book, 3 Borrower\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower\npred show{}", "permalink": "from-murky-recoup-chain", "time": "2024-11-14 08:07:44.646489", "cmd": 1} {"id": 23211, "parent": 23210, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // Ensures that a borrower does not borrow the same book multiple times\n all br: Borrower | no br.borrowedBooks & (br.borrowedBooks - br.borrowedBooks)\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n // Adds a book to the borrower's borrowed books\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\npred show{}\nrun {} for 4 Book, 3 Borrower\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower\n", "permalink": "radial-walk-lugged-shut", "time": "2024-11-14 08:08:19.263429", "cmd": 1} {"id": 23212, "parent": 23211, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // Ensures that a borrower does not borrow the same book multiple times\n all br: Borrower | no br.borrowedBooks & (br.borrowedBooks - br.borrowedBooks)\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n // Adds a book to the borrower's borrowed books\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\npred show{}\nrun {} for 4 Book, 3 Borrower\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower\n", "permalink": "sister-secret-venus-rage", "time": "2024-11-14 08:08:24.782017", "cmd": 1} {"id": 23213, "parent": 23212, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // Ensures that a borrower does not borrow the same book multiple times\n all br: Borrower | no br.borrowedBooks & (br.borrowedBooks - br.borrowedBooks)\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n // Adds a book to the borrower's borrowed books\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\npred show{}\nrun {} for 4 \ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower\n", "permalink": "void-return-gummy-turtle", "time": "2024-11-14 08:08:46.352867", "cmd": 1} {"id": 23214, "parent": 23213, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // Ensures that a borrower does not borrow the same book multiple times\n all br: Borrower | no br.borrowedBooks & (br.borrowedBooks - br.borrowedBooks)\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n // Adds a book to the borrower's borrowed books\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\npred show{}\nrun {} for 4 \ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower\n", "permalink": "zesty-spent-thrash-plug", "time": "2024-11-14 08:08:47.830098", "cmd": 1} {"id": 23217, "parent": 23216, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // Ensures that a borrower does not borrow the same book multiple times\n all br: Borrower | no br.borrowedBooks & (br.borrowedBooks - br.borrowedBooks)\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n // Adds a book to the borrower's borrowed books\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\npred show{}\nrun {} for 4 \ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower\n", "permalink": "yippee-entrap-ploy-slogan", "time": "2024-11-14 08:08:50.626513", "cmd": 1} {"id": 23216, "parent": 23215, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // Ensures that a borrower does not borrow the same book multiple times\n all br: Borrower | no br.borrowedBooks & (br.borrowedBooks - br.borrowedBooks)\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n // Adds a book to the borrower's borrowed books\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\npred show{}\nrun {} for 4 \ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower\n", "permalink": "oasis-boxing-rare-smugly", "time": "2024-11-14 08:08:49.874412", "cmd": 1} {"id": 23215, "parent": 23214, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // Ensures that a borrower does not borrow the same book multiple times\n all br: Borrower | no br.borrowedBooks & (br.borrowedBooks - br.borrowedBooks)\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n // Adds a book to the borrower's borrowed books\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\npred show{}\nrun {} for 4 \ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower\n", "permalink": "verse-ploy-kisser-padded", "time": "2024-11-14 08:08:49.254423", "cmd": 1} {"id": 23218, "parent": 23217, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // Ensures that a borrower does not borrow the same book multiple times\n all br: Borrower | no br.borrowedBooks & (br.borrowedBooks - br.borrowedBooks)\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n // Adds a book to the borrower's borrowed books\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\npred show{}\nrun borrowBook for 4 Book, 3 Borrower\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower\n", "permalink": "shady-yeast-yin-uproar", "time": "2024-11-14 08:09:24.646802", "cmd": 1} {"id": 23236, "parent": 23228, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // Ensures that a borrower does not borrow the same book multiple times\n all br: Borrower | no br.borrowedBooks & (br.borrowedBooks - br.borrowedBooks)\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n // Adds a book to the borrower's borrowed books\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\nrun borrowBook for 4 Book, 3 Borrower\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower\n", "permalink": "cloud-axis-sprout-chevy", "time": "2024-11-14 09:51:12.440601", "cmd": 1} {"id": 23219, "parent": 23218, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // Ensures that a borrower does not borrow the same book multiple times\n all br: Borrower | no br.borrowedBooks & (br.borrowedBooks - br.borrowedBooks)\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n // Adds a book to the borrower's borrowed books\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\nrun borrowBook for 4 Book, 3 Borrower\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower\n", "permalink": "stark-dinghy-hyphen-icon", "time": "2024-11-14 08:09:33.203811", "cmd": 1} {"id": 23220, "parent": 23219, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // Ensures that a borrower does not borrow the same book multiple times\n all br: Borrower | no br.borrowedBooks & (br.borrowedBooks - br.borrowedBooks)\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n // Adds a book to the borrower's borrowed books\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\nrun borrowBook for 4 Book, 3 Borrower\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower\n", "permalink": "outfit-nest-rebuff-volley", "time": "2024-11-14 08:09:34.954801", "cmd": 1} {"id": 23228, "parent": 23220, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // Ensures that a borrower does not borrow the same book multiple times\n all br: Borrower | no br.borrowedBooks & (br.borrowedBooks - br.borrowedBooks)\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n // Adds a book to the borrower's borrowed books\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\nrun borrowBook for 4 Book, 3 Borrower\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower\n", "permalink": "gutter-corny-delay-astute", "time": "2024-11-14 09:44:12.384845", "cmd": 1} {"id": 23221, "parent": null, "code": "sig Student {\n registeredCourses: set Semester -> Course\n}\n\nsig Semester {}\nsig Course {}\n\nfact RegistrationConstraint {\n // For each student, the courses they register for in any semester must have been registered in a previous semester\n all s: Student, currSem: Semester, c: Course |\n (c in s.registeredCourses[currSem]) => \n (some prevSem: Semester | prevSem != currSem && c in s.registeredCourses[prevSem])\n}\n\n// Sample instances to check the model\nrun {} for 5 Student, 4 Semester, 6 Course", "permalink": "curled-aorta-slept-those", "time": "2024-11-14 09:15:50.610821", "cmd": 1} {"id": 23223, "parent": 23222, "code": "sig Student {\n registeredCourses: set Semester -> Course\n}\n\nsig Semester {\n isSummer: Bool // Indicates if a semester is a summer semester\n}\n\nsig Course {}\n\nfact RegistrationConstraint {\n // The constraint applies only for summer semesters\n all s: Student, currSem: Semester, c: Course |\n (currSem.isSummer = True && c in s.registeredCourses[currSem]) => \n (some prevSem: Semester | prevSem != currSem && c in s.registeredCourses[prevSem])\n}\n\n// Sample instances to check the model\nrun {} for 5 Student, 4 Semester, 6 Course", "permalink": "mumbo-gents-mural-edging", "time": "2024-11-14 09:17:01.536935", "cmd": 1} {"id": 23222, "parent": 23221, "code": "sig Student {\n registeredCourses: set Semester -> Course\n}\n\nsig Semester {\n isSummer: Bool // Indicates if a semester is a summer semester\n}\n\nsig Course {}\n\nfact RegistrationConstraint {\n // The constraint applies only for summer semesters\n all s: Student, currSem: Semester, c: Course |\n (currSem.isSummer = True && c in s.registeredCourses[currSem]) => \n (some prevSem: Semester | prevSem != currSem && c in s.registeredCourses[prevSem])\n}\n\n// Sample instances to check the model\nrun {} for 5 Student, 4 Semester, 6 Course", "permalink": "grub-dining-hungry-flier", "time": "2024-11-14 09:16:57.349470", "cmd": 1} {"id": 23224, "parent": 23223, "code": "sig Student {\n registeredCourses: set Semester -> Course\n}\n\nabstract sig Semester {}\none sig SummerSemester, RegularSemester extends Semester {} \n\nsig Course {}\n\nfact RegistrationConstraint {\n // The constraint applies only for summer semesters\n all s: Student, currSem: SummerSemester, c: Course |\n (c in s.registeredCourses[currSem]) => \n (some prevSem: Semester | prevSem != currSem && c in s.registeredCourses[prevSem])\n}\n\n// Sample instances to check the model\nrun {} for 5 Student, 4 Semester, 6 Course", "permalink": "humble-chemo-small-baggie", "time": "2024-11-14 09:17:27.641538", "cmd": 1} {"id": 23227, "parent": 23226, "code": "sig Student {\n registeredCourses: set Semester -> Course\n}\n\nabstract sig Semester {}\none sig SummerSemester, RegularSemester extends Semester {} \n\nsig Course {}\n\nfact RegistrationConstraint {\n // The constraint applies only for summer semesters\n all s: Student, currSem: SummerSemester, c: Course |\n (c in s.registeredCourses[currSem]) => \n (some prevSem: Semester | prevSem != currSem && c in s.registeredCourses[prevSem])\n}\n\n// Sample instances to check the model\nrun {} for 3 Student, 3 Semester, 3 Course", "permalink": "candy-hazy-envoy-recite", "time": "2024-11-14 09:18:37.287893", "cmd": 1} {"id": 23408, "parent": 23407, "code": "sig Student {\n registeredCourses: set Semester -> Course\n}\n\nabstract sig Semester {}\none sig SummerSemester, RegularSemester extends Semester {} \n\nsig Course {}\n\nfact RegistrationConstraint {\n // The constraint applies only for summer semesters\n all s: Student, currSem: SummerSemester, c: Course |\n (c in s.registeredCourses[currSem]) => \n (some prevSem: Semester | prevSem != currSem && c in s.registeredCourses[prevSem])\n}\n\n// Sample instances to check the model\nrun {} for 3 Student, 3 Semester, 3 Course", "permalink": "eggnog-eleven-expert-float", "time": "2024-11-16 15:54:20.710231", "cmd": 1} {"id": 23225, "parent": 23224, "code": "sig Student {\n registeredCourses: set Semester -> Course\n}\n\nabstract sig Semester {}\none sig SummerSemester, RegularSemester extends Semester {} \n\nsig Course {}\n\nfact RegistrationConstraint {\n // The constraint applies only for summer semesters\n all s: Student, currSem: SummerSemester, c: Course |\n (c in s.registeredCourses[currSem]) => \n (some prevSem: Semester | prevSem != currSem && c in s.registeredCourses[prevSem])\n}\n\n// Sample instances to check the model\nrun {} for 3 Student, 3 Semester, 3 Course", "permalink": "neatly-lanky-ebook-clammy", "time": "2024-11-14 09:18:32.230780", "cmd": 1} {"id": 23226, "parent": 23225, "code": "sig Student {\n registeredCourses: set Semester -> Course\n}\n\nabstract sig Semester {}\none sig SummerSemester, RegularSemester extends Semester {} \n\nsig Course {}\n\nfact RegistrationConstraint {\n // The constraint applies only for summer semesters\n all s: Student, currSem: SummerSemester, c: Course |\n (c in s.registeredCourses[currSem]) => \n (some prevSem: Semester | prevSem != currSem && c in s.registeredCourses[prevSem])\n}\n\n// Sample instances to check the model\nrun {} for 3 Student, 3 Semester, 3 Course", "permalink": "reach-emu-unsaid-dagger", "time": "2024-11-14 09:18:35.552143", "cmd": 1} {"id": 23229, "parent": null, "code": "abstract sig Person {}\nsig Man extends Person {}\nsig Woman extends Person {}\nsig Grandpa extends Man {}\ncheck a\ncheck a for 4\ncheck a for 4 but 3 Woman\nC\ncheck a for 4 but 3 Man, 5 Woman\ncheck a for 4 Person\ncheck a for 4 Person, 3 Woman\ncheck a for 3 Man, 4 Woman\ncheck a for 3 Man, 4 Woman, 2 Grandpa", "permalink": "yummy-juice-donut-flask", "time": "2024-11-14 09:48:37.933533", "cmd": 1} {"id": 23233, "parent": 23232, "code": "abstract sig Person {}\nsig Man extends Person {}\nsig Woman extends Person {}\nsig Grandpa extends Man {}\ncheck a\ncheck a for 4\ncheck a for 4 but 3 Woman\ncheck a for 4 but 3 Man, 5 Woman\ncheck a for 4 Person\ncheck a for 4 Person, 3 Woman\ncheck a for 3 Man, 4 Woman\ncheck a for 3 Man, 4 Woman, 2 Grandpa", "permalink": "repave-prozac-tartly-anger", "time": "2024-11-14 09:48:57.058456", "cmd": 1} {"id": 23232, "parent": 23231, "code": "abstract sig Person {}\nsig Man extends Person {}\nsig Woman extends Person {}\nsig Grandpa extends Man {}\ncheck a\ncheck a for 4\ncheck a for 4 but 3 Woman\ncheck a for 4 but 3 Man, 5 Woman\ncheck a for 4 Person\ncheck a for 4 Person, 3 Woman\ncheck a for 3 Man, 4 Woman\ncheck a for 3 Man, 4 Woman, 2 Grandpa", "permalink": "glue-create-boring-unwary", "time": "2024-11-14 09:48:53.148898", "cmd": 1} {"id": 23230, "parent": 23229, "code": "abstract sig Person {}\nsig Man extends Person {}\nsig Woman extends Person {}\nsig Grandpa extends Man {}\ncheck a\ncheck a for 4\ncheck a for 4 but 3 Woman\ncheck a for 4 but 3 Man, 5 Woman\ncheck a for 4 Person\ncheck a for 4 Person, 3 Woman\ncheck a for 3 Man, 4 Woman\ncheck a for 3 Man, 4 Woman, 2 Grandpa", "permalink": "line-thrift-gully-gush", "time": "2024-11-14 09:48:48.400739", "cmd": 1} {"id": 23231, "parent": 23230, "code": "abstract sig Person {}\nsig Man extends Person {}\nsig Woman extends Person {}\nsig Grandpa extends Man {}\ncheck a\ncheck a for 4\ncheck a for 4 but 3 Woman\ncheck a for 4 but 3 Man, 5 Woman\ncheck a for 4 Person\ncheck a for 4 Person, 3 Woman\ncheck a for 3 Man, 4 Woman\ncheck a for 3 Man, 4 Woman, 2 Grandpa", "permalink": "stucco-poplar-flock-stamp", "time": "2024-11-14 09:48:50.939321", "cmd": 1} {"id": 23235, "parent": 23234, "code": "abstract sig Person {}\nsig Man extends Person {}\nsig Woman extends Person {}\nsig Grandpa extends Man {}\ncheck person\ncheck a for 4\ncheck a for 4 but 3 Woman\ncheck a for 4 but 3 Man, 5 Woman\ncheck a for 4 Person\ncheck a for 4 Person, 3 Woman\ncheck a for 3 Man, 4 Woman\ncheck a for 3 Man, 4 Woman, 2 Grandpa", "permalink": "utopia-tamer-canyon-salad", "time": "2024-11-14 09:49:26.794362", "cmd": 1} {"id": 23234, "parent": 23233, "code": "abstract sig Person {}\nsig Man extends Person {}\nsig Woman extends Person {}\nsig Grandpa extends Man {}\ncheck person\ncheck a for 4\ncheck a for 4 but 3 Woman\ncheck a for 4 but 3 Man, 5 Woman\ncheck a for 4 Person\ncheck a for 4 Person, 3 Woman\ncheck a for 3 Man, 4 Woman\ncheck a for 3 Man, 4 Woman, 2 Grandpa", "permalink": "canyon-thee-trance-those", "time": "2024-11-14 09:49:22.505035", "cmd": 1} {"id": 23237, "parent": 23236, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // Ensures that a borrower does not borrow the same book multiple times\n all br: Borrower | no br.borrowedBooks & (br.borrowedBooks - br.borrowedBooks)\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n // Adds a book to the borrower's borrowed books\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\n\n\nrun borrowBook for 3 Book, 3 Borrower\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "setup-snort-result-walnut", "time": "2024-11-14 09:54:19.992886", "cmd": 2} {"id": 23238, "parent": 23237, "code": "// Signatures\nsig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Facts\nfact UniqueBorrow {\n // A book can only be borrowed by one borrower at a time\n all b: Book | lone b.borrowedBooks\n}\n\n// Assertions\nassert NoDuplicateBorrowing {\n // Ensures that a borrower does not borrow the same book multiple times\n all br: Borrower | no br.borrowedBooks & (br.borrowedBooks - br.borrowedBooks)\n}\n\n// Predicates\npred borrowBook(br: Borrower, b: Book) {\n // Adds a book to the borrower's borrowed books\n b in br.borrowedBooks\n}\n\n// Run and Check Statements\n\n\nrun borrowBook for 3 Book, 3 Borrower\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "dance-rants-scant-glance", "time": "2024-11-14 09:55:34.475885", "cmd": 2} {"id": 23277, "parent": 23276, "code": "sig A {}\n\npred at_least_one_a {\nsome A\n}\n\npred more_than_one_a {\n at_least_one_a and not one A\n}\n\nrun more_than_one_a", "permalink": "cling-recopy-annex-paging", "time": "2024-11-15 11:52:52.358398", "cmd": 1} {"id": 23278, "parent": 23277, "code": "// Signatures for main entities\nsig Location {\n coordinates: one Coordinates\n}\n\nsig Coordinates {\n x: one Int,\n y: one Int\n}\n\nsig Robot {\n currentLocation: one Location,\n assignedTasks: set Task,\n batteryLevel: one Int,\n status: one RobotStatus\n}\n\nsig Storage {\n location: one Location,\n items: set Item\n}\n\nsig Item {\n id: one Int,\n weight: one Int\n}\n\nsig Task {\n source: one Storage,\n destination: one Storage,\n item: one Item,\n status: one TaskStatus\n}\n\n// Enums\nenum RobotStatus { IDLE, MOVING, CHARGING, PICKING, DROPPING }\nenum TaskStatus { PENDING, IN_PROGRESS, COMPLETED, FAILED }\n\n// Facts\nfact ValidBatteryLevel {\n all r: Robot | r.batteryLevel >= 0 and r.batteryLevel <= 100\n}\n\nfact UniqueItemLocations {\n all i: Item | lone s: Storage | i in s.items\n}\n\nfact ValidTaskAssignment {\n all t: Task | one r: Robot | t in r.assignedTasks\n}\n\nfact NoOverlappingLocations {\n all disj s1, s2: Storage | s1.location != s2.location\n}\n\n// Predicates\npred assignTask[r: Robot, t: Task] {\n // Pre-conditions\n t.status = PENDING\n r.status = IDLE\n r.batteryLevel > 20\n\n // Post-conditions\n t in r.assignedTasks\n t.status = IN_PROGRESS\n}\n\npred moveRobot[r: Robot, newLoc: Location] {\n // Pre-conditions\n r.status = IDLE or r.status = MOVING\n r.batteryLevel > 10\n\n // Post-conditions\n r.currentLocation = newLoc\n r.batteryLevel = r.batteryLevel.prev - 5\n}\n\n// Assertions\nassert NoDoubleAssignment {\n all t: Task | lone r: Robot | t in r.assignedTasks\n}\n\nassert ValidBattery {\n all r: Robot | r.batteryLevel >= 0\n}\n\n// Functions\nfun getAvailableRobots: set Robot {\n {r: Robot | r.status = IDLE and r.batteryLevel > 20}\n}\n\nfun getPendingTasks: set Task {\n {t: Task | t.status = PENDING}\n}\n\n// Run statements\nrun {\n #Robot > 1\n #Task > 2\n #Storage > 2\n some r: Robot | r.status = MOVING\n} for 5\n\n// Check statements\ncheck NoDoubleAssignment for 5\ncheck ValidBattery for 5", "permalink": "number-barman-punk-catsup", "time": "2024-11-15 11:55:09.250423", "cmd": 1} {"id": 23280, "parent": null, "code": "// Signatures for main entities\nsig Location {\n coordinates: one Coordinates\n}\n\nsig Coordinates {\n x: one Int,\n y: one Int\n}\n\nsig Robot {\n currentLocation: one Location,\n assignedTasks: set Task,\n batteryLevel: one Int,\n status: one RobotStatus\n}\n\nsig Storage {\n location: one Location,\n items: set Item\n}\n\nsig Item {\n id: one Int,\n weight: one Int\n}\n\nsig Task {\n source: one Storage,\n destination: one Storage,\n item: one Item,\n status: one TaskStatus\n}\n\n// Enums\nenum RobotStatus { IDLE, MOVING, CHARGING, PICKING, DROPPING }\nenum TaskStatus { PENDING, IN_PROGRESS, COMPLETED, FAILED }\n\n// Facts\nfact ValidBatteryLevel {\n all r: Robot | r.batteryLevel >= 0 and r.batteryLevel <= 100\n}\n\nfact UniqueItemLocations {\n all i: Item | lone s: Storage | i in s.items\n}\n\nfact ValidTaskAssignment {\n all t: Task | one r: Robot | t in r.assignedTasks\n}\n\nfact NoOverlappingLocations {\n all disj s1, s2: Storage | s1.location != s2.location\n}\n\n// Predicates\npred assignTask[r: Robot, t: Task] {\n // Pre-conditions\n t.status = PENDING\n r.status = IDLE\n r.batteryLevel > 20\n\n // Post-conditions\n t in r.assignedTasks\n t.status = IN_PROGRESS\n}\n\npred moveRobot[r: Robot, newLoc: Location] {\n // Pre-conditions\n r.status = IDLE or r.status = MOVING\n r.batteryLevel > 10\n\n // Post-conditions\n r.currentLocation = newLoc\n r.batteryLevel = r.batteryLevel.prev - 5\n}\n\n// Assertions\nassert NoDoubleAssignment {\n all t: Task | lone r: Robot | t in r.assignedTasks\n}\n\nassert ValidBattery {\n all r: Robot | r.batteryLevel >= 0\n}\n\n// Functions\nfun getAvailableRobots: set Robot {\n {r: Robot | r.status = IDLE and r.batteryLevel > 20}\n}\n\nfun getPendingTasks: set Task {\n {t: Task | t.status = PENDING}\n}\n\n// Run statements\nrun {\n #Robot > 1\n #Task > 2\n #Storage > 2\n some r: Robot | r.status = MOVING\n} for 5\n\n// Check statements\ncheck NoDoubleAssignment for 5\ncheck ValidBattery for 5", "permalink": "facial-tarmac-sift-cope", "time": "2024-11-15 13:36:14.440886", "cmd": 1} {"id": 23279, "parent": 23278, "code": "// Signatures for main entities\nsig Location {\n coordinates: one Coordinates\n}\n\nsig Coordinates {\n x: one Int,\n y: one Int\n}\n\nsig Robot {\n currentLocation: one Location,\n assignedTasks: set Task,\n batteryLevel: one Int,\n status: one RobotStatus\n}\n\nsig Storage {\n location: one Location,\n items: set Item\n}\n\nsig Item {\n id: one Int,\n weight: one Int\n}\n\nsig Task {\n source: one Storage,\n destination: one Storage,\n item: one Item,\n status: one TaskStatus\n}\n\n// Enums\nenum RobotStatus { IDLE, MOVING, CHARGING, PICKING, DROPPING }\nenum TaskStatus { PENDING, IN_PROGRESS, COMPLETED, FAILED }\n\n// Facts\nfact ValidBatteryLevel {\n all r: Robot | r.batteryLevel >= 0 and r.batteryLevel <= 100\n}\n\nfact UniqueItemLocations {\n all i: Item | lone s: Storage | i in s.items\n}\n\nfact ValidTaskAssignment {\n all t: Task | one r: Robot | t in r.assignedTasks\n}\n\nfact NoOverlappingLocations {\n all disj s1, s2: Storage | s1.location != s2.location\n}\n\n// Predicates\npred assignTask[r: Robot, t: Task] {\n // Pre-conditions\n t.status = PENDING\n r.status = IDLE\n r.batteryLevel > 20\n\n // Post-conditions\n t in r.assignedTasks\n t.status = IN_PROGRESS\n}\n\npred moveRobot[r: Robot, newLoc: Location] {\n // Pre-conditions\n r.status = IDLE or r.status = MOVING\n r.batteryLevel > 10\n\n // Post-conditions\n r.currentLocation = newLoc\n r.batteryLevel = r.batteryLevel.prev - 5\n}\n\n// Assertions\nassert NoDoubleAssignment {\n all t: Task | lone r: Robot | t in r.assignedTasks\n}\n\nassert ValidBattery {\n all r: Robot | r.batteryLevel >= 0\n}\n\n// Functions\nfun getAvailableRobots: set Robot {\n {r: Robot | r.status = IDLE and r.batteryLevel > 20}\n}\n\nfun getPendingTasks: set Task {\n {t: Task | t.status = PENDING}\n}\n\n// Run statements\nrun {\n #Robot > 1\n #Task > 2\n #Storage > 2\n some r: Robot | r.status = MOVING\n} for 5\n\n// Check statements\ncheck NoDoubleAssignment for 5\ncheck ValidBattery for 5", "permalink": "pledge-aged-appear-frolic", "time": "2024-11-15 11:56:00.509627", "cmd": 1} {"id": 23281, "parent": 23280, "code": "// Single Storage System\none sig Storage {\n location: one Location,\n items: set Item\n}\n\n// Location and Coordinates\nsig Location {\n coordinates: one Coordinates\n}\n\nsig Coordinates {\n x: one Int,\n y: one Int\n}\n\n// Robots\nsig Robot {\n currentLocation: one Location,\n assignedTasks: set Task,\n batteryLevel: one Int,\n status: one RobotStatus\n}\n\n// Items\nsig Item {\n id: one Int,\n weight: one Int\n}\n\n// Tasks\nsig Task {\n pickupLocation: one Coordinates,\n dropoffLocation: one Coordinates,\n item: one Item,\n status: one TaskStatus\n}\n\n// Enums\nenum RobotStatus { IDLE, MOVING, CHARGING, PICKING, DROPPING }\nenum TaskStatus { PENDING, IN_PROGRESS, COMPLETED, FAILED }\n\n// Facts\nfact ValidBatteryLevel {\n all r: Robot | r.batteryLevel >= 0 and r.batteryLevel <= 100\n}\n\nfact UniqueItemLocations {\n all i: Item | i in Storage.items\n}\n\nfact TaskAssignment {\n all t: Task | lone r: Robot | t in r.assignedTasks\n}\n\n// Predicates\npred assignTask[r: Robot, t: Task] {\n // Pre-conditions\n t.status = PENDING\n r.status = IDLE\n r.batteryLevel > 20\n\n // Post-conditions\n t in r.assignedTasks\n t.status = IN_PROGRESS\n r.status = MOVING\n}\n\npred moveRobot[r: Robot, newLoc: Location] {\n // Pre-conditions\n r.status = MOVING\n r.batteryLevel > 10\n\n // Post-conditions\n r.currentLocation = newLoc\n r.batteryLevel = r.batteryLevel.prev - 5\n}\n\n// Assertions\nassert NoDoubleAssignment {\n all t: Task | lone r: Robot | t in r.assignedTasks\n}\n\nassert ValidBattery {\n all r: Robot | r.batteryLevel >= 0\n}\n\n// Functions\nfun getAvailableRobots: set Robot {\n {r: Robot | r.status = IDLE and r.batteryLevel > 20}\n}\n\nfun getPendingTasks: set Task {\n {t: Task | t.status = PENDING}\n}\n\n// Run and Check\nrun {\n #Robot > 1\n #Task > 2\n some r: Robot | r.status = MOVING\n} for 5\n\ncheck NoDoubleAssignment for 5\ncheck ValidBattery for 5", "permalink": "blade-ride-pencil-onset", "time": "2024-11-15 13:42:33.765941", "cmd": 1} {"id": 23282, "parent": 23279, "code": "// Single Storage System\none sig Storage {\n location: one Location,\n items: set Item\n}\n\n// Location and Coordinates\nsig Location {\n coordinates: one Coordinates\n}\n\nsig Coordinates {\n x: one Int,\n y: one Int\n}\n\n// Robots\nsig Robot {\n currentLocation: one Location,\n assignedTasks: set Task,\n batteryLevel: one Int,\n status: one RobotStatus\n}\n\n// Items\nsig Item {\n id: one Int,\n weight: one Int\n}\n\n// Tasks\nsig Task {\n pickupLocation: one Coordinates,\n dropoffLocation: one Coordinates,\n item: one Item,\n status: one TaskStatus\n}\n\n// Enums\nenum RobotStatus { IDLE, MOVING, CHARGING, PICKING, DROPPING }\nenum TaskStatus { PENDING, IN_PROGRESS, COMPLETED, FAILED }\n\n// Facts\nfact ValidBatteryLevel {\n all r: Robot | r.batteryLevel >= 0 and r.batteryLevel <= 100\n}\n\nfact UniqueItemLocations {\n all i: Item | i in Storage.items\n}\n\nfact TaskAssignment {\n all t: Task | lone r: Robot | t in r.assignedTasks\n}\n\n// Predicates\npred assignTask[r: Robot, t: Task] {\n // Pre-conditions\n t.status = PENDING\n r.status = IDLE\n r.batteryLevel > 20\n\n // Post-conditions\n t in r.assignedTasks\n t.status = IN_PROGRESS\n r.status = MOVING\n}\n\npred moveRobot[r: Robot, newLoc: Location] {\n // Pre-conditions\n r.status = MOVING\n r.batteryLevel > 10\n\n // Post-conditions\n r.currentLocation = newLoc\n r.batteryLevel = r.batteryLevel.prev - 5\n}\n\n// Assertions\nassert NoDoubleAssignment {\n all t: Task | lone r: Robot | t in r.assignedTasks\n}\n\nassert ValidBattery {\n all r: Robot | r.batteryLevel >= 0\n}\n\n// Functions\nfun getAvailableRobots: set Robot {\n {r: Robot | r.status = IDLE and r.batteryLevel > 20}\n}\n\nfun getPendingTasks: set Task {\n {t: Task | t.status = PENDING}\n}\n\n// Run and Check\nrun {\n #Robot > 1\n #Task > 2\n some r: Robot | r.status = MOVING\n} for 5\n\ncheck NoDoubleAssignment for 5\ncheck ValidBattery for 5", "permalink": "visa-ream-herald-trump", "time": "2024-11-15 13:42:48.542094", "cmd": 1} {"id": 23283, "parent": 23282, "code": "// Single Storage System\none sig Storage {\n location: one Location,\n items: set Item\n}\n\n// Location and Coordinates\nsig Location {\n coordinates: one Coordinates\n}\n\nsig Coordinates {\n x: one Int,\n y: one Int\n}\n\n// Robots\nsig Robot {\n currentLocation: one Location,\n assignedTasks: set Task,\n status: one RobotStatus\n}\n\n// Items\nsig Item {\n id: one Int,\n weight: one Int\n}\n\n// Tasks\nsig Task {\n pickupLocation: one Coordinates,\n dropoffLocation: one Coordinates,\n item: one Item,\n status: one TaskStatus\n}\n\n// Enums\nenum RobotStatus { IDLE, MOVING, CHARGING, PICKING, DROPPING }\nenum TaskStatus { PENDING, IN_PROGRESS, COMPLETED, FAILED }\n\n// Facts\nfact UniqueItemLocations {\n all i: Item | lone s: Storage | i in s.items\n}\n\nfact ValidTaskAssignment {\n all t: Task | one r: Robot | t in r.assignedTasks\n}\n\nfact NoOverlappingLocations {\n all disj r1, r2: Robot | r1.currentLocation != r2.currentLocation\n}\n\n// Predicates\npred assignTask[r: Robot, t: Task] {\n // Pre-conditions\n t.status = PENDING\n r.status = IDLE\n\n // Post-conditions\n t in r.assignedTasks\n t.status = IN_PROGRESS\n r.status = MOVING\n}\n\npred moveRobot[r: Robot, newLoc: Location] {\n // Pre-conditions\n r.status = IDLE or r.status = MOVING\n\n // Post-conditions\n r.currentLocation = newLoc\n}\n\n// Assertions\nassert NoDoubleAssignment {\n all t: Task | lone r: Robot | t in r.assignedTasks\n}\n\nassert UniqueTaskAssignment {\n all t: Task | #t.assignedTasks <= 1\n}\n\n// Functions\nfun getAvailableRobots: set Robot {\n {r: Robot | r.status = IDLE}\n}\n\nfun getPendingTasks: set Task {\n {t: Task | t.status = PENDING}\n}\n\n// Run statements\nrun {\n #Robot > 1\n #Task > 2\n some r: Robot | r.status = MOVING\n} for 5\n\n// Check statements\ncheck NoDoubleAssignment for 5\ncheck UniqueTaskAssignment for 5", "permalink": "rework-ladder-hasty-casing", "time": "2024-11-15 13:44:55.332070", "cmd": 1} {"id": 23284, "parent": 23281, "code": "// Single Storage System\none sig Storage {\n location: one Location,\n items: set Item\n}\n\n// Location and Coordinates\nsig Location {\n coordinates: one Coordinates\n}\n\nsig Coordinates {\n x: one Int,\n y: one Int\n}\n\n// Robots\nsig Robot {\n currentLocation: one Location,\n assignedTasks: set Task,\n status: one RobotStatus\n}\n\n// Items\nsig Item {\n id: one Int,\n weight: one Int\n}\n\n// Tasks\nsig Task {\n pickupLocation: one Coordinates,\n dropoffLocation: one Coordinates,\n item: one Item,\n status: one TaskStatus\n}\n\n// Enums\nenum RobotStatus { IDLE, MOVING, CHARGING, PICKING, DROPPING }\nenum TaskStatus { PENDING, IN_PROGRESS, COMPLETED, FAILED }\n\n// Facts\nfact UniqueItemLocations {\n all i: Item | lone s: Storage | i in s.items\n}\n\nfact ValidTaskAssignment {\n all t: Task | one r: Robot | t in r.assignedTasks\n}\n\nfact NoOverlappingLocations {\n all disj r1, r2: Robot | r1.currentLocation != r2.currentLocation\n}\n\n// Predicates\npred assignTask[r: Robot, t: Task] {\n // Pre-conditions\n t.status = PENDING\n r.status = IDLE\n\n // Post-conditions\n t in r.assignedTasks\n t.status = IN_PROGRESS\n r.status = MOVING\n}\n\npred moveRobot[r: Robot, newLoc: Location] {\n // Pre-conditions\n r.status = IDLE or r.status = MOVING\n\n // Post-conditions\n r.currentLocation = newLoc\n}\n\n// Assertions\nassert NoDoubleAssignment {\n all t: Task | lone r: Robot | t in r.assignedTasks\n}\n\nassert UniqueTaskAssignment {\n all t: Task | #t.assignedTasks <= 1\n}\n\n// Functions\nfun getAvailableRobots: set Robot {\n {r: Robot | r.status = IDLE}\n}\n\nfun getPendingTasks: set Task {\n {t: Task | t.status = PENDING}\n}\n\n// Run statements\nrun {\n #Robot > 1\n #Task > 2\n some r: Robot | r.status = MOVING\n} for 5\n\n// Check statements\ncheck NoDoubleAssignment for 5\ncheck UniqueTaskAssignment for 5", "permalink": "dense-dorsal-simply-stole", "time": "2024-11-15 13:45:21.942868", "cmd": 1} {"id": 23297, "parent": 23296, "code": "// Single Storage System\none sig Storage {\n location: one Location,\n items: set Item\n}\n\n// Location and Coordinates\nsig Location {\n coordinates: one Coordinates\n}\n\nsig Coordinates {\n x: one Int,\n y: one Int\n}\n\n// Robots\nsig Robot {\n currentLocation: one Location,\n assignedTasks: set Task,\n status: one RobotStatus\n}\n\n// Items\nsig Item {\n id: one Int,\n weight: one Int\n}\n\n// Tasks\nsig Task {\n pickupLocation: one Coordinates,\n dropoffLocation: one Coordinates,\n item: one Item,\n status: one TaskStatus\n}\n\n// Enums\nenum RobotStatus { IDLE, MOVING, CHARGING, PICKING, DROPPING }\nenum TaskStatus { PENDING, IN_PROGRESS, COMPLETED, FAILED }\n\n// Facts\nfact UniqueItemLocations {\n all i: Item | lone s: Storage | i in s.items\n}\n\nfact ValidTaskAssignment {\n all t: Task | one r: Robot | t in r.assignedTasks\n}\n\nfact NoOverlappingLocations {\n all disj r1, r2: Robot | r1.currentLocation != r2.currentLocation\n}\n\n// Predicates\npred assignTask[r: Robot, t: Task] {\n // Pre-conditions\n t.status = PENDING\n r.status = IDLE\n\n // Post-conditions\n t in r.assignedTasks\n t.status = IN_PROGRESS\n r.status = MOVING\n}\n\npred moveRobot[r: Robot, newLoc: Location] {\n // Pre-conditions\n r.status = IDLE or r.status = MOVING\n\n // Post-conditions\n r.currentLocation = newLoc\n}\n\n// Assertions\nassert NoDoubleAssignment {\n all t: Task | lone r: Robot | t in r.assignedTasks\n}\n\nassert UniqueTaskAssignment {\n all t: Task | #t.assignedTasks <= 1\n}\n\n// Functions\nfun getAvailableRobots: set Robot {\n {r: Robot | r.status = IDLE}\n}\n\nfun getPendingTasks: set Task {\n {t: Task | t.status = PENDING}\n}\n\n// Run statements\nrun {\n #Robot > 1\n #Task > 2\n some r: Robot | r.status = MOVING\n} for 5\n\n// Check statements\ncheck NoDoubleAssignment for 5\ncheck UniqueTaskAssignment for 5", "permalink": "liking-cling-fervor-museum", "time": "2024-11-15 14:37:17.298005", "cmd": 1} {"id": 23296, "parent": 23295, "code": "// Single Storage System\none sig Storage {\n location: one Location,\n items: set Item\n}\n\n// Location and Coordinates\nsig Location {\n coordinates: one Coordinates\n}\n\nsig Coordinates {\n x: one Int,\n y: one Int\n}\n\n// Robots\nsig Robot {\n currentLocation: one Location,\n assignedTasks: set Task,\n status: one RobotStatus\n}\n\n// Items\nsig Item {\n id: one Int,\n weight: one Int\n}\n\n// Tasks\nsig Task {\n pickupLocation: one Coordinates,\n dropoffLocation: one Coordinates,\n item: one Item,\n status: one TaskStatus\n}\n\n// Enums\nenum RobotStatus { IDLE, MOVING, CHARGING, PICKING, DROPPING }\nenum TaskStatus { PENDING, IN_PROGRESS, COMPLETED, FAILED }\n\n// Facts\nfact UniqueItemLocations {\n all i: Item | lone s: Storage | i in s.items\n}\n\nfact ValidTaskAssignment {\n all t: Task | one r: Robot | t in r.assignedTasks\n}\n\nfact NoOverlappingLocations {\n all disj r1, r2: Robot | r1.currentLocation != r2.currentLocation\n}\n\n// Predicates\npred assignTask[r: Robot, t: Task] {\n // Pre-conditions\n t.status = PENDING\n r.status = IDLE\n\n // Post-conditions\n t in r.assignedTasks\n t.status = IN_PROGRESS\n r.status = MOVING\n}\n\npred moveRobot[r: Robot, newLoc: Location] {\n // Pre-conditions\n r.status = IDLE or r.status = MOVING\n\n // Post-conditions\n r.currentLocation = newLoc\n}\n\n// Assertions\nassert NoDoubleAssignment {\n all t: Task | lone r: Robot | t in r.assignedTasks\n}\n\nassert UniqueTaskAssignment {\n all t: Task | #t.assignedTasks <= 1\n}\n\n// Functions\nfun getAvailableRobots: set Robot {\n {r: Robot | r.status = IDLE}\n}\n\nfun getPendingTasks: set Task {\n {t: Task | t.status = PENDING}\n}\n\n// Run statements\nrun {\n #Robot > 1\n #Task > 2\n some r: Robot | r.status = MOVING\n} for 5\n\n// Check statements\ncheck NoDoubleAssignment for 5\ncheck UniqueTaskAssignment for 5", "permalink": "crafty-scouts-clutch-pushy", "time": "2024-11-15 14:31:23.692060", "cmd": 1} {"id": 23285, "parent": 23284, "code": "// Single Storage System\none sig Storage {\n location: one Location,\n items: set Item\n}\n\n// Location and Coordinates\nsig Location {\n coordinates: one Coordinates\n}\n\nsig Coordinates {\n x: one Int,\n y: one Int\n}\n\n// Robots\nsig Robot {\n currentLocation: one Location,\n assignedTasks: set Task,\n status: one RobotStatus\n}\n\n// Items\nsig Item {\n id: one Int,\n weight: one Int\n}\n\n// Tasks\nsig Task {\n pickupLocation: one Coordinates,\n dropoffLocation: one Coordinates,\n item: one Item,\n status: one TaskStatus\n}\n\n// Enums\nenum RobotStatus { IDLE, MOVING, PICKING, DROPPING }\nenum TaskStatus { PENDING, IN_PROGRESS, COMPLETED, FAILED }\n\n// Facts\nfact UniqueItemLocations {\n all i: Item | lone s: Storage | i in s.items\n}\n\nfact ValidTaskAssignment {\n all t: Task | one r: Robot | t in r.assignedTasks\n}\n\nfact NoOverlappingLocations {\n all disj r1, r2: Robot | r1.currentLocation != r2.currentLocation\n}\n\n// Predicates\npred assignTask[r: Robot, t: Task] {\n // Pre-conditions\n t.status = PENDING\n r.status = IDLE\n\n // Post-conditions\n t in r.assignedTasks\n t.status = IN_PROGRESS\n r.status = MOVING\n}\n\npred moveRobot[r: Robot, newLoc: Location] {\n // Pre-conditions\n r.status = IDLE or r.status = MOVING\n\n // Post-conditions\n r.currentLocation = newLoc\n}\n\n// Assertions\nassert NoDoubleAssignment {\n all t: Task | lone r: Robot | t in r.assignedTasks\n}\n\nassert UniqueTaskAssignment {\n all t: Task | #t.assignedTasks <= 1\n}\n\n// Functions\nfun getAvailableRobots: set Robot {\n {r: Robot | r.status = IDLE}\n}\n\nfun getPendingTasks: set Task {\n {t: Task | t.status = PENDING}\n}\n\n// Run statements\nrun {\n #Robot > 1\n #Task > 2\n some r: Robot | r.status = MOVING\n} for 5\n\n// Check statements\ncheck NoDoubleAssignment for 5\ncheck UniqueTaskAssignment for 5", "permalink": "saloon-easily-pox-jovial", "time": "2024-11-15 13:48:59.634389", "cmd": 1} {"id": 23286, "parent": 23285, "code": "// Signatures\n\nsig Location {\n coordinates: one Coordinates // Represents the location's coordinates in the warehouse\n}\n\nsig Coordinates {\n x: one Int,\n y: one Int\n}\n\nsig Item {\n id: one Int, // Unique identifier for the item\n weight: one Int // Weight of the item\n}\n\nsig Robot {\n currentLocation: one Location, // Current location of the robot\n task: one TaskType, // Current task assigned to the robot\n assignedItem: lone Item // Item assigned to the robot for the current task\n}\n\nenum TaskType { IDLE, PickUp, Transport, Restock, Completed }\n\n// Facts\n\nfact ValidTasks {\n all r: Robot | \n (r.task = PickUp implies some r.assignedItem and some r.currentLocation) \n and \n (r.task = Restock implies some r.assignedItem and some r.currentLocation) \n and \n (r.task = Transport implies some r.assignedItem)\n}\n\nfact UniqueItems {\n all i: Item | lone r: Robot | i = r.assignedItem // Each item is assigned to at most one robot\n}\n\nfact ValidLocations {\n all r: Robot | some r.currentLocation // Every robot must have a current location\n}\n\nfact ValidCoordinates {\n all l: Location | l.coordinates.x >= 0 and l.coordinates.y >= 0 // Coordinates must be non-negative\n}\n\nfact UniqueCoodinates {\n all l: Location | lone c: Coordinates | l = c.x not c.y\n}\n\n// Assertions\n\nassert TaskWorkflowCorrectness {\n all r: Robot | \n (r.task = PickUp implies r.assignedItem in some Item and r.currentLocation in some Location) \n and \n (r.task = Transport implies r.assignedItem in some Item)\n}\n\nassert UniqueItemAssignment {\n all i: Item | lone r: Robot | i = r.assignedItem // No item is handled by multiple robots simultaneously\n}\n\nassert NoNegativeWeights {\n all i: Item | i.weight >= 0 // Item weights cannot be negative\n}\n\n// Predicates\n\npred assignTask[r: Robot, i: Item, t: TaskType, loc: Location] {\n r.task = t\n r.assignedItem = i\n r.currentLocation = loc\n}\n\npred moveRobot[r: Robot, newLoc: Location] {\n // Precondition\n r.task = Transport or r.task = PickUp or r.task = Restock\n\n // Postcondition\n r.currentLocation = newLoc\n}\n\n// Functions\n\nfun totalItemsInWarehouse: Int {\n #Item\n}\n\nfun totalRobotsInSystem: Int {\n #Robot\n}\n\n// Run Statements\n\nrun {\n some r: Robot, i: Item, l: Location | assignTask[r, i, PickUp, l]\n} for 5\n\nrun {\n some r: Robot, l: Location | moveRobot[r, l]\n} for 5\n\n// Check Statements\n\ncheck TaskWorkflowCorrectness for 5\ncheck UniqueItemAssignment for 5\ncheck NoNegativeWeights for 5", "permalink": "flop-gargle-deluxe-friday", "time": "2024-11-15 14:12:56.333031", "cmd": 1} {"id": 23290, "parent": 23289, "code": "// Signatures\n\nsig Location {\n coordinates: one Coordinates // Represents the location's coordinates in the warehouse\n}\n\nsig Coordinates {\n x: one Int,\n y: one Int\n}\n\nsig Item {\n id: one Int, // Unique identifier for the item\n weight: one Int // Weight of the item\n}\n\nsig Robot {\n currentLocation: one Location, // Current location of the robot\n task: one TaskType, // Current task assigned to the robot\n assignedItem: lone Item // Item assigned to the robot for the current task\n}\n\nenum TaskType { IDLE, PickUp, Transport, Restock, Completed }\n\n// Facts\n\nfact ValidTasks {\n all r: Robot | \n (r.task = PickUp implies some r.assignedItem and some r.currentLocation) \n and \n (r.task = Restock implies some r.assignedItem and some r.currentLocation) \n and \n (r.task = Transport implies some r.assignedItem)\n}\n\nfact UniqueItems {\n all i: Item | lone r: Robot | i = r.assignedItem // Each item is assigned to at most one robot\n}\n\nfact ValidLocations {\n all r: Robot | some r.currentLocation // Every robot must have a current location\n}\n\nfact ValidCoordinates {\n all l: Location | l.coordinates.x >= 0 and l.coordinates.y >= 0 // Coordinates must be non-negative\n}\n\nfact UniqueCoordinates { // Fixed typo in name\n // Each coordinate pair should be unique for locations\n all disj l1, l2: Location | \n l1.coordinates != l2.coordinates\n}\n\n// Assertions\n\nassert TaskWorkflowCorrectness {\n all r: Robot | \n (r.task = PickUp implies r.assignedItem in some Item and r.currentLocation in some Location) \n and \n (r.task = Transport implies r.assignedItem in some Item)\n}\n\nassert UniqueItemAssignment {\n all i: Item | lone r: Robot | i = r.assignedItem // No item is handled by multiple robots simultaneously\n}\n\nassert NoNegativeWeights {\n all i: Item | i.weight >= 0 // Item weights cannot be negative\n}\n\n// Predicates\n\npred assignTask[r: Robot, i: Item, t: TaskType, loc: Location] {\n r.task = t\n r.assignedItem = i\n r.currentLocation = loc\n}\n\npred moveRobot[r: Robot, newLoc: Location] {\n // Precondition\n r.task = Transport or r.task = PickUp or r.task = Restock\n\n // Postcondition\n r.currentLocation = newLoc\n}\n\n// Functions\n\nfun totalItemsInWarehouse: Int {\n #Item\n}\n\nfun totalRobotsInSystem: Int {\n #Robot\n}\n\n// Run Statements\n\nrun {\n some r: Robot, i: Item, l: Location | assignTask[r, i, PickUp, l]\n} for 5\n\nrun {\n some r: Robot, l: Location | moveRobot[r, l]\n} for 5\n\n// Check Statements\n\ncheck TaskWorkflowCorrectness for 5\ncheck UniqueItemAssignment for 5\ncheck NoNegativeWeights for 5", "permalink": "perm-pebble-wool-aspire", "time": "2024-11-15 14:14:20.396468", "cmd": 1} {"id": 23288, "parent": 23287, "code": "// Signatures\n\nsig Location {\n coordinates: one Coordinates // Represents the location's coordinates in the warehouse\n}\n\nsig Coordinates {\n x: one Int,\n y: one Int\n}\n\nsig Item {\n id: one Int, // Unique identifier for the item\n weight: one Int // Weight of the item\n}\n\nsig Robot {\n currentLocation: one Location, // Current location of the robot\n task: one TaskType, // Current task assigned to the robot\n assignedItem: lone Item // Item assigned to the robot for the current task\n}\n\nenum TaskType { IDLE, PickUp, Transport, Restock, Completed }\n\n// Facts\n\nfact ValidTasks {\n all r: Robot | \n (r.task = PickUp implies some r.assignedItem and some r.currentLocation) \n and \n (r.task = Restock implies some r.assignedItem and some r.currentLocation) \n and \n (r.task = Transport implies some r.assignedItem)\n}\n\nfact UniqueItems {\n all i: Item | lone r: Robot | i = r.assignedItem // Each item is assigned to at most one robot\n}\n\nfact ValidLocations {\n all r: Robot | some r.currentLocation // Every robot must have a current location\n}\n\nfact ValidCoordinates {\n all l: Location | l.coordinates.x >= 0 and l.coordinates.y >= 0 // Coordinates must be non-negative\n}\n\nfact UniqueCoordinates { // Fixed typo in name\n // Each coordinate pair should be unique for locations\n all disj l1, l2: Location | \n l1.coordinates != l2.coordinates\n}\n\n// Assertions\n\nassert TaskWorkflowCorrectness {\n all r: Robot | \n (r.task = PickUp implies r.assignedItem in some Item and r.currentLocation in some Location) \n and \n (r.task = Transport implies r.assignedItem in some Item)\n}\n\nassert UniqueItemAssignment {\n all i: Item | lone r: Robot | i = r.assignedItem // No item is handled by multiple robots simultaneously\n}\n\nassert NoNegativeWeights {\n all i: Item | i.weight >= 0 // Item weights cannot be negative\n}\n\n// Predicates\n\npred assignTask[r: Robot, i: Item, t: TaskType, loc: Location] {\n r.task = t\n r.assignedItem = i\n r.currentLocation = loc\n}\n\npred moveRobot[r: Robot, newLoc: Location] {\n // Precondition\n r.task = Transport or r.task = PickUp or r.task = Restock\n\n // Postcondition\n r.currentLocation = newLoc\n}\n\n// Functions\n\nfun totalItemsInWarehouse: Int {\n #Item\n}\n\nfun totalRobotsInSystem: Int {\n #Robot\n}\n\n// Run Statements\n\nrun {\n some r: Robot, i: Item, l: Location | assignTask[r, i, PickUp, l]\n} for 5\n\nrun {\n some r: Robot, l: Location | moveRobot[r, l]\n} for 5\n\n// Check Statements\n\ncheck TaskWorkflowCorrectness for 5\ncheck UniqueItemAssignment for 5\ncheck NoNegativeWeights for 5", "permalink": "backed-reply-ride-tanned", "time": "2024-11-15 14:13:53.362180", "cmd": 1} {"id": 23287, "parent": 23286, "code": "// Signatures\n\nsig Location {\n coordinates: one Coordinates // Represents the location's coordinates in the warehouse\n}\n\nsig Coordinates {\n x: one Int,\n y: one Int\n}\n\nsig Item {\n id: one Int, // Unique identifier for the item\n weight: one Int // Weight of the item\n}\n\nsig Robot {\n currentLocation: one Location, // Current location of the robot\n task: one TaskType, // Current task assigned to the robot\n assignedItem: lone Item // Item assigned to the robot for the current task\n}\n\nenum TaskType { IDLE, PickUp, Transport, Restock, Completed }\n\n// Facts\n\nfact ValidTasks {\n all r: Robot | \n (r.task = PickUp implies some r.assignedItem and some r.currentLocation) \n and \n (r.task = Restock implies some r.assignedItem and some r.currentLocation) \n and \n (r.task = Transport implies some r.assignedItem)\n}\n\nfact UniqueItems {\n all i: Item | lone r: Robot | i = r.assignedItem // Each item is assigned to at most one robot\n}\n\nfact ValidLocations {\n all r: Robot | some r.currentLocation // Every robot must have a current location\n}\n\nfact ValidCoordinates {\n all l: Location | l.coordinates.x >= 0 and l.coordinates.y >= 0 // Coordinates must be non-negative\n}\n\nfact UniqueCoordinates { // Fixed typo in name\n // Each coordinate pair should be unique for locations\n all disj l1, l2: Location | \n l1.coordinates != l2.coordinates\n}\n\n// Assertions\n\nassert TaskWorkflowCorrectness {\n all r: Robot | \n (r.task = PickUp implies r.assignedItem in some Item and r.currentLocation in some Location) \n and \n (r.task = Transport implies r.assignedItem in some Item)\n}\n\nassert UniqueItemAssignment {\n all i: Item | lone r: Robot | i = r.assignedItem // No item is handled by multiple robots simultaneously\n}\n\nassert NoNegativeWeights {\n all i: Item | i.weight >= 0 // Item weights cannot be negative\n}\n\n// Predicates\n\npred assignTask[r: Robot, i: Item, t: TaskType, loc: Location] {\n r.task = t\n r.assignedItem = i\n r.currentLocation = loc\n}\n\npred moveRobot[r: Robot, newLoc: Location] {\n // Precondition\n r.task = Transport or r.task = PickUp or r.task = Restock\n\n // Postcondition\n r.currentLocation = newLoc\n}\n\n// Functions\n\nfun totalItemsInWarehouse: Int {\n #Item\n}\n\nfun totalRobotsInSystem: Int {\n #Robot\n}\n\n// Run Statements\n\nrun {\n some r: Robot, i: Item, l: Location | assignTask[r, i, PickUp, l]\n} for 5\n\nrun {\n some r: Robot, l: Location | moveRobot[r, l]\n} for 5\n\n// Check Statements\n\ncheck TaskWorkflowCorrectness for 5\ncheck UniqueItemAssignment for 5\ncheck NoNegativeWeights for 5", "permalink": "disk-earthy-talon-feed", "time": "2024-11-15 14:13:46.860243", "cmd": 1} {"id": 23291, "parent": 23290, "code": "// Signatures\nsig Location {\n coordinates: one Coordinates // Represents the location's coordinates in the warehouse\n}\n\nsig Coordinates {\n x: one Int,\n y: one Int\n}\n\nsig Item {\n id: one Int, // Unique identifier for the item\n weight: one Int // Weight of the item\n}\n\nsig Robot {\n currentLocation: one Location, // Current location of the robot\n task: one TaskType, // Current task assigned to the robot\n assignedItem: lone Item // Item assigned to the robot for the current task\n}\n\nenum TaskType { IDLE, PickUp, Transport, Restock, Completed }\n\n// Facts\nfact ValidTasks {\n all r: Robot | {\n (r.task = IDLE implies no r.assignedItem) and\n (r.task = PickUp implies (some r.assignedItem and some r.currentLocation)) and\n (r.task = Transport implies some r.assignedItem) and\n (r.task = Restock implies (some r.assignedItem and some r.currentLocation)) and\n (r.task = Completed implies no r.assignedItem)\n }\n}\n\nfact UniqueItems {\n all i: Item | lone r: Robot | i = r.assignedItem // Each item is assigned to at most one robot\n}\n\nfact ValidLocations {\n all r: Robot | some r.currentLocation // Every robot must have a current location\n}\n\nfact ValidCoordinates {\n all l: Location | l.coordinates.x >= 0 and l.coordinates.y >= 0 // Coordinates must be non-negative\n}\n\nfact UniqueCoordinates {\n // Each coordinate pair should be unique for locations\n all disj l1, l2: Location | \n (l1.coordinates.x != l2.coordinates.x) or (l1.coordinates.y != l2.coordinates.y)\n}\n\n// Assertions\nassert TaskWorkflowCorrectness {\n all r: Robot | \n (r.task = PickUp implies r.assignedItem in Item and r.currentLocation in Location) \n and \n (r.task = Transport implies r.assignedItem in Item)\n}\n\nassert UniqueItemAssignment {\n all i: Item | lone r: Robot | i = r.assignedItem // No item is handled by multiple robots simultaneously\n}\n\nassert NoNegativeWeights {\n all i: Item | i.weight >= 0 // Item weights cannot be negative\n}\n\n// Predicates\npred assignTask[r: Robot, i: Item, t: TaskType, loc: Location] {\n r.task = t\n r.assignedItem = i\n r.currentLocation = loc\n}\n\npred moveRobot[r: Robot, newLoc: Location] {\n // Precondition\n r.task = Transport or r.task = PickUp or r.task = Restock\n\n // Postcondition\n r.currentLocation = newLoc\n}\n\n// Functions\nfun totalItemsInWarehouse: Int {\n #Item\n}\n\nfun totalRobotsInSystem: Int {\n #Robot\n}\n\n// Run Statements\nrun {\n some r: Robot, i: Item, l: Location | assignTask[r, i, PickUp, l]\n} for 5\n\nrun {\n some r: Robot, l: Location | moveRobot[r, l]\n} for 5\n\n// Check Statements\ncheck TaskWorkflowCorrectness for 5\ncheck UniqueItemAssignment for 5\ncheck NoNegativeWeights for 5", "permalink": "bunt-humbly-virus-omit", "time": "2024-11-15 14:18:00.179603", "cmd": 1} {"id": 23292, "parent": 23291, "code": "// Signatures\nsig Location {\n coordinates: one Coordinates // Represents the location's coordinates in the warehouse\n}\n\nsig Coordinates {\n x: one Int,\n y: one Int\n}\n\nsig Item {\n id: one Int, // Unique identifier for the item\n weight: one Int // Weight of the item\n}\n\nsig Robot {\n currentLocation: one Location, // Current location of the robot\n task: one TaskType, // Current task assigned to the robot\n assignedItem: lone Item // Item assigned to the robot for the current task\n}\n\nenum TaskType { IDLE, PickUp, Transport, Restock, Completed }\n\n// Facts\nfact ValidTasks {\n all r: Robot | {\n (r.task = IDLE implies no r.assignedItem) and\n (r.task = PickUp implies (some r.assignedItem and some r.currentLocation)) and\n (r.task = Transport implies some r.assignedItem) and\n (r.task = Restock implies (some r.assignedItem and some r.currentLocation)) and\n (r.task = Completed implies no r.assignedItem)\n }\n}\n\nfact UniqueItems {\n all i: Item | lone r: Robot | i = r.assignedItem // Each item is assigned to at most one robot\n}\n\nfact ValidLocations {\n all r: Robot | some r.currentLocation // Every robot must have a current location\n}\n\nfact CoordinateBounds {\n // Ensure all coordinates are within valid bounds (0 to 10 for example)\n all c: Coordinates | {\n c.x >= 0\n c.x <= 10 // You can adjust this upper bound as needed\n c.y >= 0\n c.y <= 10 // You can adjust this upper bound as needed\n }\n}\n\nfact UniqueCoordinates {\n // Each coordinate pair should be unique for locations\n all disj l1, l2: Location | \n (l1.coordinates.x != l2.coordinates.x) or (l1.coordinates.y != l2.coordinates.y)\n}\n\n// Assertions\nassert TaskWorkflowCorrectness {\n all r: Robot | \n (r.task = PickUp implies r.assignedItem in Item and r.currentLocation in Location) \n and \n (r.task = Transport implies r.assignedItem in Item)\n}\n\nassert UniqueItemAssignment {\n all i: Item | lone r: Robot | i = r.assignedItem // No item is handled by multiple robots simultaneously\n}\n\nassert NoNegativeWeights {\n all i: Item | i.weight >= 0 // Item weights cannot be negative\n}\n\n// Predicates\npred assignTask[r: Robot, i: Item, t: TaskType, loc: Location] {\n r.task = t\n r.assignedItem = i\n r.currentLocation = loc\n}\n\npred moveRobot[r: Robot, newLoc: Location] {\n // Precondition\n r.task = Transport or r.task = PickUp or r.task = Restock\n\n // Postcondition\n r.currentLocation = newLoc\n}\n\n// Functions\nfun totalItemsInWarehouse: Int {\n #Item\n}\n\nfun totalRobotsInSystem: Int {\n #Robot\n}\n\n// Run Statements\nrun {\n some r: Robot, i: Item, l: Location | assignTask[r, i, PickUp, l]\n} for 5\n\nrun {\n some r: Robot, l: Location | moveRobot[r, l]\n} for 5\n\n// Check Statements\ncheck TaskWorkflowCorrectness for 5\ncheck UniqueItemAssignment for 5\ncheck NoNegativeWeights for 5", "permalink": "anemia-tiring-shabby-yearly", "time": "2024-11-15 14:19:59.181770", "cmd": 1} {"id": 23293, "parent": 23292, "code": "// Signatures\nsig Location {\n coordinates: one Coordinates // Represents the location's coordinates in the warehouse\n}\n\nsig Coordinates {\n x: one Int,\n y: one Int\n}\n\nsig Item {\n id: one Int, // Unique identifier for the item\n weight: one Int // Weight of the item\n}\n\nsig Robot {\n currentLocation: one Location, // Current location of the robot\n task: one TaskType, // Current task assigned to the robot\n assignedItem: lone Item // Item assigned to the robot for the current task\n}\n\nenum TaskType { IDLE, PickUp, Transport, Restock, Completed }\n\n// Facts\nfact ValidTasks {\n all r: Robot | {\n (r.task = IDLE implies no r.assignedItem) and\n (r.task = PickUp implies (some r.assignedItem and some r.currentLocation)) and\n (r.task = Transport implies some r.assignedItem) and\n (r.task = Restock implies (some r.assignedItem and some r.currentLocation)) and\n (r.task = Completed implies no r.assignedItem)\n }\n}\n\nfact UniqueItems {\n all i: Item | lone r: Robot | i = r.assignedItem // Each item is assigned to at most one robot\n}\n\nfact ValidLocations {\n all r: Robot | some r.currentLocation // Every robot must have a current location\n}\n\nfact CoordinateBounds {\n // Ensure all coordinates are within valid bounds (0 to 10 for example)\n all c: Coordinates | {\n c.x >= 0\n c.x <= 10 // You can adjust this upper bound as needed\n c.y >= 0\n c.y <= 10 // You can adjust this upper bound as needed\n }\n}\n\nfact UniqueCoordinates {\n // Each coordinate pair should be unique for locations\n all disj l1, l2: Location | \n (l1.coordinates.x != l2.coordinates.x) or (l1.coordinates.y != l2.coordinates.y)\n}\n\n// Assertions\nassert TaskWorkflowCorrectness {\n all r: Robot | \n (r.task = PickUp implies r.assignedItem in Item and r.currentLocation in Location) \n and \n (r.task = Transport implies r.assignedItem in Item)\n}\n\nassert UniqueItemAssignment {\n all i: Item | lone r: Robot | i = r.assignedItem // No item is handled by multiple robots simultaneously\n}\n\nassert NoNegativeWeights {\n all i: Item | i.weight >= 0 // Item weights cannot be negative\n}\n\n// Predicates\npred assignTask[r: Robot, i: Item, t: TaskType, loc: Location] {\n r.task = t\n r.assignedItem = i\n r.currentLocation = loc\n}\n\npred moveRobot[r: Robot, newLoc: Location] {\n // Precondition\n r.task = Transport or r.task = PickUp or r.task = Restock\n\n // Postcondition\n r.currentLocation = newLoc\n}\n\n// Functions\nfun totalItemsInWarehouse: Int {\n #Item\n}\n\nfun totalRobotsInSystem: Int {\n #Robot\n}\n\n// Run Statements\nrun {\n some r: Robot, i: Item, l: Location | assignTask[r, i, PickUp, l]\n} for 5\n\nrun {\n some r: Robot, l: Location | moveRobot[r, l]\n} for 5\n\n// Check Statements\ncheck TaskWorkflowCorrectness for 5\ncheck UniqueItemAssignment for 5\ncheck NoNegativeWeights for 5", "permalink": "thrill-feast-shrine-decade", "time": "2024-11-15 14:20:04.245952", "cmd": 1} {"id": 23294, "parent": 23293, "code": "// Signatures\nsig Location {\n coordinates: one Coordinates // Represents the location's coordinates in the warehouse\n}\n\nsig Coordinates {\n x: one Int,\n y: one Int\n}\n\nsig Item {\n id: one Int, // Unique identifier for the item\n weight: one Int // Weight of the item\n}\n\nsig Robot {\n currentLocation: one Location, // Current location of the robot\n task: one TaskType, // Current task assigned to the robot\n assignedItem: lone Item // Item assigned to the robot for the current task\n}\n\nenum TaskType { IDLE, PickUp, Transport, Restock, Completed }\n\n// Facts\nfact ValidTasks {\n all r: Robot | {\n (r.task = IDLE implies no r.assignedItem) and\n (r.task = PickUp implies (some r.assignedItem and some r.currentLocation)) and\n (r.task = Transport implies some r.assignedItem) and\n (r.task = Restock implies (some r.assignedItem and some r.currentLocation)) and\n (r.task = Completed implies no r.assignedItem)\n }\n}\n\nfact UniqueItems {\n all i: Item | lone r: Robot | i = r.assignedItem // Each item is assigned to at most one robot\n}\n\nfact ValidLocations {\n all r: Robot | some r.currentLocation // Every robot must have a current location\n}\n\nfact CoordinateBounds {\n // Ensure all coordinates are non-negative and within reasonable bounds\n all c: Coordinates | {\n c.x >= 0\n c.x <= 3\n c.y >= 0\n c.y <= 3\n }\n}\n\nfact UniqueCoordinates {\n // Each coordinate pair should be unique for locations\n all disj l1, l2: Location | \n (l1.coordinates.x != l2.coordinates.x) or (l1.coordinates.y != l2.coordinates.y)\n}\n\nfact MinimumInstances {\n #Robot >= 1 // At least one robot\n #Location >= 2 // At least two locations\n #Item >= 1 // At least one item\n all i: Item | i.weight >= 0 // Non-negative weights\n all i: Item | i.id >= 0 // Non-negative IDs\n}\n\nfact UniqueItemIds {\n // Ensure item IDs are unique\n all disj i1, i2: Item | i1.id != i2.id\n}\n\n// Assertions\nassert TaskWorkflowCorrectness {\n all r: Robot | \n (r.task = PickUp implies r.assignedItem in Item and r.currentLocation in Location) \n and \n (r.task = Transport implies r.assignedItem in Item)\n}\n\nassert UniqueItemAssignment {\n all i: Item | lone r: Robot | i = r.assignedItem\n}\n\nassert NoNegativeWeights {\n all i: Item | i.weight >= 0\n}\n\n// Predicates\npred assignTask[r: Robot, i: Item, t: TaskType, loc: Location] {\n r.task = t\n r.assignedItem = i\n r.currentLocation = loc\n}\n\npred moveRobot[r: Robot, newLoc: Location] {\n // Precondition\n r.task = Transport or r.task = PickUp or r.task = Restock\n\n // Postcondition\n r.currentLocation = newLoc\n}\n\n// Functions\nfun totalItemsInWarehouse: Int {\n #Item\n}\n\nfun totalRobotsInSystem: Int {\n #Robot\n}\n\n// Run Statements\nrun {\n some r: Robot, i: Item, l: Location | assignTask[r, i, PickUp, l]\n} for 3 but exactly 2 Robot, exactly 2 Item, exactly 2 Location\n\nrun {\n some r: Robot, l: Location | moveRobot[r, l]\n} for 3 but exactly 2 Robot, exactly 2 Location\n\n// Show a basic configuration\nrun {\n #Robot = 2\n #Location = 2\n #Item = 2\n some r: Robot | r.task = Transport\n} for 3\n\n// Check Statements\ncheck TaskWorkflowCorrectness for 3\ncheck UniqueItemAssignment for 3\ncheck NoNegativeWeights for 3", "permalink": "deface-these-mute-humvee", "time": "2024-11-15 14:21:18.297480", "cmd": 1} {"id": 23295, "parent": 23294, "code": "// Signatures\n\nsig Location {\n coordinates: one Coordinates // Represents the location's coordinates in the warehouse\n}\n\nsig Coordinates {\n x: one Int,\n y: one Int\n}\n\nsig Item {\n id: one Int, // Unique identifier for the item\n weight: one Int // Weight of the item\n}\n\nsig Robot {\n currentLocation: one Location, // Current location of the robot\n task: one TaskType, // Current task assigned to the robot\n assignedItem: lone Item // Item assigned to the robot for the current task\n}\n\nenum TaskType { IDLE, PickUp, Transport, Restock, Completed }\n\n// Facts\n\nfact ValidTasks {\n all r: Robot | \n (r.task = PickUp implies some r.assignedItem and some r.currentLocation) \n and \n (r.task = Restock implies some r.assignedItem and some r.currentLocation) \n and \n (r.task = Transport implies some r.assignedItem)\n}\n\nfact UniqueItems {\n all i: Item | lone r: Robot | i = r.assignedItem // Each item is assigned to at most one robot\n}\n\nfact ValidLocations {\n all r: Robot | some r.currentLocation // Every robot must have a current location\n}\n\nfact ValidCoordinates {\n all l: Location | l.coordinates.x >= 0 and l.coordinates.y >= 0 // Coordinates must be non-negative\n}\n\n// Assertions\n\nassert TaskWorkflowCorrectness {\n all r: Robot | \n (r.task = PickUp implies r.assignedItem in some Item and r.currentLocation in some Location) \n and \n (r.task = Transport implies r.assignedItem in some Item)\n}\n\nassert UniqueItemAssignment {\n all i: Item | lone r: Robot | i = r.assignedItem // No item is handled by multiple robots simultaneously\n}\n\nassert NoNegativeWeights {\n all i: Item | i.weight >= 0 // Item weights cannot be negative\n}\n\n// Predicates\n\npred assignTask[r: Robot, i: Item, t: TaskType, loc: Location] {\n r.task = t\n r.assignedItem = i\n r.currentLocation = loc\n}\n\npred moveRobot[r: Robot, newLoc: Location] {\n // Precondition\n r.task = Transport or r.task = PickUp or r.task = Restock\n\n // Postcondition\n r.currentLocation = newLoc\n}\n\n// Functions\n\nfun totalItemsInWarehouse: Int {\n #Item\n}\n\nfun totalRobotsInSystem: Int {\n #Robot\n}\n\n// Run Statements\n\nrun {\n some r: Robot, i: Item, l: Location | assignTask[r, i, PickUp, l]\n} for 5\n\nrun {\n some r: Robot, l: Location | moveRobot[r, l]\n} for 5\n\n// Check Statements\n\ncheck TaskWorkflowCorrectness for 5\ncheck UniqueItemAssignment for 5\ncheck NoNegativeWeights for 5", "permalink": "denote-icon-fading-brim", "time": "2024-11-15 14:30:55.019473", "cmd": 1} {"id": 23309, "parent": 23235, "code": "sig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\nfact UniqueBorrow {\n all b: Book | lone b.~borrowedBooks\n}\n\nassert NoDuplicateBorrowing {\n all br: Borrower | no br.borrowedBooks & (br.borrowedBooks - br.borrowedBooks)\n}\n\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n\nrun {\n # We'll create 3 books and 3 borrowers\n # Note: Alloy doesn't guarantee specific names or titles,\n # so we'll just ensure the correct number of instances.\n # You can add specific instances for more precise testing.\n\n # Create 3 books\n # ...\n\n # Create 3 borrowers\n # ...\n\n # Borrow books to different borrowers\n # ...\n}\n\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "update-bundle-grill-civil", "time": "2024-11-15 19:07:58.509214", "cmd": 2} {"id": 23310, "parent": 23309, "code": "sig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\nfact NoDuplicateBorrowing {\n all br: Borrower | lone br.borrowedBooks\n}\n\nassert NoDuplicateBorrowing {\n all br: Borrower | no br.borrowedBooks & (br.borrowedBooks - br.borrowedBooks)\n}\n\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n\nrun {\n # We'll create 3 books and 3 borrowers\n # Note: Alloy doesn't guarantee specific names or titles,\n # so we'll just ensure the correct number of instances.\n # You can add specific instances for more precise testing.\n\n # Create 3 books\n # ...\n\n # Create 3 borrowers\n # ...\n\n # Borrow books to different borrowers\n # ...\n}\n\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "goes-state-study-comma", "time": "2024-11-15 19:10:43.921584", "cmd": 2} {"id": 23311, "parent": 23310, "code": "sig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\nfact NoDuplicateBorrowing {\n all br: Borrower | lone br.borrowedBooks\n}\n\nassert NoDuplicateBorrowing {\n all br: Borrower | no br.borrowedBooks & (br.borrowedBooks - br.borrowedBooks)\n}\n\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n\nrun {\n # We'll create 3 books and 3 borrowers\n # Note: Alloy doesn't guarantee specific names or titles.\n # so we'll just ensure the correct number of instances.\n # You can add specific instances for more precise testing.\n\n # Create 3 books\n # ...\n\n # Create 3 borrowers\n # ...\n\n # Borrow books to different borrowers\n # ...\n}\n\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "twenty-shell-lake-clash", "time": "2024-11-15 19:11:10.900926", "cmd": 2} {"id": 23312, "parent": 23311, "code": "sig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\nfact NoDuplicateBorrowing {\n all br: Borrower | lone br.borrowedBooks\n}\n\nassert NoDuplicateBorrowing {\n all br: Borrower | no br.borrowedBooks & (br.borrowedBooks - br.borrowedBooks)\n}\n\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n\nrun {\n # We'll create 3 books and 3 borrowers\n # Note: Alloy doesn't guarantee specific names or titles.\n # so we'll just ensure the correct number of instances.\n # You can add specific instances for more precise testing.\n\n # Create 3 books\n # ...\n\n # Create 3 borrowers\n # ...\n\n # Borrow books to different borrowers\n # ...\n}\n\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "bluff-aflame-kindle-series", "time": "2024-11-15 19:11:16.488302", "cmd": 1} {"id": 23313, "parent": 23312, "code": "sig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\nfact NoDuplicateBorrowing {\n all br: Borrower | lone br.borrowedBooks\n}\n\nassert NoDuplicateBorrowing {\n all br: Borrower | no br.borrowedBooks & (br.borrowedBooks - br.borrowedBooks)\n}\n\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n\nrun {\n # We'll create 3 books and 3 borrowers\n # Note: Alloy doesn't guarantee specific names or titles.\n # so we'll just ensure the correct number of instances.\n # You can add specific instances for more precise testing.\n\n # Create 3 books\n # ...\n\n # Create 3 borrowers\n # ...\n\n # Borrow books to different borrowers\n # ...\n}\n\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "ribbon-rely-tamer-tyke", "time": "2024-11-15 19:11:17.999443", "cmd": 1} {"id": 23314, "parent": 23283, "code": "module parking\n\n// Represents a parking spot's status\nabstract sig SpotStatus {}\none sig Open, Reserved extends SpotStatus {}\n\n// Represents a parking spot\nsig ParkingSpot {\n status: one SpotStatus,\n occupiedBy: lone Car // Optional car occupying the spot\n}\n\n// Represents a car\nsig Car {\n parkedAt: lone ParkingSpot // Optional spot where car is parked\n}\n\n// Core constraints\nfact ParkingConstraints {\n // If a spot is occupied by a car, that car must be parked at that spot\n all s: ParkingSpot, c: Car |\n (s.occupiedBy = c) iff (c.parkedAt = s)\n\n // A reserved spot must have a car\n all s: ParkingSpot |\n s.status = Reserved implies one s.occupiedBy\n\n // An open spot cannot have a car\n all s: ParkingSpot |\n s.status = Open implies no s.occupiedBy\n}\n\n// Operations\npred parkCar[c: Car, s: ParkingSpot] {\n // Pre-conditions\n no c.parkedAt // Car isn't already parked\n s.status = Open // Spot is open\n no s.occupiedBy // Spot isn't occupied\n\n // Post-conditions\n s.status' = Reserved\n s.occupiedBy' = c\n c.parkedAt' = s\n\n // Frame conditions (everything else stays the same)\n all other: ParkingSpot - s |\n other.status' = other.status and\n other.occupiedBy' = other.occupiedBy\n all other: Car - c |\n other.parkedAt' = other.parkedAt\n}\n\npred leaveParkingSpot[c: Car] {\n // Pre-conditions\n some c.parkedAt // Car must be parked somewhere\n\n // Post-conditions\n let spot = c.parkedAt | {\n spot.status' = Open\n no spot.occupiedBy'\n no c.parkedAt'\n }\n\n // Frame conditions\n all other: ParkingSpot - c.parkedAt |\n other.status' = other.status and\n other.occupiedBy' = other.occupiedBy\n all other: Car - c |\n other.parkedAt' = other.parkedAt\n}\n\n// Assertions\nassert NoDoubleParking {\n // A car cannot be parked in multiple spots\n all c: Car | lone c.parkedAt\n}\n\nassert NoOveroccupiedSpots {\n // A spot cannot have multiple cars\n all s: ParkingSpot | lone s.occupiedBy\n}\n\nassert ReservedSpotsOccupied {\n // All reserved spots must have a car\n all s: ParkingSpot |\n s.status = Reserved implies one s.occupiedBy\n}\n\n// Run statements for visualization\nrun {\n #Car > 1\n #ParkingSpot > 2\n some c: Car | some c.parkedAt\n some s: ParkingSpot | s.status = Open\n} for 5\n\n// Check assertions\ncheck NoDoubleParking for 5\ncheck NoOveroccupiedSpots for 5\ncheck ReservedSpotsOccupied for 5\n\n// Example scenario: Park a car\n//run parkCar for 5\n\n// Example scenario: Leave parking spot\n//run leaveParkingSpot for 5", "permalink": "dinghy-boxer-jailer-reboot", "time": "2024-11-15 19:37:56.237510", "cmd": 1} {"id": 23315, "parent": 23313, "code": "sig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\nfact UniqueBorrow {\n all b: Book | lone b.~borrowedBooks\n}\n\nassert NoDuplicateBorrowing {\n all br: Borrower | lone br.borrowedBooks\n}\n\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n\nrun {\n # ... (Your run section)\n}\n\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "supper-iodize-exhume-iguana", "time": "2024-11-15 19:43:06.904979", "cmd": 2} {"id": 23316, "parent": 23315, "code": "sig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\nfact UniqueBorrow {\n all b: Book | lone b.~borrowedBooks\n}\n\nassert NoDuplicateBorrowing {\n all br: Borrower | lone br.borrowedBooks\n}\n\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n\n\n\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "poach-groom-gully-wharf", "time": "2024-11-15 19:43:31.633054", "cmd": 2} {"id": 23317, "parent": 23316, "code": "sig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\nfact UniqueBorrow {\n all b: Book | lone b.~borrowedBooks\n}\n\nassert NoDuplicateBorrowing {\n all br: Borrower | lone br.borrowedBooks\n}\n\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n\nrun {\n \n}\n\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "twine-clad-dismay-juicy", "time": "2024-11-15 19:43:51.875765", "cmd": 1} {"id": 23318, "parent": 23317, "code": "sig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\nfact UniqueBorrow {\n all b: Book | lone b.~borrowedBooks\n}\n\nassert NoDuplicateBorrowing {\n all br: Borrower | lone br.borrowedBooks\n}\n\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n\nrun {\n # Create 3 books\n b1, b2, b3: Book;\n\n # Create 3 borrowers\n br1, br2, br3: Borrower;\n\n # Borrow books to different borrowers\n borrowBook[br1, b1];\n borrowBook[br2, b2];\n borrowBook[br3, b3];\n}\n\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "yam-tug-cabana-bonded", "time": "2024-11-15 19:45:45.814735", "cmd": 1} {"id": 23319, "parent": 23318, "code": "sig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\nfact UniqueBorrow {\n all b: Book | lone b.~borrowedBooks\n}\n\nassert NoDuplicateBorrowing {\n all br: Borrower | lone br.borrowedBooks\n}\n\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n\nrun {\n # Create 1 books\n b: Book;\n\n # Create 1 borrowers\n br: Borrower;\n\n \n}\n\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "ranch-aim-rants-shelve", "time": "2024-11-15 19:46:54.981504", "cmd": 1} {"id": 23320, "parent": 23319, "code": "sig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\nfact UniqueBorrow {\n all b: Book | lone b.~borrowedBooks\n}\n\nassert NoDuplicateBorrowing {\n all br: Borrower | lone br.borrowedBooks\n}\n\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n\nrun {\n // Example scenario to test borrowing\n some br: Borrower, b: Book |\n borrowBook(br, b)\n} for 3 Book, 3 Borrower\n\n\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "doze-yippee-salute-ought", "time": "2024-11-15 19:48:42.538720", "cmd": 1} {"id": 23321, "parent": 23320, "code": "sig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\nfact UniqueBorrow {\n all b: Book | lone b.~borrowedBooks\n}\n\nassert NoDuplicateBorrowing {\n all br: Borrower | lone br.borrowedBooks\n}\n\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n\nrun {\n some br: Borrower, b: Book | borrowBook(br, b)\n} for 3\n\n\ncheck NoDuplicateBorrowing for 3 Book, 3 Borrower", "permalink": "dipped-litter-prize-maybe", "time": "2024-11-15 19:50:21.394409", "cmd": 1} {"id": 23322, "parent": null, "code": "sig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\nfact UniqueBorrow {\n all b: Book | lone b.~borrowedBooks\n}\n\nassert NoDuplicateBorrowing {\n all br: Borrower | lone br.borrowedBooks\n}\n\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n\n// The `run` block should simulate the scenario\nrun {\n some br: Borrower, b: Book | b in br.borrowedBooks\n} for 3 Book, 3 Borrower", "permalink": "arming-hula-green-waking", "time": "2024-11-15 19:52:42.076549", "cmd": 1} {"id": 23323, "parent": 23322, "code": "sig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Ensure that no book is borrowed by more than one borrower\nfact UniqueBorrow {\n all b: Book | lone b.~borrowedBooks\n}\n\n// Predicate for borrowing a book\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n\n// Test scenario\nrun {\n some br: Borrower, b: Book | borrowBook(br, b)\n} for 5 Book, 5 Borrower", "permalink": "manual-sassy-civil-armory", "time": "2024-11-15 19:54:37.717883", "cmd": 1} {"id": 23332, "parent": 23331, "code": "sig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Ensure that no book is borrowed by more than one borrower\nfact UniqueBorrow {\n all b: Book | lone b.~borrowedBooks\n}\n\n// Predicate for borrowing a book\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n\n// Test scenario\nrun {\n some br: Borrower, b: Book | borrowBook[br, b]\n} for 5 Book, 5 Borrower", "permalink": "snarl-motion-mossy-sultry", "time": "2024-11-15 19:56:15.145836", "cmd": 1} {"id": 23331, "parent": 23330, "code": "sig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Ensure that no book is borrowed by more than one borrower\nfact UniqueBorrow {\n all b: Book | lone b.~borrowedBooks\n}\n\n// Predicate for borrowing a book\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n\n// Test scenario\nrun {\n some br: Borrower, b: Book | borrowBook[br, b]\n} for 5 Book, 5 Borrower", "permalink": "juicy-recite-robe-clinic", "time": "2024-11-15 19:56:14.531886", "cmd": 1} {"id": 23326, "parent": 23325, "code": "sig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Ensure that no book is borrowed by more than one borrower\nfact UniqueBorrow {\n all b: Book | lone b.~borrowedBooks\n}\n\n// Predicate for borrowing a book\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n\n// Test scenario\nrun {\n some br: Borrower, b: Book | borrowBook[br, b]\n} for 5 Book, 5 Borrower", "permalink": "reopen-sulfur-tassel-banana", "time": "2024-11-15 19:56:09.818101", "cmd": 1} {"id": 23324, "parent": 23323, "code": "sig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Ensure that no book is borrowed by more than one borrower\nfact UniqueBorrow {\n all b: Book | lone b.~borrowedBooks\n}\n\n// Predicate for borrowing a book\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n\n// Test scenario\nrun {\n some br: Borrower, b: Book | borrowBook[br, b]\n} for 5 Book, 5 Borrower", "permalink": "plank-crank-pesky-shack", "time": "2024-11-15 19:56:04.166264", "cmd": 1} {"id": 23325, "parent": 23324, "code": "sig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Ensure that no book is borrowed by more than one borrower\nfact UniqueBorrow {\n all b: Book | lone b.~borrowedBooks\n}\n\n// Predicate for borrowing a book\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n\n// Test scenario\nrun {\n some br: Borrower, b: Book | borrowBook[br, b]\n} for 5 Book, 5 Borrower", "permalink": "luxury-rewrap-patio-snack", "time": "2024-11-15 19:56:07.987023", "cmd": 1} {"id": 23327, "parent": 23326, "code": "sig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Ensure that no book is borrowed by more than one borrower\nfact UniqueBorrow {\n all b: Book | lone b.~borrowedBooks\n}\n\n// Predicate for borrowing a book\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n\n// Test scenario\nrun {\n some br: Borrower, b: Book | borrowBook[br, b]\n} for 5 Book, 5 Borrower", "permalink": "syrup-chop-pumice-refute", "time": "2024-11-15 19:56:11.793198", "cmd": 1} {"id": 23330, "parent": 23329, "code": "sig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Ensure that no book is borrowed by more than one borrower\nfact UniqueBorrow {\n all b: Book | lone b.~borrowedBooks\n}\n\n// Predicate for borrowing a book\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n\n// Test scenario\nrun {\n some br: Borrower, b: Book | borrowBook[br, b]\n} for 5 Book, 5 Borrower", "permalink": "racing-shorts-unzip-oink", "time": "2024-11-15 19:56:13.922369", "cmd": 1} {"id": 23334, "parent": 23333, "code": "sig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Ensure that no book is borrowed by more than one borrower\nfact UniqueBorrow {\n all b: Book | lone b.~borrowedBooks\n}\n\n// Predicate for borrowing a book\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n\n// Test scenario\nrun {\n some br: Borrower, b: Book | borrowBook[br, b]\n} for 5 Book, 5 Borrower", "permalink": "hence-gallon-record-that", "time": "2024-11-15 19:56:18.864975", "cmd": 1} {"id": 23328, "parent": 23327, "code": "sig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Ensure that no book is borrowed by more than one borrower\nfact UniqueBorrow {\n all b: Book | lone b.~borrowedBooks\n}\n\n// Predicate for borrowing a book\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n\n// Test scenario\nrun {\n some br: Borrower, b: Book | borrowBook[br, b]\n} for 5 Book, 5 Borrower", "permalink": "paced-cymbal-gnat-grass", "time": "2024-11-15 19:56:12.714550", "cmd": 1} {"id": 23329, "parent": 23328, "code": "sig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Ensure that no book is borrowed by more than one borrower\nfact UniqueBorrow {\n all b: Book | lone b.~borrowedBooks\n}\n\n// Predicate for borrowing a book\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n\n// Test scenario\nrun {\n some br: Borrower, b: Book | borrowBook[br, b]\n} for 5 Book, 5 Borrower", "permalink": "oven-hunter-envoy-gab", "time": "2024-11-15 19:56:13.312804", "cmd": 1} {"id": 23333, "parent": 23332, "code": "sig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Ensure that no book is borrowed by more than one borrower\nfact UniqueBorrow {\n all b: Book | lone b.~borrowedBooks\n}\n\n// Predicate for borrowing a book\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n\n// Test scenario\nrun {\n some br: Borrower, b: Book | borrowBook[br, b]\n} for 5 Book, 5 Borrower", "permalink": "deck-driven-mute-asleep", "time": "2024-11-15 19:56:15.847138", "cmd": 1} {"id": 23335, "parent": 23334, "code": "sig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Ensure that no book is borrowed by more than one borrower\n//fact UniqueBorrow {\n // all b: Book | lone b.~borrowedBooks\n//}\n\n// Predicate for borrowing a book\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n\n// Test scenario\nrun {\n some br: Borrower, b: Book | borrowBook[br, b]\n} for 5 Book, 5 Borrower", "permalink": "unwell-chuck-repose-palm", "time": "2024-11-15 19:58:27.260026", "cmd": 1} {"id": 23336, "parent": 23335, "code": "sig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Ensure that no book is borrowed by more than one borrower\n//fact UniqueBorrow {\n // all b: Book | lone b.~borrowedBooks\n//}\n\n// Predicate for borrowing a book\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n\n// Test scenario\nrun {\n some br: Borrower, b: Book | borrowBook[br, b]\n} for 5 Book, 5 Borrower", "permalink": "sheep-rented-litmus-stamp", "time": "2024-11-15 19:58:29.303507", "cmd": 1} {"id": 23337, "parent": 23336, "code": "sig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Ensure that no book is borrowed by more than one borrower\n//fact UniqueBorrow {\n // all b: Book | lone b.~borrowedBooks\n//}\n\n// Predicate for borrowing a book\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n\n// Test scenario\nrun {\n some br: Borrower, b: Book | borrowBook[br, b]\n} for 5 Book, 5 Borrower", "permalink": "payer-curtsy-attain-drift", "time": "2024-11-15 19:58:30.403851", "cmd": 1} {"id": 23339, "parent": 23338, "code": "sig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Predicate for borrowing a book\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n\n// Test scenario\nrun {\n some br: Borrower, b: Book | borrowBook[br, b]\n} for 3 Book, 3 Borrower", "permalink": "finale-twisty-fetch-parted", "time": "2024-11-15 19:59:45.934954", "cmd": 1} {"id": 23338, "parent": null, "code": "sig Book {\n title: one String\n}\n\nsig Borrower {\n name: one String,\n borrowedBooks: set Book\n}\n\n// Predicate for borrowing a book\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n\n// Test scenario\nrun {\n some br: Borrower, b: Book | borrowBook[br, b]\n} for 3 Book, 3 Borrower", "permalink": "encore-crown-supply-grub", "time": "2024-11-15 19:59:43.865672", "cmd": 1} {"id": 23340, "parent": 23339, "code": "sig Book {}\n\nsig Borrower {\n borrowedBooks: set Book\n}\n\n// Test scenario\nrun {\n some br: Borrower, b: Book | b in br.borrowedBooks\n} for 3 Book, 3 Borrower", "permalink": "watch-uproot-petal-life", "time": "2024-11-15 20:00:48.668596", "cmd": 1} {"id": 23341, "parent": 23340, "code": "sig Book {}\n\nsig Borrower {\n borrowedBooks: set Book\n}\n\nfact UniqueBorrow {\n all b: Book | lone b.~borrowedBooks\n}\n\nassert NoDuplicateBorrowing {\n all br: Borrower | lone br.borrowedBooks\n}\n\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n// Test scenario\nrun {\n some br: Borrower, b: Book | b in br.borrowedBooks\n} for 3 Book, 3 Borrower", "permalink": "curing-plant-bottle-chaste", "time": "2024-11-15 20:01:53.098345", "cmd": 1} {"id": 23529, "parent": 23520, "code": "sig Book {}\n\nsig Borrower {\n borrowedBooks: set Book\n}\n\nfact UniqueBorrow {\n all b: Book | lone b.~borrowedBooks\n}\n\nassert NoDuplicateBorrowing {\n all br: Borrower | lone br.borrowedBooks\n}\n\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n// Test scenario\nrun {\n some br: Borrower, b: Book | b in br.borrowedBooks\n} for 3 Book, 3 Borrower", "permalink": "until-cinch-talcum-wolf", "time": "2024-11-16 21:33:57.767218", "cmd": 1} {"id": 23342, "parent": 23337, "code": "// Signature for Book (each instance represents a book)\nsig Book {}\n\n// Signature for Borrower (each instance represents a borrower who can borrow books)\nsig Borrower {\n borrowedBooks: set Book // A set of books borrowed by the borrower\n}\n\n// Fact to ensure no book is borrowed by more than one borrower\nfact UniqueBorrow {\n all b: Book | lone b.~borrowedBooks\n}\n\n// Assertion to ensure no borrower borrows the same book multiple times\nassert NoDuplicateBorrowing {\n all br: Borrower | lone br.borrowedBooks\n}\n\n// Predicate defining the borrowing relationship between a borrower and a book\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks // A book is in the set of books borrowed by the borrower\n}\n\n// Test scenario to verify if books can be borrowed\nrun {\n some br: Borrower, b: Book | b in br.borrowedBooks\n} for 3 Book, 3 Borrower // Test with 3 books and 3 borrowers", "permalink": "recast-sitter-gear-clump", "time": "2024-11-15 20:03:36.941070", "cmd": 1} {"id": 23405, "parent": null, "code": "sig Student {\n totalLectures: Int,\n attendedLectures: Int,\n condonedAbsences: Int\n}\n\nfact AttendanceConstraints {\n // The number of condoned absences cannot exceed 20% of total lectures\n all s: Student |\n s.condonedAbsences <= (s.totalLectures / 5)\n \n // The student must meet at least 80% of total lectures to be eligible for the final exam\n all s: Student |\n (s.attendedLectures + s.condonedAbsences) >= (s.totalLectures * 4 / 5)\n}\n\npred eligibleForFinalExam(s: Student) {\n (s.attendedLectures + s.condonedAbsences) >= (s.totalLectures * 4 / 5)\n}\n\n// Example assertion to test the model\nassert AttendanceCheck {\n all s: Student | eligibleForFinalExam(s) implies (s.attendedLectures >= s.totalLectures * 0.8 - s.condonedAbsences)\n}\n\ncheck AttendanceCheck for 5 Student\nrun {} for 5 Student\n", "permalink": "buckle-smoky-hamlet-gander", "time": "2024-11-16 15:51:18.113938", "cmd": 1} {"id": 23406, "parent": 23405, "code": "open util/integers\n\nsig Student {\n totalLectures: Int,\n attendedLectures: Int,\n condonedAbsences: Int\n}\n\nfact AttendanceConstraints {\n // The number of condoned absences cannot exceed 20% of total lectures\n all s: Student |\n s.condonedAbsences <= div[s.totalLectures, 5] // 20% is equivalent to dividing by 5\n \n // The student must meet at least 80% of total lectures to be eligible for the final exam\n all s: Student |\n add[s.attendedLectures, s.condonedAbsences] >= mul[s.totalLectures, 4] / 5\n}\n\npred eligibleForFinalExam(s: Student) {\n add[s.attendedLectures, s.condonedAbsences] >= mul[s.totalLectures, 4] / 5\n}\n\n// Example assertion to test the model\nassert AttendanceCheck {\n all s: Student | eligibleForFinalExam(s) implies \n (s.attendedLectures >= sub[mul[s.totalLectures, 4], s.condonedAbsences] / 5)\n}\n\ncheck AttendanceCheck for 5 Student\nrun {} for 5 Student", "permalink": "retold-stoic-resend-bouncy", "time": "2024-11-16 15:52:47.468074", "cmd": 1} {"id": 23407, "parent": 23406, "code": "open util/integers\n\nsig Student {\n totalLectures: Int,\n attendedLectures: Int,\n condonedAbsences: Int\n}\n\nfact AttendanceConstraints {\n // The number of condoned absences cannot exceed 20% of total lectures\n all s: Student |\n s.condonedAbsences <= (s.totalLectures / 5) // 20% of total lectures\n \n // The student must meet at least 80% of total lectures to be eligible for the final exam\n all s: Student |\n (s.attendedLectures + s.condonedAbsences) >= (s.totalLectures * 4 / 5)\n}\n\npred eligibleForFinalExam(s: Student) {\n (s.attendedLectures + s.condonedAbsences) >= (s.totalLectures * 4 / 5)\n}\n\n// Example assertion to test the model\nassert AttendanceCheck {\n all s: Student | eligibleForFinalExam(s) implies \n (s.attendedLectures >= (s.totalLectures * 4 / 5) - s.condonedAbsences)\n}\n\ncheck AttendanceCheck for 5 Student\nrun {} for 5 Student", "permalink": "flying-eaten-ragged-agenda", "time": "2024-11-16 15:54:03.218621", "cmd": 1} {"id": 23409, "parent": 23408, "code": "sig Semester {\n name: one String,\n duration: one Int,\n isSummer: one Bool\n}\n\nsig Student {\n rollNumber: one Int,\n isNewStudent: one Bool,\n hasScholarship: one Bool,\n degreeProgram: one DegreeProgram,\n courses: set Course,\n financialAid: lone FinancialAid,\n attendance: set Attendance,\n feePayments: set Fee,\n freezeCount: one Int,\n campus: one String\n}\n\nsig Course {\n code: one String,\n semester: one Semester,\n creditHours: one Int,\n prerequisites: set Course,\n isMandatory: one Bool,\n enrolledStudents: set Student,\n enrolledInSummer: one Bool,\n facultyType: one String\n}\n\nsig DegreeProgram {\n name: one String,\n isFastian: one Bool\n}\n\nsig FinancialAid {\n aidType: one String\n}\n\nsig Fee {\n student: one Student,\n amount: one Int,\n feeType: one String\n}\n\nsig Attendance {\n student: one Student,\n course: one Course,\n totalClasses: one Int,\n attendedClasses: one Int\n}\n\nsig AcademicYear {\n year: one Int,\n semesters: set Semester\n}\n\n\nfact summerCourseLimit {\n all s: Student | \n #s.courses = 2 implies (all c: s.courses | c.semester.isSummer)\n}\n\nrun ", "permalink": "shed-gore-claw-botch", "time": "2024-11-16 16:01:18.109706", "cmd": 1} {"id": 23410, "parent": 23409, "code": "sig Semester {\n name: one String,\n duration: one Int,\n isSummer: one Bool\n}\n\nsig Student {\n rollNumber: one Int,\n isNewStudent: one Bool,\n hasScholarship: one Bool,\n degreeProgram: one DegreeProgram,\n courses: set Course,\n financialAid: lone FinancialAid,\n attendance: set Attendance,\n feePayments: set Fee,\n freezeCount: one Int,\n campus: one String\n}\n\nsig Course {\n code: one String,\n semester: one Semester,\n creditHours: one Int,\n prerequisites: set Course,\n isMandatory: one Bool,\n enrolledStudents: set Student,\n enrolledInSummer: one Bool,\n facultyType: one String\n}\n\nsig DegreeProgram {\n name: one String,\n isFastian: one Bool\n}\n\nsig FinancialAid {\n aidType: one String\n}\n\nsig Fee {\n student: one Student,\n amount: one Int,\n feeType: one String\n}\n\nsig Attendance {\n student: one Student,\n course: one Course,\n totalClasses: one Int,\n attendedClasses: one Int\n}\n\nsig AcademicYear {\n year: one Int,\n semesters: set Semester\n}\n\n\nfact summerCourseLimit {\n all s: Student | \n #s.courses = 2 implies (all c: s.courses | c.semester.isSummer)\n}\n", "permalink": "supper-fifth-frying-dicing", "time": "2024-11-16 16:01:23.226039", "cmd": 1} {"id": 23688, "parent": null, "code": "sig Semester {\n name: one String,\n duration: one Int,\n isSummer: one Bool\n}\n\nsig Student {\n rollNumber: one Int,\n isNewStudent: one Bool,\n hasScholarship: one Bool,\n degreeProgram: one DegreeProgram,\n courses: set Course,\n financialAid: lone FinancialAid,\n attendance: set Attendance,\n feePayments: set Fee,\n freezeCount: one Int,\n campus: one String\n}\n\nsig Course {\n code: one String,\n semester: one Semester,\n creditHours: one Int,\n prerequisites: set Course,\n isMandatory: one Bool,\n enrolledStudents: set Student,\n enrolledInSummer: one Bool,\n facultyType: one String\n}\n\nsig DegreeProgram {\n name: one String,\n isFastian: one Bool\n}\n\nsig FinancialAid {\n aidType: one String\n}\n\nsig Fee {\n student: one Student,\n amount: one Int,\n feeType: one String\n}\n\nsig Attendance {\n student: one Student,\n course: one Course,\n totalClasses: one Int,\n attendedClasses: one Int\n}\n\nsig AcademicYear {\n year: one Int,\n semesters: set Semester\n}\n\n\nfact summerCourseLimit {\n all s: Student | \n #s.courses = 2 implies (all c: s.courses | c.semester.isSummer)\n}\n", "permalink": "shelve-unclad-area-spry", "time": "2024-11-18 07:51:51.126887", "cmd": 1} {"id": 23411, "parent": 23410, "code": "sig Semester {\n name: one String,\n duration: one Int,\n isSummer: one Bool\n}\n\nsig Student {\n rollNumber: one Int,\n isNewStudent: one Bool,\n hasScholarship: one Bool,\n degreeProgram: one DegreeProgram,\n courses: set Course,\n financialAid: lone FinancialAid,\n attendance: set Attendance,\n feePayments: set Fee,\n freezeCount: one Int,\n campus: one String\n}\n\nsig Course {\n code: one String,\n semester: one Semester,\n creditHours: one Int,\n prerequisites: set Course,\n isMandatory: one Bool,\n enrolledStudents: set Student,\n enrolledInSummer: one Bool,\n facultyType: one String\n}\n\nsig DegreeProgram {\n name: one String,\n isFastian: one Bool\n}\n\nsig FinancialAid {\n aidType: one String\n}\n\nsig Fee {\n student: one Student,\n amount: one Int,\n feeType: one String\n}\n\nsig Attendance {\n student: one Student,\n course: one Course,\n totalClasses: one Int,\n attendedClasses: one Int\n}\n\nsig AcademicYear {\n year: one Int,\n semesters: set Semester\n}\n\n\nfact summerCourseLimit {\n all s: Student | \n #s.courses = 2 implies (all c: s.courses | c.semester.isSummer)\n}\n", "permalink": "gurgle-relay-raft-rebel", "time": "2024-11-16 16:01:25.458471", "cmd": 1} {"id": 23488, "parent": null, "code": "sig User {\n friends: set User\n}\nfact NoSelfFriendship {\n all u: User | u not in u.friends\n}\nassert NoDuplicateFriendships {\n all u, v: User | u != v implies (u.friends & v.friends = none)\n}\npred addFriend(u, v: User) {\n v in u.friends\n}\nfun totalFriends[u: User]: Int {\n #u.friends\n}\nrun addFriend for 5 User\ncheck NoSelfFriendship for 5 User", "permalink": "gray-making-power-clinic", "time": "2024-11-16 20:46:17.658985", "cmd": 1} {"id": 23489, "parent": null, "code": "sig Book {}\n\nsig Borrower {\n borrowedBooks: set Book\n}\n\nfact UniqueBorrow {\n all b: Book | lone b.~borrowedBooks\n}\n\nassert NoDuplicateBorrowing {\n all br: Borrower | lone br.borrowedBooks\n}\n\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n// Test scenario\nrun {\n some br: Borrower, b: Book | b in br.borrowedBooks\n} for 3 Book, 3 Borrower", "permalink": "thrash-kept-calm-pardon", "time": "2024-11-16 20:51:17.490390", "cmd": 1} {"id": 23507, "parent": 23489, "code": "sig Book {}\n\nsig Borrower {\n borrowedBooks: set Book\n}\n\nfact UniqueBorrow {\n all b: Book | lone b.borrowedBooks\n}\n\nassert NoDuplicateBorrowing {\n all br: Borrower | lone br.borrowedBooks\n}\n\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n// Test scenario\nrun {\n some br: Borrower, b: Book | b in br.borrowedBooks\n} for 3 Book, 3 Borrower", "permalink": "primal-shiny-cut-exert", "time": "2024-11-16 21:09:03.837413", "cmd": 1} {"id": 23510, "parent": 23507, "code": "sig Book {}\n\nsig Borrower {\n borrowedBooks: set Book\n}\n\nfact UniqueBorrow {\n all b: Book | lone b.~borrowedBooks\n}\n\nassert NoDuplicateBorrowing {\n all br: Borrower | lone br.borrowedBooks\n}\n\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n// Test scenario\nrun {\n some br: Borrower, b: Book | b in br.borrowedBooks\n} for 3 Book, 3 Borrower\ncheck{\n NoSelfFriendship \n}for 5 User", "permalink": "sift-broker-clump-taco", "time": "2024-11-16 21:12:11.537974", "cmd": 1} {"id": 23519, "parent": 23510, "code": "sig Book {}\n\nsig Borrower {\n borrowedBooks: set Book\n}\n\nfact UniqueBorrow {\n all b: Book | lone b.~borrowedBooks\n}\n\nassert NoDuplicateBorrowing {\n all br: Borrower | lone br.borrowedBooks\n}\n\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n// Test scenario\nrun {\n some br: Borrower, b: Book | b in br.borrowedBooks\n} for 3 Book, 3 Borrower\ncheck NoDuplicateBorrowing", "permalink": "moaner-dinghy-lying-unplug", "time": "2024-11-16 21:29:24.042660", "cmd": 2} {"id": 23544, "parent": 23538, "code": "sig Book {}\n\nsig Borrower {\n borrowedBooks: set Book\n}\n\nfact UniqueBorrow {\n all b: Book | lone b.~borrowedBooks\n}\n\nassert NoDuplicateBorrowing {\n all br: Borrower | lone br.borrowedBooks\n}\n\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n// Test scenario\nrun {\n some br: Borrower, b: Book | b in br.borrowedBooks\n} for 3 Book, 3 Borrower\ncheck NoDuplicateBorrowing", "permalink": "anime-napkin-green-throat", "time": "2024-11-16 21:40:16.784344", "cmd": 1} {"id": 23520, "parent": 23519, "code": "sig Book {}\n\nsig Borrower {\n borrowedBooks: set Book\n}\n\nfact UniqueBorrow {\n all b: Book | lone b.~borrowedBooks\n}\n\nassert NoDuplicateBorrowing {\n all br: Borrower | lone br.borrowedBooks\n}\n\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n// Test scenario\nrun {\n some br: Borrower, b: Book | b in br.borrowedBooks\n} for 3 Book, 3 Borrower\ncheck NoDuplicateBorrowing", "permalink": "unwind-figure-setup-flatly", "time": "2024-11-16 21:29:37.130736", "cmd": 1} {"id": 23538, "parent": 23532, "code": "sig Book {}\n\nsig Borrower {\n borrowedBooks: set Book\n}\n\nfact UniqueBorrow {\n all b: Book | lone b.~borrowedBooks\n}\n\nassert NoDuplicateBorrowing {\n all br: Borrower | lone br.borrowedBooks\n}\n\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n// Test scenario\nrun {\n some br: Borrower, b: Book | b in br.borrowedBooks\n} for 3 Book, 3 Borrower\ncheck NoDuplicateBorrowing", "permalink": "sizzle-churn-gently-whiff", "time": "2024-11-16 21:36:22.263880", "cmd": 2} {"id": 23532, "parent": 23529, "code": "sig Book {}\n\nsig Borrower {\n borrowedBooks: set Book\n}\n\nfact UniqueBorrow {\n all b: Book | lone b.~borrowedBooks\n}\n\nassert NoDuplicateBorrowing {\n all br: Borrower | lone br.borrowedBooks\n}\n\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\n// Test scenario\nrun {\n some br: Borrower, b: Book | b in br.borrowedBooks\n} for 3 Book, 3 Borrower\ncheck NoDuplicateBorrowing", "permalink": "gummy-setup-affair-mold", "time": "2024-11-16 21:36:07.679523", "cmd": 1} {"id": 23561, "parent": 23544, "code": "sig Book {}\nsig Borrower {borrowedBooks: set Book}\nfact UniqueBorrow {\n all b: Book | lone b.~borrowedBooks\n}\nassert NoDuplicateBorrowing {\n all br: Borrower | lone br.borrowedBooks\n}\npred borrowBook(br: Borrower, b: Book) {\n b in br.borrowedBooks\n}\nrun {\n some br: Borrower, b: Book | b in br.borrowedBooks\n} for 3 Book, 3 Borrower\ncheck NoDuplicateBorrowing", "permalink": "bless-silly-ecard-myself", "time": "2024-11-16 21:51:38.414101", "cmd": 1} {"id": 23593, "parent": null, "code": "sig Semester {\n name: one String,\n startDate: one Int,\n endDate: one Int,\n duration: Int\n}\n\nsig AcademicYear {\n semesters: set Semester\n}\n\nsig Student {\n rollNumber: one Int,\n attendance: Int,\n enrolledIn: set Course\n}\n\nsig Course {\n name: one String,\n creditHours: Int,\n preRequisites: set Course\n}\n\nsig FinancialAid {\n fundedBy: one String,\n isActive: one Bool\n}\n\n// Facts\nfact SemesterDuration {\n all s: Semester | s.duration > 0 and s.endDate > s.startDate\n}\n\nfact AcademicYearSemesters {\n all ay: AcademicYear | \n #ay.semesters >= 2 and #ay.semesters <= 3\n}\n\nfact UniqueRollNumbers {\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber\n}", "permalink": "poppy-huff-silo-modify", "time": "2024-11-17 08:30:00.879874", "cmd": 1} {"id": 23647, "parent": 23597, "code": "sig Book {}\nsig Borrower { borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all br: Borrower | lone br.borrowedBooks }\npred borrowBook(br: Borrower, b: Book) { b in br.borrowedBooks }\nrun { some br: Borrower, b: Book | b in br.borrowedBooks } for 3 Book, 3 Borrower\ncheck NoDuplicateBorrowing", "permalink": "boxing-letter-stucco-circus", "time": "2024-11-17 17:54:19.764434", "cmd": 1} {"id": 23596, "parent": 23595, "code": "sig Book {}\nsig Borrower { borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all br: Borrower | lone br.borrowedBooks }\npred borrowBook(br: Borrower, b: Book) { b in br.borrowedBooks }\nrun { some br: Borrower, b: Book | b in br.borrowedBooks } for 3 Book, 3 Borrower\ncheck NoDuplicateBorrowing", "permalink": "ankle-frame-stride-deport", "time": "2024-11-17 10:57:07.235342", "cmd": 1} {"id": 23594, "parent": 23561, "code": "sig Book {}\nsig Borrower { borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all br: Borrower | lone br.borrowedBooks }\npred borrowBook(br: Borrower, b: Book) { b in br.borrowedBooks }\nrun { some br: Borrower, b: Book | b in br.borrowedBooks } for 3 Book, 3 Borrower\ncheck NoDuplicateBorrowing", "permalink": "lifter-brunt-unzip-marina", "time": "2024-11-17 08:40:53.394290", "cmd": 1} {"id": 23597, "parent": 23596, "code": "sig Book {}\nsig Borrower { borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all br: Borrower | lone br.borrowedBooks }\npred borrowBook(br: Borrower, b: Book) { b in br.borrowedBooks }\nrun { some br: Borrower, b: Book | b in br.borrowedBooks } for 3 Book, 3 Borrower\ncheck NoDuplicateBorrowing", "permalink": "unease-bluff-acts-surely", "time": "2024-11-17 10:57:11.800070", "cmd": 2} {"id": 23595, "parent": 23594, "code": "sig Book {}\nsig Borrower { borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all br: Borrower | lone br.borrowedBooks }\npred borrowBook(br: Borrower, b: Book) { b in br.borrowedBooks }\nrun { some br: Borrower, b: Book | b in br.borrowedBooks } for 3 Book, 3 Borrower\ncheck NoDuplicateBorrowing", "permalink": "hush-boxing-scabby-gluten", "time": "2024-11-17 10:56:58.593115", "cmd": 1} {"id": 23612, "parent": null, "code": "//Anum Batool (anonymized)\n//Identifying Signatures and Relationships\n//Academic Year\nsig AcademicYear {\n semesters: some semesters\n}\n\n\n\n//Constraints as Facts or Assertions\n//1. Academic Year Constraint: 2 or 3 semesters per academic year\n\n\nrun {}", "permalink": "pawing-sled-crank-dime", "time": "2024-11-17 12:32:18.718837", "cmd": 1} {"id": 23613, "parent": 23612, "code": "//Anum Batool (anonymized)\n//Identifying Signatures and Relationships\n//Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\nsig Semester {}\n\n\n\n//Constraints as Facts or Assertions\n//1. Academic Year Constraint: 2 or 3 semesters per academic year\n\n\nrun {}", "permalink": "size-recent-koala-ended", "time": "2024-11-17 12:32:43.871059", "cmd": 1} {"id": 23614, "parent": 23613, "code": "//Anum Batool (anonymized)\n\n//***** Identifying Signatures and Relationships *****//\n//1. Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester\nsig Semester {}\n\n\n//***** Facts and Assertions *****//\n//*** Academic Year Facts ***//\nfact AcademicYearConstraint {\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n }\n}\n\n\nrun {}", "permalink": "sandal-slug-oppose-curry", "time": "2024-11-17 12:43:13.898850", "cmd": 1} {"id": 23615, "parent": 23614, "code": "//Anum Batool (anonymized)\n\n//***** Identifying Signatures and Relationships *****//\n//1. Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester\nsig Semester {}\n\n\n//***** Facts and Assertions *****//\n//*** Academic Year Facts ***//\nfact AcademicYearConstraint {\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 \n #ay.semesters <=3\n }\n}\n\n\nrun {}", "permalink": "rage-nappy-dipped-laurel", "time": "2024-11-17 12:44:43.815438", "cmd": 1} {"id": 23616, "parent": 23615, "code": "//Anum Batool (anonymized)\n\n//***** Identifying Signatures and Relationships *****//\n//1. Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester\nabstract sig Semester {}\nsig Spring, Fall, Summer extends Semester {} //Three main Semester types\n\n\n//***** Facts and Assertions *****//\n//*** Academic Year Facts ***//\nfact AcademicYearConstraint {\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone sum: Summer | sum in ay.Semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some sum: Summer | sum in ay.semesters}\n }\n}\n\n\nrun {}", "permalink": "finale-slurp-gargle-nearly", "time": "2024-11-17 12:55:45.908037", "cmd": 1} {"id": 23617, "parent": 23616, "code": "//Anum Batool (anonymized)\n\n//***** Identifying Signatures and Relationships *****//\n//1. Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester\nabstract sig Semester {}\nsig Spring, Fall, Summer extends Semester {} //Three main Semester types\n\n\n//***** Facts and Assertions *****//\n//*** Academic Year Facts ***//\nfact AcademicYearConstraint {\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone sum: Summer | sum in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some sum: Summer | sum in ay.semesters}\n }\n}\n\n\nrun {}", "permalink": "tiling-sleet-debtor-broker", "time": "2024-11-17 12:55:55.456950", "cmd": 1} {"id": 23618, "parent": 23617, "code": "//Anum Batool (anonymized)\n\n//***** Identifying Signatures and Relationships *****//\n//1. Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester\nabstract sig Semester {}\nsig Spring, Fall, Summer extends Semester {} //Three main Semester types\n\n\n//***** Facts and Assertions *****//\n//*** Academic Year Facts ***//\nfact AcademicYearConstraint {\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\n\nrun {}", "permalink": "capped-putt-gab-reload", "time": "2024-11-17 12:56:22.181751", "cmd": 1} {"id": 23622, "parent": 23618, "code": "//Anum Batool (anonymized)\n\n//***** Identifying Signatures and Relationships *****//\n//1. Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester \nabstract sig Semester {\n startDate: one Int //day of year\n endDate: one Int //day of year\n duration: one Int //weeks\n course: some Course //offered in a semester\n}\nsig Spring, Fall, Summer extends Semester {} //Three main Semester types\n\n//Course\nsig Course {}\n\n//***** Facts and Assertions *****//\n//*** Academic Year Facts ***//\nfact AcademicYearConstraint {\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\n\nrun AcademicYearConstraint for 1", "permalink": "colt-retail-perish-turf", "time": "2024-11-17 13:10:45.696742", "cmd": 1} {"id": 23624, "parent": 23623, "code": "//Anum Batool (anonymized)\n\n//***** Identifying Signatures and Relationships *****//\n//1. Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester \nabstract sig Semester {\n startDate: one Int //day of year\n endDate: one Int //day of year\n duration: one Int //weeks\n course: some Course //offered in a semester\n}\nsig Spring, Fall, Summer extends Semester {} //Three main Semester types\n\n//Course\nsig Course {}\n\n//***** Facts and Assertions *****//\n//*** Academic Year Facts ***//\nfact AcademicYearConstraint {\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\n\nrun AcademicYearConstraint ", "permalink": "neon-ample-eldest-straw", "time": "2024-11-17 13:10:56.932207", "cmd": 1} {"id": 23623, "parent": 23622, "code": "//Anum Batool (anonymized)\n\n//***** Identifying Signatures and Relationships *****//\n//1. Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester \nabstract sig Semester {\n startDate: one Int //day of year\n endDate: one Int //day of year\n duration: one Int //weeks\n course: some Course //offered in a semester\n}\nsig Spring, Fall, Summer extends Semester {} //Three main Semester types\n\n//Course\nsig Course {}\n\n//***** Facts and Assertions *****//\n//*** Academic Year Facts ***//\nfact AcademicYearConstraint {\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\n\nrun AcademicYearConstraint ", "permalink": "hate-roman-unclad-fall", "time": "2024-11-17 13:10:54.432534", "cmd": 1} {"id": 23625, "parent": 23624, "code": "//Anum Batool (anonymized)\n\n//***** Identifying Signatures and Relationships *****//\n//1. Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester \nabstract sig Semester {\n startDate: one Int //day of year\n endDate: one Int //day of year\n duration: one Int //weeks\n course: some Course //offered in a semester\n}\nsig Spring, Fall, Summer extends Semester {} //Three main Semester types\n\n//Course\nsig Course {}\n\n//***** Facts and Assertions *****//\n//*** Academic Year Facts ***//\nfact AcademicYearConstraint {\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\n\nrun {AcademicYearConstraint }", "permalink": "iodize-nebula-seldom-stays", "time": "2024-11-17 13:11:03.714309", "cmd": 1} {"id": 23626, "parent": 23625, "code": "//Anum Batool (anonymized)\n\n//***** Identifying Signatures and Relationships *****//\n//1. Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester \nabstract sig Semester {\n startDate: one Int //day of year\n endDate: one Int //day of year\n duration: one Int //weeks\n course: some Course //offered in a semester\n}\nsig Spring, Fall, Summer extends Semester {} //Three main Semester types\n\n//Course\nsig Course {}\n\n//***** Facts and Assertions *****//\n//*** Academic Year Facts ***//\nfact AcademicYearConstraint {\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\n\nrun {AcademicYearConstraint }", "permalink": "dial-gazing-rogue-pummel", "time": "2024-11-17 13:11:08.258716", "cmd": 1} {"id": 23627, "parent": 23626, "code": "//Anum Batool (anonymized)\n\n//***** Identifying Signatures and Relationships *****//\n//1. Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester \nabstract sig Semester {\n startDate: one Int //day of year\n endDate: one Int //day of year\n duration: one Int //weeks\n course: some Course //offered in a semester\n}\nsig Spring, Fall, Summer extends Semester {} //Three main Semester types\n\n//Course\nsig Course {}\n\n//***** Facts and Assertions *****//\n//*** Academic Year Facts ***//\nfact AcademicYearConstraint {\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\n\nrun {}", "permalink": "violet-diving-hunger-kilt", "time": "2024-11-17 13:11:13.660854", "cmd": 1} {"id": 23628, "parent": 23627, "code": "//Anum Batool (anonymized)\n\n//***** Identifying Signatures and Relationships *****//\n//1. Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester \nabstract sig Semester {\n startDate: one Int //day of year\n endDate: one Int //day of year\n duration: one Int //weeks\n course: some Course //offered in a semester\n}\nsig Spring, Fall, Summer extends Semester {} //Three main Semester types\n\n//Course\nsig Course {}\n\n//***** Facts and Assertions *****//\n//*** Academic Year Facts ***//\nfact AcademicYearConstraint {\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\n\nrun {}", "permalink": "clip-bolt-lilly-shock", "time": "2024-11-17 13:11:23.822455", "cmd": 1} {"id": 23629, "parent": 23628, "code": "//Anum Batool (anonymized)\n\n//***** Identifying Signatures and Relationships *****//\n//1. Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester \nabstract sig Semester {\n startDate: one Int //day of year\n endDate: one Int //day of year\n duration: one Int //weeks\n course: some Course //offered in a semester\n}\nsig Spring, Fall, Summer extends Semester {} //Three main Semester types\n\n//Course\nsig Course {}\n\n//***** Facts and Assertions *****//\n//*** Academic Year Facts ***//\nfact AcademicYearConstraint {\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\n\nrun {}", "permalink": "speak-deck-turret-banked", "time": "2024-11-17 13:11:26.819781", "cmd": 1} {"id": 23630, "parent": 23629, "code": "//Anum Batool (anonymized)\n\n//***** Identifying Signatures and Relationships *****//\n//1. Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester \nabstract sig Semester {\n startDate: one Int, //day of year\n endDate: one Int, //day of year\n duration: one Int, //weeks\n course: some Course //offered in a semester\n}\nsig Spring, Fall, Summer extends Semester {} //Three main Semester types\n\n//Course\nsig Course {}\n\n//***** Facts and Assertions *****//\n//*** Academic Year Facts ***//\nfact AcademicYearConstraint {\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\n\nrun {}", "permalink": "crib-docile-cozy-proton", "time": "2024-11-17 13:11:51.965483", "cmd": 1} {"id": 23633, "parent": 23632, "code": "//Anum Batool (anonymized)\n\n//***** Identifying Signatures and Relationships *****//\n//1. Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester \nabstract sig Semester {\n startDate: one Int, //day of year\n endDate: one Int, //day of year\n duration: one Int, //weeks\n course: some Course //offered in a semester\n}\nsig Spring, Fall, Summer extends Semester {} //Three main Semester types\n\n//Course\nsig Course {}\n\n//***** Facts and Assertions *****//\n//*** Academic Year Facts ***//\nfact AcademicYearConstraint {\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\n\nrun {}", "permalink": "curfew-anyone-filing-retail", "time": "2024-11-17 13:12:18.618899", "cmd": 1} {"id": 23631, "parent": 23630, "code": "//Anum Batool (anonymized)\n\n//***** Identifying Signatures and Relationships *****//\n//1. Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester \nabstract sig Semester {\n startDate: one Int, //day of year\n endDate: one Int, //day of year\n duration: one Int, //weeks\n course: some Course //offered in a semester\n}\nsig Spring, Fall, Summer extends Semester {} //Three main Semester types\n\n//Course\nsig Course {}\n\n//***** Facts and Assertions *****//\n//*** Academic Year Facts ***//\nfact AcademicYearConstraint {\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\n\nrun {AcademicYearConstraint}", "permalink": "swerve-raking-clone-wafer", "time": "2024-11-17 13:12:01.404477", "cmd": 1} {"id": 23632, "parent": 23631, "code": "//Anum Batool (anonymized)\n\n//***** Identifying Signatures and Relationships *****//\n//1. Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester \nabstract sig Semester {\n startDate: one Int, //day of year\n endDate: one Int, //day of year\n duration: one Int, //weeks\n course: some Course //offered in a semester\n}\nsig Spring, Fall, Summer extends Semester {} //Three main Semester types\n\n//Course\nsig Course {}\n\n//***** Facts and Assertions *****//\n//*** Academic Year Facts ***//\nfact AcademicYearConstraint {\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\n\nrun AcademicYearConstraint", "permalink": "thorn-rule-circle-pushup", "time": "2024-11-17 13:12:09.113441", "cmd": 1} {"id": 23634, "parent": 23633, "code": "//Anum Batool (anonymized)\n\n//***** Identifying Signatures and Relationships *****//\n//1. Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester \nabstract sig Semester {\n startDate: one Int, //day of year\n endDate: one Int, //day of year\n duration: one Int, //weeks\n course: some Course //offered in a semester\n}\nsig Spring, Fall, Summer extends Semester {} //Three main Semester types\n\n//Course\nsig Course {}\n\n//***** Facts and Assertions *****//\n//*** Academic Year Facts ***//\nfact AcademicYearConstraint {\n all ay: AcademicYear | showValidAcademicYear(ay)\n}\n\n//Academic Year Predicate\npred showValidAcademicYear(ay: AcademicYear){\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n}\n\n\nrun showValidAcademicYear", "permalink": "sultry-bleep-clunky-botany", "time": "2024-11-17 13:25:15.294748", "cmd": 1} {"id": 23635, "parent": 23634, "code": "//Anum Batool (anonymized)\n\n//***** Identifying Signatures and Relationships *****//\n//1. Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester \nabstract sig Semester {\n startDate: one Int, //day of year\n endDate: one Int, //day of year\n duration: one Int, //weeks\n course: some Course //offered in a semester\n}\nsig Spring, Fall, Summer extends Semester {} //Three main Semester types\n\n//Course\nsig Course {}\n\n//***** Facts and Assertions *****//\n//*** Academic Year Facts ***//\nfact AcademicYearConstraint {\n all ay: AcademicYear | showValidAcademicYear(ay)\n}\n\n//Academic Year Predicate\npred showValidAcademicYear(ay: AcademicYear){\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n}\n\n\nrun showValidAcademicYear for 3", "permalink": "badly-goes-snore-yarn", "time": "2024-11-17 13:25:35.124738", "cmd": 1} {"id": 23636, "parent": 23635, "code": "//Anum Batool (anonymized)\n\n//***** Identifying Signatures and Relationships *****//\n//1. Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester \nabstract sig Semester {\n startDate: one Int, //day of year\n endDate: one Int, //day of year\n duration: one Int, //weeks\n course: some Course //offered in a semester\n}\nsig Spring, Fall, Summer extends Semester {} //Three main Semester types\n\n//Course\nsig Course {}\n\n//***** Facts and Assertions *****//\n//*** Academic Year Facts ***//\n//Academic Year Predicate\npred showValidAcademicYear(ay: AcademicYear){\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n}\nfact AcademicYearConstraint {\n all ay: AcademicYear | showValidAcademicYear(ay)\n}\n\nrun showValidAcademicYear for 3", "permalink": "sneer-visa-duress-tinsel", "time": "2024-11-17 13:26:30.847529", "cmd": 1} {"id": 23637, "parent": 23636, "code": "//Anum Batool (anonymized)\n\n//***** Identifying Signatures and Relationships *****//\n//1. Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester \nabstract sig Semester {\n startDate: one Int, //day of year\n endDate: one Int, //day of year\n duration: one Int, //weeks\n course: some Course //offered in a semester\n}\nsig Spring, Fall, Summer extends Semester {} //Three main Semester types\n\n//Course\nsig Course {}\n\n//***** Facts and Assertions *****//\n//*** Academic Year Facts ***//\nfact AcademicYearConstraint {\n all ay: AcademicYear | showValidAcademicYear(ay)\n}\n\n//Academic Year Predicate\npred showValidAcademicYear(ay: AcademicYear){\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n}\n\n\nrun showValidAcademicYear for 3 but 1 AcadYear", "permalink": "tabby-icky-unwed-snore", "time": "2024-11-17 13:27:31.908123", "cmd": 1} {"id": 23638, "parent": 23637, "code": "//Anum Batool (anonymized)\n\n//***** Identifying Signatures and Relationships *****//\n//1. Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester \nabstract sig Semester {\n startDate: one Int, //day of year\n endDate: one Int, //day of year\n duration: one Int, //weeks\n course: some Course //offered in a semester\n}\nsig Spring, Fall, Summer extends Semester {} //Three main Semester types\n\n//Course\nsig Course {}\n\n//***** Facts and Assertions *****//\n//*** Academic Year Facts ***//\nfact AcademicYearConstraint {\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\n\n\n\n\nrun {}", "permalink": "clerk-reword-catchy-sample", "time": "2024-11-17 13:28:17.162372", "cmd": 1} {"id": 23639, "parent": 23638, "code": "//Anum Batool (anonymized)\n\n//***** Identifying Signatures and Relationships *****//\n//1. Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester \nabstract sig Semester {\n startDate: one Int, //day of year\n endDate: one Int, //day of year\n duration: one Int, //weeks\n course: some Course //offered in a semester\n}\nsig Spring, Fall, Summer extends Semester {} //Three main Semester types\n\n//Course\nsig Course {}\n\n//***** Facts and Assertions *****//\n//*** Academic Year Facts And Assertions ***//\nfact AcademicYearConstraint {\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\n//*** Semester Facts And Assertions ***//\nfact SemesterConstraints {\n //Duration Constraints\n all s: Semester | s.endDate > s.startDate\n all s: Spring + Fall | s.duration = 17\n all s: Summer | s.duration = 8 and validSummerSemester(s)\n\n\n}\n\npred validSummerSemester(s: Summer) {\n //June to July happens from day 151 to 180\n s.startDate >= 151 && s.endDate <= 180\n}\n\n\nrun {}", "permalink": "ferret-boozy-omega-fled", "time": "2024-11-17 13:36:09.979432", "cmd": 1} {"id": 23640, "parent": 23639, "code": "//Anum Batool (anonymized)\n\n//***** Identifying Signatures and Relationships *****//\n//1. Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester \nabstract sig Semester {\n startDate: one Int, //day of year\n endDate: one Int, //day of year\n duration: one Int, //weeks\n course: some Course //offered in a semester\n}\nsig Spring, Fall, Summer extends Semester {} //Three main Semester types\n\n//Course\nsig Course {}\n\n//***** Facts and Assertions *****//\n//*** Academic Year Facts And Assertions ***//\nfact AcademicYearConstraint {\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\n//*** Semester Facts And Assertions ***//\nfact SemesterConstraints {\n //Duration Constraints\n all s: Semester | s.endDate > s.startDate\n all s: Spring + Fall | s.duration = 17\n all s: Summer | s.duration = 8 && validSummerSemester(s)\n\n\n}\n\npred validSummerSemester(s: Summer) {\n //June to July happens from day 151 to 180\n s.startDate >= 151 && s.endDate <= 180\n}\n\n\nrun {}", "permalink": "siesta-armory-shrunk-shame", "time": "2024-11-17 13:36:17.527277", "cmd": 1} {"id": 23641, "parent": 23640, "code": "//Anum Batool (anonymized)\n\n//***** Identifying Signatures and Relationships *****//\n//1. Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester \nabstract sig Semester {\n startDate: one Int, //day of year\n endDate: one Int, //day of year\n duration: one Int, //weeks\n course: some Course //offered in a semester\n}\nsig Spring, Fall, Summer extends Semester {} //Three main Semester types\n\n//Course\nsig Course {}\n\n//***** Facts and Assertions *****//\n//*** Academic Year Facts And Assertions ***//\nfact AcademicYearConstraint {\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\n//*** Semester Facts And Assertions ***//\nfact SemesterDateConstraints {\n //Duration Constraints\n all s: Semester | s.endDate > s.startDate\n all s: Spring + Fall | s.duration = 17\n all s: Summer | s.duration = 8 \n\n //Summer constraint June to July\n all s: Summer | validSummerSemester(s)\n\n}\n\npred validSummerSemester(s: Summer) {\n //June to July happens from day 151 to 180\n s.startDate >= 151 && s.endDate <= 180\n}\n\n\nrun {}", "permalink": "arena-kelp-dental-stark", "time": "2024-11-17 13:36:52.460936", "cmd": 1} {"id": 23642, "parent": 23641, "code": "//Anum Batool (anonymized)\n\n//***** Identifying Signatures and Relationships *****//\n//1. Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester \nabstract sig Semester {\n startDate: one Int, //day of year\n endDate: one Int, //day of year\n duration: one Int, //weeks\n course: some Course //offered in a semester\n}\nsig Spring, Fall, Summer extends Semester {} //Three main Semester types\n\n//Course\nsig Course {}\n\n//***** Facts and Assertions *****//\n//*** Academic Year Facts And Assertions ***//\nfact AcademicYearConstraint {\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\n//*** Semester Facts And Assertions ***//\nfact SemesterDateConstraints {\n //Duration Constraints\n all s: Semester | s.endDate > s.startDate\n all s: Spring + Fall | s.duration = 17\n all s: Summer | s.duration = 8 \n\n //Summer constraint June to July\n all s: Summer | validSummerSemester(s)\n\n}\n\npred validSummerSemester[s: Summer] {\n //June to July happens from day 151 to 180\n s.startDate >= 151 && s.endDate <= 180\n}\n\n\nrun {}", "permalink": "enzyme-clear-gauze-coat", "time": "2024-11-17 13:40:01.475141", "cmd": 1} {"id": 23731, "parent": null, "code": "//Anum Batool (anonymized)\n\n//***** Identifying Signatures and Relationships *****//\n//1. Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester \nabstract sig Semester {\n startDate: one Int, //day of year\n endDate: one Int, //day of year\n duration: one Int, //weeks\n course: some Course //offered in a semester\n}\nsig Spring, Fall, Summer extends Semester {} //Three main Semester types\n\n//Course\nsig Course {}\n\n//***** Facts and Assertions *****//\n//*** Academic Year Facts And Assertions ***//\nfact AcademicYearConstraint {\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\n//*** Semester Facts And Assertions ***//\nfact SemesterDateConstraints {\n //Duration Constraints\n all s: Semester | s.endDate > s.startDate\n all s: Spring + Fall | s.duration = 17\n all s: Summer | s.duration = 8 \n\n //Summer constraint June to July\n all s: Summer | validSummerSemester[s]\n\n}\n\npred validSummerSemester[s: Summer] {\n //June to July happens from day 151 to 180\n s.startDate >= 151 && s.endDate <= 180\n}\n\n\nrun {}", "permalink": "awhile-parka-guise-paver", "time": "2024-11-18 13:53:08.891581", "cmd": 1} {"id": 23643, "parent": 23642, "code": "//Anum Batool (anonymized)\n\n//***** Identifying Signatures and Relationships *****//\n//1. Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester \nabstract sig Semester {\n startDate: one Int, //day of year\n endDate: one Int, //day of year\n duration: one Int, //weeks\n course: some Course //offered in a semester\n}\nsig Spring, Fall, Summer extends Semester {} //Three main Semester types\n\n//Course\nsig Course {}\n\n//***** Facts and Assertions *****//\n//*** Academic Year Facts And Assertions ***//\nfact AcademicYearConstraint {\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\n//*** Semester Facts And Assertions ***//\nfact SemesterDateConstraints {\n //Duration Constraints\n all s: Semester | s.endDate > s.startDate\n all s: Spring + Fall | s.duration = 17\n all s: Summer | s.duration = 8 \n\n //Summer constraint June to July\n all s: Summer | validSummerSemester[s]\n\n}\n\npred validSummerSemester[s: Summer] {\n //June to July happens from day 151 to 180\n s.startDate >= 151 && s.endDate <= 180\n}\n\n\nrun {}", "permalink": "pecan-haunt-junior-recast", "time": "2024-11-17 13:40:15.022687", "cmd": 1} {"id": 23742, "parent": 23731, "code": "//Anum Batool (anonymized)\n\n//***** Identifying Signatures and Relationships *****//\n//1. Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester \nabstract sig Semester {\n startDate: one Int, //day of year\n endDate: one Int, //day of year\n duration: one Int, //weeks\n course: some Course //offered in a semester\n}\nsig Spring, Fall, Summer extends Semester {} //Three main Semester types\n\n//Course\nsig Course {}\n\n//***** Facts and Assertions *****//\n//*** Academic Year Facts And Assertions ***//\nfact AcademicYearConstraint {\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\n//*** Semester Facts And Assertions ***//\nfact SemesterDateConstraints {\n //Duration Constraints\n all s: Semester | s.endDate > s.startDate\n all s: Spring + Fall | s.duration = 17\n all s: Summer | s.duration = 8 \n\n //Summer constraint June to July\n all s: Summer | validSummerSemester[s]\n\n}\n\npred validSummerSemester[s: Summer] {\n //June to July happens from day 151 to 180\n s.startDate >= 151 && s.endDate <= 180\n}\n\n\nrun {}", "permalink": "tartly-quill-mashed-feeble", "time": "2024-11-18 14:18:26.642738", "cmd": 1} {"id": 23646, "parent": null, "code": "sig Node {\nnextNode: lone Node,\nvalue: one Int\n}\n\none sig List {\nheader : lone Node\n}\n\n// fact {\n\n// some n: Node | no n.next\n\n// Node in List.header.*next\n// }\n\npred acyclic(){\nno List.header or some n : List.header.*nextNode | no n.nextNode\n\n//Node in List.header.*nextNode\n}\n\nrun acyclic for 10", "permalink": "zone-plod-deuce-kitten", "time": "2024-11-17 17:08:28.110479", "cmd": 1} {"id": 23676, "parent": null, "code": "sig AcademicYear{\n semesters: some semesters\n numSemesters: one Int\n}\nsig Semester \nsig Student\nsig Course\nsig Fee", "permalink": "knelt-cussed-fleshy-robust", "time": "2024-11-18 06:56:07.749242", "cmd": 1} {"id": 23677, "parent": 23676, "code": "\nopen util/integer\n\nsig AcademicYear{\n semesters: some semesters\n numSemesters: one Int\n}\nsig Semester \nsig Student\nsig Course\nsig Fee", "permalink": "poser-blank-equal-unhook", "time": "2024-11-18 06:56:36.944561", "cmd": 1} {"id": 23678, "parent": 23677, "code": "\nopen util/integer\n\nsig AcademicYear{\n semesters: some semesters\n rollNumber: one Int,\n}\nsig Semester \nsig Student\nsig Course\nsig Fee", "permalink": "storm-liking-nail-disk", "time": "2024-11-18 06:57:08.339939", "cmd": 1} {"id": 23679, "parent": 23678, "code": "\nopen util/integer\n\nsig AcademicYear{\n semesters: some semesters,\n rollNumber: one Int\n}\nsig Semester \nsig Student\nsig Course\nsig Fee", "permalink": "elixir-snuff-macaw-resale", "time": "2024-11-18 06:57:18.833717", "cmd": 1} {"id": 23680, "parent": 23679, "code": "\n// open util/integer\n\nsig AcademicYear{\n semesters: some semesters,\n rollNumber: one Int\n}\nsig Semester {}\nsig Student {}\nsig Course {}\nsig Fee {}", "permalink": "wanted-deduce-hertz-hazy", "time": "2024-11-18 06:57:49.650469", "cmd": 1} {"id": 23681, "parent": 23680, "code": "\n// open util/integer\n\nsig AcademicYear{\n semesters: some Semester,\n rollNumber: one Int\n}\nsig Semester {}\nsig Student {}\nsig Course {}\nsig Fee {}", "permalink": "crib-nerd-jam-iodine", "time": "2024-11-18 06:57:57.275660", "cmd": 1} {"id": 23682, "parent": 4212, "code": "sig AcademicYear{\nroll_num: one Int\n}\nsig Semester{\n\n}", "permalink": "silk-karma-going-reggae", "time": "2024-11-18 06:59:01.561766", "cmd": 1} {"id": 23683, "parent": 23681, "code": "\nsig AcademicYear{\n semesters: some Semester,\n rollNumber: one Int\n}\nsig Semester {}\nsig Student {}\nsig Course {}\nsig Fee {}", "permalink": "wimp-wing-judge-flame", "time": "2024-11-18 06:59:48.426401", "cmd": 1} {"id": 23684, "parent": 23682, "code": "sig AcademicYear{\nroll_num: one Int\n}", "permalink": "eleven-fridge-recede-ouch", "time": "2024-11-18 07:00:05.078940", "cmd": 1} {"id": 23685, "parent": 23683, "code": "\nsig AcademicYear{\n semesters: some Semester,\n}\n\n\nsig Semester {\n duration: one Int, \n isOptional: one Bool, \n startDate: one Int, // in terms of weeks\n endDate: one Int\n}\nsig Summer extends Semester{}\nsig Fall extends Semester{}\nsig Spring extends Semester{}\n\n\nsig Student {\n rollNumber: one Int,\n attendance: some Attendance,\n aid: one Bool, \n academicWarning: one Int,\n numFrozenSem: one Int\n}\n\nenum Medium { \n English, \n urdu, \n other\n}\n\nsig Course {\n medium: one Enum, \n\n}\n\nsig Attendance {\n enrolledCourse: one Course,\n totalClassesAttended: one Int, // Total classes attended by the student\n totalClasses: one Int // Total classes for the course\n}\n\nenum FeeType {\n freeze, \n tuition\n}\nsig Fee {\n type: one FeeType,\n amount: one Int\n}\n\n", "permalink": "usher-huff-runny-timing", "time": "2024-11-18 07:41:59.379404", "cmd": 1} {"id": 23686, "parent": 23685, "code": "\nabstract sig Bool {}\none sig True extends Bool {}\none sig False extends Bool {}\n\n\nsig AcademicYear{\n semesters: some Semester,\n}\n\n\nsig Semester {\n duration: one Int, \n isOptional: one Bool, \n startDate: one Int, // in terms of weeks\n endDate: one Int\n}\nsig Summer extends Semester{}\nsig Fall extends Semester{}\nsig Spring extends Semester{}\n\n\nsig Student {\n rollNumber: one Int,\n attendance: some Attendance,\n aid: one Bool, \n academicWarning: one Int,\n numFrozenSem: one Int\n}\n\nenum Medium { \n English, \n urdu, \n other\n}\n\nsig Course {\n medium: one Enum, \n\n}\n\nsig Attendance {\n enrolledCourse: one Course,\n totalClassesAttended: one Int, // Total classes attended by the student\n totalClasses: one Int // Total classes for the course\n}\n\nenum FeeType {\n freeze, \n tuition\n}\nsig Fee {\n type: one FeeType,\n amount: one Int\n}\n\n", "permalink": "gooey-heap-proved-swipe", "time": "2024-11-18 07:43:59.400557", "cmd": 1} {"id": 23741, "parent": 23687, "code": "\nabstract sig Bool {}\none sig True extends Bool {}\none sig False extends Bool {}\n\n\nsig AcademicYear{\n semesters: some Semester,\n}\n\n\nsig Semester {\n duration: one Int, \n isOptional: one Bool, \n startDate: one Int, // in terms of weeks\n endDate: one Int\n}\nsig Summer extends Semester{}\nsig Fall extends Semester{}\nsig Spring extends Semester{}\n\n\nsig Student {\n rollNumber: one Int,\n attendance: some Attendance,\n aid: one Bool, \n academicWarning: one Int,\n numFrozenSem: one Int\n}\n\nenum Medium { \n English, \n urdu, \n other\n}\n\nsig Course {\n medium: one Medium, \n\n}\n\nsig Attendance {\n enrolledCourse: one Course,\n totalClassesAttended: one Int, // Total classes attended by the student\n totalClasses: one Int // Total classes for the course\n}\n\nenum FeeType {\n freeze, \n tuition\n}\nsig Fee {\n type: one FeeType,\n amount: one Int\n}\n\n", "permalink": "idiocy-secret-abide-filter", "time": "2024-11-18 14:13:09.293994", "cmd": 1} {"id": 23687, "parent": 23686, "code": "\nabstract sig Bool {}\none sig True extends Bool {}\none sig False extends Bool {}\n\n\nsig AcademicYear{\n semesters: some Semester,\n}\n\n\nsig Semester {\n duration: one Int, \n isOptional: one Bool, \n startDate: one Int, // in terms of weeks\n endDate: one Int\n}\nsig Summer extends Semester{}\nsig Fall extends Semester{}\nsig Spring extends Semester{}\n\n\nsig Student {\n rollNumber: one Int,\n attendance: some Attendance,\n aid: one Bool, \n academicWarning: one Int,\n numFrozenSem: one Int\n}\n\nenum Medium { \n English, \n urdu, \n other\n}\n\nsig Course {\n medium: one Medium, \n\n}\n\nsig Attendance {\n enrolledCourse: one Course,\n totalClassesAttended: one Int, // Total classes attended by the student\n totalClasses: one Int // Total classes for the course\n}\n\nenum FeeType {\n freeze, \n tuition\n}\nsig Fee {\n type: one FeeType,\n amount: one Int\n}\n\n", "permalink": "winter-veggie-dime-mardi", "time": "2024-11-18 07:44:06.541625", "cmd": 1} {"id": 23732, "parent": null, "code": "//Anum Batool (anonymized)\n\n//***** Signatures *****//\n//Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\nsig Semester{}\nabstract sig Spring, Summer, Fall extends Semester {}\n\n\n//***** Facts and Assertions *****//", "permalink": "utopia-edging-deface-emit", "time": "2024-11-18 13:55:00.108577", "cmd": 1} {"id": 23733, "parent": 23732, "code": "//Anum Batool (anonymized)\n\n//***** Signatures *****//\n//Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester\nsig Semester{}\nabstract sig Spring, Summer, Fall extends Semester {}\n\n\n//***** Facts and Assertions *****//\n//Academic Year Constraint\nfact AcademicYearConstraint {\n all ay:AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 \n #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}", "permalink": "musky-flap-domain-trophy", "time": "2024-11-18 14:01:38.422229", "cmd": 1} {"id": 23734, "parent": 23733, "code": "//Anum Batool (anonymized)\n\n//***** Signatures *****//\n//Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester\nsig Semester{}\nabstract sig Spring, Summer, Fall extends Semester {}\n\n\n//***** Facts and Assertions *****//\n//Academic Year Constraint\nfact AcademicYearConstraint {\n all ay:AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 \n #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\nrun {} for 5", "permalink": "bluff-spiny-musket-mobile", "time": "2024-11-18 14:02:29.342979", "cmd": 1} {"id": 23735, "parent": 23734, "code": "//Anum Batool (anonymized)\n\n//***** Signatures *****//\n//Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester\nsig Semester{}\nabstract sig Spring, Summer, Fall extends Semester {}\n\n\n//***** Facts and Assertions *****//\n//Academic Year Constraint\nfact AcademicYearConstraint {\n all ay:AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 \n #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\nrun {} for 3", "permalink": "jackal-gazing-ipad-widely", "time": "2024-11-18 14:02:38.337198", "cmd": 1} {"id": 23740, "parent": 23739, "code": "//Anum Batool (anonymized)\n\n//***** Signatures *****//\n//Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester\nsig Semester{}\nabstract sig Spring, Summer, Fall extends Semester {}\n\n\n//***** Facts and Assertions *****//\n//Academic Year Constraint\nfact AcademicYearConstraint {\n all ay:AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 \n #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\nrun {} ", "permalink": "brush-slip-tulip-aids", "time": "2024-11-18 14:06:33.281537", "cmd": 1} {"id": 23737, "parent": 23736, "code": "//Anum Batool (anonymized)\n\n//***** Signatures *****//\n//Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester\nsig Semester{}\nabstract sig Spring, Summer, Fall extends Semester {}\n\n\n//***** Facts and Assertions *****//\n//Academic Year Constraint\nfact AcademicYearConstraint {\n all ay:AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 \n #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\nrun {} ", "permalink": "nephew-shape-plus-sample", "time": "2024-11-18 14:03:10.548465", "cmd": 1} {"id": 23736, "parent": 23735, "code": "//Anum Batool (anonymized)\n\n//***** Signatures *****//\n//Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester\nsig Semester{}\nabstract sig Spring, Summer, Fall extends Semester {}\n\n\n//***** Facts and Assertions *****//\n//Academic Year Constraint\nfact AcademicYearConstraint {\n all ay:AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 \n #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\nrun {} ", "permalink": "macaw-salami-chaps-snort", "time": "2024-11-18 14:03:03.568963", "cmd": 1} {"id": 23738, "parent": 23737, "code": "//Anum Batool (anonymized)\n\n//***** Signatures *****//\n//Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester\nsig Semester{}\nabstract sig Spring, Summer, Fall extends Semester {}\n\n\n//***** Facts and Assertions *****//\n//Academic Year Constraint\nfact AcademicYearConstraint {\n all ay:AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 \n #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\nrun {} ", "permalink": "poncho-chest-wharf-unfair", "time": "2024-11-18 14:03:20.640280", "cmd": 1} {"id": 23739, "parent": 23738, "code": "//Anum Batool (anonymized)\n\n//***** Signatures *****//\n//Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester\nsig Semester{}\nabstract sig Spring, Summer, Fall extends Semester {}\n\n\n//***** Facts and Assertions *****//\n//Academic Year Constraint\nfact AcademicYearConstraint {\n all ay:AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\nrun {} ", "permalink": "dainty-banana-maker-golf", "time": "2024-11-18 14:03:50.831799", "cmd": 1} {"id": 23743, "parent": 23740, "code": "//Anum Batool (anonymized)\n\n//***** Signatures *****//\n//Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester\nsig Semester{\n duration: Int //weeks\n startDate: Int //nth day of the year\n endDate: Int //nth day of the year\n courses: some Course //offered in a semester\n}\nabstract sig Spring, Summer, Fall extends Semester {}\n\n//Course\nsig Course {}\n\n//***** Facts and Assertions *****//\n//Academic Year Constraint\nfact AcademicYearConstraint {\n all ay:AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 \n #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\nrun {} ", "permalink": "wharf-flyer-aspect-halved", "time": "2024-11-18 14:20:15.613708", "cmd": 1} {"id": 23744, "parent": 23743, "code": "//Anum Batool (anonymized)\n\n//***** Signatures *****//\n//Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester\nsig Semester{\n duration: Int, //weeks\n startDate: Int, //nth day of the year\n endDate: Int, //nth day of the year\n courses: some Course //offered in a semester\n}\nabstract sig Spring, Summer, Fall extends Semester {}\n\n//Course\nsig Course {}\n\n//***** Facts and Assertions *****//\n//Academic Year Constraint\nfact AcademicYearConstraint {\n all ay:AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 \n #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\nrun {} ", "permalink": "affair-ascent-guru-graves", "time": "2024-11-18 14:20:27.958414", "cmd": 1} {"id": 23745, "parent": 23647, "code": "sig Book {}\nsig Person { borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all br: person | lone br.borrowedBooks }\npred borrowBook(br: person, b: Book) { b in br.borrowedBooks }\nrun { some br: person, b: Book | b in br.borrowedBooks } for 3 Book, 3 Borrower\ncheck NoDuplicateBorrowing", "permalink": "canon-city-robust-mop", "time": "2024-11-18 14:25:22.652673", "cmd": 1} {"id": 23746, "parent": 23744, "code": "//Anum Batool (anonymized)\n\n//***** Signatures *****//\n//Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester\nsig Semester{\n duration: Int, //weeks\n startDate: Int, //nth day of the year\n endDate: Int, //nth day of the year\n courses: some Course //offered in a semester\n}\nabstract sig Spring, Summer, Fall extends Semester {}\n\n//Course\nsig Course {}\n\n//***** Facts and Assertions *****//\n//Academic Year Constraint\nfact AcademicYearConstraint {\n all ay:AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 \n #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\n//Semester constraints\nfact SemesterDateConstraints {\n //Duration Constraints\n all s: Semester | s.endDate > s.startDate\n all s: Spring + Fall | s.duration = 17\n all s: Summer | s.duration = 8 \n\n //Summer constraint June to July\n //June to July happens from day 151 to 180\n all s: Summer | s.startDate >= 151 && s.endDate <= 180\n //doesnt explicity say when fall and spring semesters happen but Ill add the constraint\n all s:Spring | s.startDate >= 17 && s.endDate <= 140\n all s:Fall | s.startDate >= 190 && s.endDate <= 365\n}\n\nrun {} ", "permalink": "poplar-crock-unless-motto", "time": "2024-11-18 14:26:56.999334", "cmd": 1} {"id": 23747, "parent": 23746, "code": "//Anum Batool (anonymized)\n\n//***** Signatures *****//\n//Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester\nabstract sig Semester{\n duration: Int, //weeks\n startDate: Int, //nth day of the year\n endDate: Int, //nth day of the year\n courses: some Course //offered in a semester\n}\nsig Spring, Summer, Fall extends Semester {}\n\n//Course\nsig Course {}\n\n//***** Facts and Assertions *****//\n//Academic Year Constraint\nfact AcademicYearConstraint {\n all ay:AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 \n #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\n//Semester constraints\nfact SemesterDateConstraints {\n //Duration Constraints\n all s: Semester | s.endDate > s.startDate\n all s: Spring + Fall | s.duration = 17\n all s: Summer | s.duration = 8 \n\n //Summer constraint June to July\n //June to July happens from day 151 to 180\n all s: Summer | s.startDate >= 151 && s.endDate <= 180\n //doesnt explicity say when fall and spring semesters happen but Ill add the constraint\n all s:Spring | s.startDate >= 17 && s.endDate <= 140\n all s:Fall | s.startDate >= 190 && s.endDate <= 365\n}\n\nrun {} ", "permalink": "payday-primal-angles-antler", "time": "2024-11-18 14:27:55.403336", "cmd": 1} {"id": 23748, "parent": 23747, "code": "//Anum Batool (anonymized)\n\n//***** Signatures *****//\n//Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester\nabstract sig Semester{\n duration: Int, //weeks\n startDate: Int, //nth day of the year\n endDate: Int, //nth day of the year\n //courses: some Course //offered in a semester\n}\nsig Spring, Summer, Fall extends Semester {}\n\n//Course\n//sig Course {}\n\n//***** Facts and Assertions *****//\n//Academic Year Constraint\nfact AcademicYearConstraint {\n all ay:AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 \n #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\n//Semester constraints\nfact SemesterDateConstraints {\n //Duration Constraints\n all s: Semester | s.endDate > s.startDate\n all s: Spring + Fall | s.duration = 17\n all s: Summer | s.duration = 8 \n\n //Summer constraint June to July\n //June to July happens from day 151 to 180\n all s: Summer | s.startDate >= 151 && s.endDate <= 180\n //doesnt explicity say when fall and spring semesters happen but Ill add the constraint\n all s:Spring | s.startDate >= 17 && s.endDate <= 140\n all s:Fall | s.startDate >= 190 && s.endDate <= 365\n}\n\nrun {} ", "permalink": "script-junkie-garnet-alias", "time": "2024-11-18 14:28:25.131615", "cmd": 1} {"id": 23749, "parent": 23745, "code": "sig Book {}\nsig Person { borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all br: Person | lone br.borrowedBooks }\npred borrowBook(br: Person, b: Book) { b in br.borrowedBooks }\nrun { some P: Person, b: Book | b in br.borrowedBooks } for 3 Book, 3 Borrower\ncheck NoDuplicateBorrowing", "permalink": "unroll-treat-badly-print", "time": "2024-11-18 14:28:35.182095", "cmd": 1} {"id": 23750, "parent": 23749, "code": "sig Book {}\nsig Person { borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all br: Person | lone br.borrowedBooks }\npred borrowBook(br: Person, b: Book) { b in br.borrowedBooks }\nrun { some P: Person, b: Book | b in P.borrowedBooks } for 3 Book, 3 Borrower\ncheck NoDuplicateBorrowing", "permalink": "strode-attest-skies-skid", "time": "2024-11-18 14:28:46.812715", "cmd": 1} {"id": 23751, "parent": 23748, "code": "//Anum Batool (anonymized)\n\n//***** Signatures *****//\n//Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester\nabstract sig Semester{\n duration: Int, //weeks\n startDate: Int, //nth day of the year\n endDate: Int, //nth day of the year\n //courses: some Course //offered in a semester\n}\nsig Spring, Summer, Fall extends Semester {}\n\n//Course\n//sig Course {}\n\n//***** Facts and Assertions *****//\n//Academic Year Constraint\nfact AcademicYearConstraint {\n all ay:AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 \n #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\n//Semester constraints\nfact SemesterDateConstraints {\n //Duration Constraints\n all s: Semester | s.endDate > s.startDate\n all s: Spring + Fall | s.duration = 17\n all s: Summer | s.duration = 8 \n\n //Summer constraint June to July\n //June to July happens from day 151 to 180\n all s: Summer | s.startDate >= 151 and s.endDate <= 180\n //doesnt explicity say when fall and spring semesters happen but Ill add the constraint\n all s:Spring | s.startDate >= 17 and s.endDate <= 140\n all s:Fall | s.startDate >= 190 and s.endDate <= 365\n}\n\nrun {} ", "permalink": "cried-prissy-tidy-croon", "time": "2024-11-18 14:29:01.702228", "cmd": 1} {"id": 23752, "parent": 23750, "code": "sig Book {}\nsig Person { borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all br: Person | lone br.borrowedBooks }\npred borrowBook(br: Person, b: Book) { b in br.borrowedBooks }\nrun { some P: Person, b: Book | b in P.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "willow-pelt-duffel-snub", "time": "2024-11-18 14:29:07.263328", "cmd": 1} {"id": 23757, "parent": 23756, "code": "//Anum Batool (anonymized)\n\n//***** Signatures *****//\n//Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester\nabstract sig Semester{\n duration: Int, //weeks\n startDate: Int, //nth day of the year\n endDate: Int, //nth day of the year\n //courses: some Course //offered in a semester\n}\nsig Spring, Summer, Fall extends Semester {}\n\n//Course\n//sig Course {}\n\n//***** Facts and Assertions *****//\n//Academic Year Constraint\nfact AcademicYearConstraint {\n all ay:AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 \n #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\n//Semester constraints\nfact SemesterDateConstraints {\n //Duration Constraints\n all s: Semester | s.endDate > s.startDate\n all s: Spring + Fall | s.duration = 17\n all s: Summer | s.duration = 8 \n\n //Summer constraint June to July\n //June to July happens from day 151 to 180\n all s: Summer | s.startDate >= 151 and s.endDate <= 180\n //doesnt explicity say when fall and spring semesters happen but Ill add the constraint\n all s:Spring | s.startDate >= 17 and s.endDate <= 140\n all s:Fall | s.startDate >= 190 and s.endDate <= 365\n}\n\nrun {} for 5", "permalink": "action-pleat-tarmac-cadet", "time": "2024-11-18 14:34:12.803424", "cmd": 1} {"id": 23754, "parent": 23753, "code": "//Anum Batool (anonymized)\n\n//***** Signatures *****//\n//Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester\nabstract sig Semester{\n duration: Int, //weeks\n startDate: Int, //nth day of the year\n endDate: Int, //nth day of the year\n //courses: some Course //offered in a semester\n}\nsig Spring, Summer, Fall extends Semester {}\n\n//Course\n//sig Course {}\n\n//***** Facts and Assertions *****//\n//Academic Year Constraint\nfact AcademicYearConstraint {\n all ay:AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 \n #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\n//Semester constraints\nfact SemesterDateConstraints {\n //Duration Constraints\n all s: Semester | s.endDate > s.startDate\n all s: Spring + Fall | s.duration = 17\n all s: Summer | s.duration = 8 \n\n //Summer constraint June to July\n //June to July happens from day 151 to 180\n all s: Summer | s.startDate >= 151 and s.endDate <= 180\n //doesnt explicity say when fall and spring semesters happen but Ill add the constraint\n all s:Spring | s.startDate >= 17 and s.endDate <= 140\n all s:Fall | s.startDate >= 190 and s.endDate <= 365\n}\n\nrun {} for 5", "permalink": "study-carrot-comfy-wispy", "time": "2024-11-18 14:29:19.642204", "cmd": 1} {"id": 23753, "parent": 23751, "code": "//Anum Batool (anonymized)\n\n//***** Signatures *****//\n//Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester\nabstract sig Semester{\n duration: Int, //weeks\n startDate: Int, //nth day of the year\n endDate: Int, //nth day of the year\n //courses: some Course //offered in a semester\n}\nsig Spring, Summer, Fall extends Semester {}\n\n//Course\n//sig Course {}\n\n//***** Facts and Assertions *****//\n//Academic Year Constraint\nfact AcademicYearConstraint {\n all ay:AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 \n #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\n//Semester constraints\nfact SemesterDateConstraints {\n //Duration Constraints\n all s: Semester | s.endDate > s.startDate\n all s: Spring + Fall | s.duration = 17\n all s: Summer | s.duration = 8 \n\n //Summer constraint June to July\n //June to July happens from day 151 to 180\n all s: Summer | s.startDate >= 151 and s.endDate <= 180\n //doesnt explicity say when fall and spring semesters happen but Ill add the constraint\n all s:Spring | s.startDate >= 17 and s.endDate <= 140\n all s:Fall | s.startDate >= 190 and s.endDate <= 365\n}\n\nrun {} for 5", "permalink": "guts-pluck-hazard-jeep", "time": "2024-11-18 14:29:16.375751", "cmd": 1} {"id": 23755, "parent": 23752, "code": "sig Book {}\nsig Person { borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all br: Person | lone br.borrowedBooks }\npred borrowBook(br: Person, b: Book) { b in br.borrowedBooks }\nfun totalBooksBorrowed: Int {\n #Book - #({b: Book | no b.~borrowedBooks})\nrun { some P: Person, b: Book | b in P.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "roving-retake-upward-liver", "time": "2024-11-18 14:33:54.816747", "cmd": 1} {"id": 23756, "parent": 23754, "code": "//Anum Batool (anonymized)\n\n//***** Signatures *****//\n//Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester\nabstract sig Semester{\n duration: Int, //weeks\n startDate: Int, //nth day of the year\n endDate: Int, //nth day of the year\n //courses: some Course //offered in a semester\n}\nsig Spring, Summer, Fall extends Semester {}\n\n//Course\n//sig Course {}\n\n//***** Facts and Assertions *****//\n//Academic Year Constraint\nfact AcademicYearConstraint {\n all ay:AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 \n #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\n\n\nrun {} for 5", "permalink": "grape-latch-pawing-output", "time": "2024-11-18 14:33:56.168943", "cmd": 1} {"id": 23758, "parent": 23755, "code": "sig Book {}\nsig Person { borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all br: Person | lone br.borrowedBooks }\npred borrowBook(br: Person, b: Book) { b in br.borrowedBooks }\nfun totalBooksBorrowed: Int {\n #Book - #({b: Book | no b.~borrowedBooks})\n}\nrun { some P: Person, b: Book | b in P.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "spent-repave-embark-basis", "time": "2024-11-18 14:34:27.681459", "cmd": 1} {"id": 23759, "parent": 23757, "code": "//Anum Batool (anonymized)\n\n//***** Signatures *****//\n//Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester\nabstract sig Semester{\n duration: Int, //weeks\n startDate: Int, //nth day of the year\n endDate: Int, //nth day of the year\n //courses: some Course //offered in a semester\n}\nsig Spring, Summer, Fall extends Semester {}\n\n//Course\n//sig Course {}\n\n//***** Facts and Assertions *****//\n//Academic Year Constraint\nfact AcademicYearConstraint {\n all ay:AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 \n #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\n//Semester constraints\nfact SemesterDateConstraints {\n //Duration Constraints\n all s: Semester | s.endDate > s.startDate\n all s: Spring + Fall | s.duration = 17\n all s: Summer | s.duration = 8 \n\n \n}\n\nrun {} for 5", "permalink": "gnat-scenic-amiss-tiny", "time": "2024-11-18 14:34:54.852404", "cmd": 1} {"id": 23760, "parent": 23758, "code": "sig Book {}\nsig Person { borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all P: Person | lone P.borrowedBooks }\npred borrowBook(P: Person, b: Book) { b in P.borrowedBooks }\nfun totalBooksBorrowed: Int {\n #Book - #({b: Book | no b.~borrowedBooks})\n}\nrun { some P: Person, b: Book | b in P.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "prozac-glory-await-wasp", "time": "2024-11-18 14:36:44.246536", "cmd": 1} {"id": 23761, "parent": 23759, "code": "//Anum Batool (anonymized)\n\n//***** Signatures *****//\n//Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester\nabstract sig Semester{\n duration: Int, //weeks\n startDate: Int, //nth day of the year\n endDate: Int, //nth day of the year\n //courses: some Course //offered in a semester\n}\nsig Spring, Summer, Fall extends Semester {}\n\n//Course\n//sig Course {}\n\n//***** Facts and Assertions *****//\n//Academic Year Constraint\nfact AcademicYearConstraint {\n all ay:AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 \n #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\n//Semester constraints\nfact SemesterDateConstraints {\n //Duration Constraints\n all s: Semester | s.endDate > s.startDate\n all s: Spring + Fall | s.duration = 17\n all s: Summer | s.duration = 8 \n\n //Summer constraint June to July\n all s: Summer | s.startDate >= 151 and s.endDate <= 180\n}\n\n\n\nrun {} for 5", "permalink": "unzip-frisk-pry-shady", "time": "2024-11-18 14:36:52.191021", "cmd": 1} {"id": 23762, "parent": 23761, "code": "//Anum Batool (anonymized)\n\n//***** Signatures *****//\n//Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester\nabstract sig Semester{\n duration: Int, //weeks\n startDate: Int, //nth day of the year\n endDate: Int, //nth day of the year\n //courses: some Course //offered in a semester\n}\nsig Spring, Summer, Fall extends Semester {}\n\n//Course\n//sig Course {}\n\n//***** Facts and Assertions *****//\n//Academic Year Constraint\nfact AcademicYearConstraint {\n all ay:AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 \n #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\n//Semester constraints\nfact SemesterDateConstraints {\n //Duration Constraints\n all s: Semester | s.endDate > s.startDate\n all s: Spring + Fall | s.duration = 17\n all s: Summer | s.duration = 8 \n}\n\nrun {} ", "permalink": "voice-lid-canine-motto", "time": "2024-11-18 14:38:17.128014", "cmd": 1} {"id": 23763, "parent": 23741, "code": "\n// abstract sig Bool {}\n// one sig True extends Bool {}\n// one sig False extends Bool {}\n\n\n// sig AcademicYear{\n// semesters: some Semester,\n// }\n\n\n// sig Semester {\n// duration: one Int, \n// isOptional: one Bool, \n// startDate: one Int, // in terms of weeks\n// endDate: one Int\n// }\n// sig Summer extends Semester{}\n// sig Fall extends Semester{}\n// sig Spring extends Semester{}\n\n\n// sig Student {\n// rollNumber: one Int,\n// attendance: some Attendance,\n// aid: one Bool, \n// academicWarning: one Int,\n// numFrozenSem: one Int\n// }\n\n// enum Medium { \n// English, \n// urdu, \n// other\n// }\n\n// sig Course {\n// medium: one Medium, \n\n// }\n\n// sig Attendance {\n// enrolledCourse: one Course,\n// totalClassesAttended: one Int, // Total classes attended by the student\n// totalClasses: one Int // Total classes for the course\n// }\n\n// enum FeeType {\n// freeze, \n// tuition\n// }\n// sig Fee {\n// type: one FeeType,\n// amount: one Int\n// }\n\n\n// // Facts \n// fact SemesterDurations {\n// all s: Spring + Fall | s.duration = 17\n// all s: Summer | s.duration = 8\n// }\n\n// fact startVsEnd {\n// all s: Semester | s.startDate < s.endDate\n// }\n\n// fact AcademicYearSemesterCount {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3\n// }\n\n\n// fact UniqueRollNumber {\n// all s1, s2: Student | s1 != s2 => s1.rollNumber != s2.rollNumber\n// }\n\n// fact attendancePolicy { \n// all s: Student | all a: s.attendance |\n// a.totalClassesAttended <= a.totalClasses \n// and a.totalClassesAttended * 100 / a.totalClasses >= 80\n// }\n\n\n// Existing signatures\nabstract sig Bool {}\none sig True extends Bool {}\none sig False extends Bool {}\n\nsig AcademicYear {\n semesters: some Semester,\n}\n\nsig Semester {\n duration: one Int,\n isOptional: one Bool,\n startDate: one Int, // in terms of weeks\n endDate: one Int\n}\nsig Summer extends Semester {}\nsig Fall extends Semester {}\nsig Spring extends Semester {}\n\nsig Student {\n rollNumber: one Int,\n attendance: some Attendance,\n aid: one Bool, \n academicWarning: one Int,\n numFrozenSem: one Int,\n enrolledProgram: one Program,\n feesPaid: set Fee\n}\n\nenum Medium { \n English, \n urdu, \n other\n}\n\nsig Course {\n medium: one Medium,\n offeredIn: some Semester,\n prerequisites: set Course\n}\n\nsig Attendance {\n enrolledCourse: one Course,\n totalClassesAttended: one Int, // Total classes attended by the student\n totalClasses: one Int // Total classes for the course\n}\n\nenum FeeType {\n freeze, \n tuition\n}\n\nsig Fee {\n type: one FeeType,\n amount: one Int\n}\n\nsig Program {}\n\n// Existing facts\nfact SemesterDurations {\n all s: Spring + Fall | s.duration = 17\n all s: Summer | s.duration = 8\n}\n\nfact startVsEnd {\n all s: Semester | s.startDate < s.endDate\n}\n\nfact AcademicYearSemesterCount {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3\n}\n\nfact UniqueRollNumber {\n all s1, s2: Student | s1 != s2 => s1.rollNumber != s2.rollNumber\n}\n\n// Updated attendance policy\nfact attendancePolicy { \n all s: Student | all a: s.attendance |\n a.totalClassesAttended <= a.totalClasses \n and a.totalClassesAttended * 100 / a.totalClasses >= 80\n}\n\n// Financial aid rule\nfact financialAidCancellation {\n all s: Student | \n s.aid = True => s.academicWarning = 0\n}\n\n// Fall and Spring semester registration and fee rule\nfact registrationAndFee {\n all s: Student | \n some sem: Fall + Spring |\n FeeType.tuition in s.feesPaid.type and \n all f: s.feesPaid | f.amount > 0\n}\n\n// Freeze semester fee and limit\nfact freezeSemesterRules {\n all s: Student | \n s.numFrozenSem <= 2 and\n FeeType.freeze in s.feesPaid.type => \n all f: s.feesPaid | f.type = FeeType.freeze => f.amount = 11000\n}\n\n// Concurrent admission rule\nfact noConcurrentAdmission {\n all s1, s2: Student | \n s1 != s2 => s1.enrolledProgram != s2.enrolledProgram\n}\n\n// Adding courses rule\nfact courseAddition {\n all s: Student | all c: Course |\n c in s.attendance.enrolledCourse =>\n all prereq: c.prerequisites | prereq in s.attendance.enrolledCourse\n}", "permalink": "half-expose-fetal-unwary", "time": "2024-11-18 14:38:34.750834", "cmd": 1} {"id": 23764, "parent": 23763, "code": "\n// abstract sig Bool {}\n// one sig True extends Bool {}\n// one sig False extends Bool {}\n\n\n// sig AcademicYear{\n// semesters: some Semester,\n// }\n\n\n// sig Semester {\n// duration: one Int, \n// isOptional: one Bool, \n// startDate: one Int, // in terms of weeks\n// endDate: one Int\n// }\n// sig Summer extends Semester{}\n// sig Fall extends Semester{}\n// sig Spring extends Semester{}\n\n\n// sig Student {\n// rollNumber: one Int,\n// attendance: some Attendance,\n// aid: one Bool, \n// academicWarning: one Int,\n// numFrozenSem: one Int\n// }\n\n// enum Medium { \n// English, \n// urdu, \n// other\n// }\n\n// sig Course {\n// medium: one Medium, \n\n// }\n\n// sig Attendance {\n// enrolledCourse: one Course,\n// totalClassesAttended: one Int, // Total classes attended by the student\n// totalClasses: one Int // Total classes for the course\n// }\n\n// enum FeeType {\n// freeze, \n// tuition\n// }\n// sig Fee {\n// type: one FeeType,\n// amount: one Int\n// }\n\n\n// // Facts \n// fact SemesterDurations {\n// all s: Spring + Fall | s.duration = 17\n// all s: Summer | s.duration = 8\n// }\n\n// fact startVsEnd {\n// all s: Semester | s.startDate < s.endDate\n// }\n\n// fact AcademicYearSemesterCount {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3\n// }\n\n\n// fact UniqueRollNumber {\n// all s1, s2: Student | s1 != s2 => s1.rollNumber != s2.rollNumber\n// }\n\n// fact attendancePolicy { \n// all s: Student | all a: s.attendance |\n// a.totalClassesAttended <= a.totalClasses \n// and a.totalClassesAttended * 100 / a.totalClasses >= 80\n// }\n\n\n// Existing signatures\nabstract sig Bool {}\none sig True extends Bool {}\none sig False extends Bool {}\n\nsig AcademicYear {\n semesters: some Semester,\n}\n\nsig Semester {\n duration: one Int,\n isOptional: one Bool,\n startDate: one Int, // in terms of weeks\n endDate: one Int\n}\nsig Summer extends Semester {}\nsig Fall extends Semester {}\nsig Spring extends Semester {}\n\nsig Student {\n rollNumber: one Int,\n attendance: some Attendance,\n aid: one Bool, \n academicWarning: one Int,\n numFrozenSem: one Int,\n enrolledProgram: one Program,\n feesPaid: set Fee\n}\n\nenum Medium { \n English, \n urdu, \n other\n}\n\nsig Course {\n medium: one Medium,\n offeredIn: some Semester,\n prerequisites: set Course\n}\n\nsig Attendance {\n enrolledCourse: one Course,\n totalClassesAttended: one Int, // Total classes attended by the student\n totalClasses: one Int // Total classes for the course\n}\n\nenum FeeType {\n freeze, \n tuition\n}\n\nsig Fee {\n type: one FeeType,\n amount: one Int\n}\n\nsig Program {}\n\n// Existing facts\nfact SemesterDurations {\n all s: Spring + Fall | s.duration = 17\n all s: Summer | s.duration = 8\n}\n\nfact startVsEnd {\n all s: Semester | s.startDate < s.endDate\n}\n\nfact AcademicYearSemesterCount {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3\n}\n\nfact UniqueRollNumber {\n all s1, s2: Student | s1 != s2 => s1.rollNumber != s2.rollNumber\n}\n\n// Updated attendance policy\nfact attendancePolicy { \n all s: Student | all a: s.attendance |\n a.totalClassesAttended <= a.totalClasses and\n (a.totalClassesAttended * 100) >= (80 * a.totalClasses)\n}\n\n\n// Financial aid rule\nfact financialAidCancellation {\n all s: Student | \n s.aid = True => s.academicWarning = 0\n}\n\n// Fall and Spring semester registration and fee rule\nfact registrationAndFee {\n all s: Student | \n some sem: Fall + Spring |\n FeeType.tuition in s.feesPaid.type and \n all f: s.feesPaid | f.amount > 0\n}\n\n// Freeze semester fee and limit\nfact freezeSemesterRules {\n all s: Student | \n s.numFrozenSem <= 2 and\n FeeType.freeze in s.feesPaid.type => \n all f: s.feesPaid | f.type = FeeType.freeze => f.amount = 11000\n}\n\n// Concurrent admission rule\nfact noConcurrentAdmission {\n all s1, s2: Student | \n s1 != s2 => s1.enrolledProgram != s2.enrolledProgram\n}\n\n// Adding courses rule\nfact courseAddition {\n all s: Student | all c: Course |\n c in s.attendance.enrolledCourse =>\n all prereq: c.prerequisites | prereq in s.attendance.enrolledCourse\n}", "permalink": "perch-mating-wasp-puppet", "time": "2024-11-18 14:40:40.708725", "cmd": 1} {"id": 23765, "parent": 23764, "code": "\n// abstract sig Bool {}\n// one sig True extends Bool {}\n// one sig False extends Bool {}\n\n\n// sig AcademicYear{\n// semesters: some Semester,\n// }\n\n\n// sig Semester {\n// duration: one Int, \n// isOptional: one Bool, \n// startDate: one Int, // in terms of weeks\n// endDate: one Int\n// }\n// sig Summer extends Semester{}\n// sig Fall extends Semester{}\n// sig Spring extends Semester{}\n\n\n// sig Student {\n// rollNumber: one Int,\n// attendance: some Attendance,\n// aid: one Bool, \n// academicWarning: one Int,\n// numFrozenSem: one Int\n// }\n\n// enum Medium { \n// English, \n// urdu, \n// other\n// }\n\n// sig Course {\n// medium: one Medium, \n\n// }\n\n// sig Attendance {\n// enrolledCourse: one Course,\n// totalClassesAttended: one Int, // Total classes attended by the student\n// totalClasses: one Int // Total classes for the course\n// }\n\n// enum FeeType {\n// freeze, \n// tuition\n// }\n// sig Fee {\n// type: one FeeType,\n// amount: one Int\n// }\n\n\n// // Facts \n// fact SemesterDurations {\n// all s: Spring + Fall | s.duration = 17\n// all s: Summer | s.duration = 8\n// }\n\n// fact startVsEnd {\n// all s: Semester | s.startDate < s.endDate\n// }\n\n// fact AcademicYearSemesterCount {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3\n// }\n\n\n// fact UniqueRollNumber {\n// all s1, s2: Student | s1 != s2 => s1.rollNumber != s2.rollNumber\n// }\n\n// fact attendancePolicy { \n// all s: Student | all a: s.attendance |\n// a.totalClassesAttended <= a.totalClasses \n// and a.totalClassesAttended * 100 / a.totalClasses >= 80\n// }\n\n\n// Existing signatures\nabstract sig Bool {}\none sig True extends Bool {}\none sig False extends Bool {}\n\nsig AcademicYear {\n semesters: some Semester,\n}\n\nsig Semester {\n duration: one Int,\n isOptional: one Bool,\n startDate: one Int, // in terms of weeks\n endDate: one Int\n}\nsig Summer extends Semester {}\nsig Fall extends Semester {}\nsig Spring extends Semester {}\n\nsig Student {\n rollNumber: one Int,\n attendance: some Attendance,\n aid: one Bool, \n academicWarning: one Int,\n numFrozenSem: one Int,\n enrolledProgram: one Program,\n feesPaid: set Fee\n}\n\nenum Medium { \n English, \n urdu, \n other\n}\n\nsig Course {\n medium: one Medium,\n offeredIn: some Semester,\n prerequisites: set Course\n}\n\nsig Attendance {\n enrolledCourse: one Course,\n totalClassesAttended: one Int, // Total classes attended by the student\n totalClasses: one Int // Total classes for the course\n}\n\nenum FeeType {\n freeze, \n tuition\n}\n\nsig Fee {\n type: one FeeType,\n amount: one Int\n}\n\nsig Program {}\n\n// Existing facts\nfact SemesterDurations {\n all s: Spring + Fall | s.duration = 17\n all s: Summer | s.duration = 8\n}\n\nfact startVsEnd {\n all s: Semester | s.startDate < s.endDate\n}\n\nfact AcademicYearSemesterCount {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3\n}\n\nfact UniqueRollNumber {\n all s1, s2: Student | s1 != s2 => s1.rollNumber != s2.rollNumber\n}\n\n// Updated attendance policy\nfact attendancePolicy { \n all s: Student | all a: s.attendance |\n a.totalClassesAttended <= a.totalClasses and\n ((a.totalClassesAttended * 100) >= (80 * a.totalClasses))\n}\n\n\n// Financial aid rule\nfact financialAidCancellation {\n all s: Student | \n s.aid = True => s.academicWarning = 0\n}\n\n// Fall and Spring semester registration and fee rule\nfact registrationAndFee {\n all s: Student | \n some sem: Fall + Spring |\n FeeType.tuition in s.feesPaid.type and \n all f: s.feesPaid | f.amount > 0\n}\n\n// Freeze semester fee and limit\nfact freezeSemesterRules {\n all s: Student | \n s.numFrozenSem <= 2 and\n FeeType.freeze in s.feesPaid.type => \n all f: s.feesPaid | f.type = FeeType.freeze => f.amount = 11000\n}\n\n// Concurrent admission rule\nfact noConcurrentAdmission {\n all s1, s2: Student | \n s1 != s2 => s1.enrolledProgram != s2.enrolledProgram\n}\n\n// Adding courses rule\nfact courseAddition {\n all s: Student | all c: Course |\n c in s.attendance.enrolledCourse =>\n all prereq: c.prerequisites | prereq in s.attendance.enrolledCourse\n}", "permalink": "luster-turban-kindly-lent", "time": "2024-11-18 14:40:54.276532", "cmd": 1} {"id": 23766, "parent": 23765, "code": "\n// abstract sig Bool {}\n// one sig True extends Bool {}\n// one sig False extends Bool {}\n\n\n// sig AcademicYear{\n// semesters: some Semester,\n// }\n\n\n// sig Semester {\n// duration: one Int, \n// isOptional: one Bool, \n// startDate: one Int, // in terms of weeks\n// endDate: one Int\n// }\n// sig Summer extends Semester{}\n// sig Fall extends Semester{}\n// sig Spring extends Semester{}\n\n\n// sig Student {\n// rollNumber: one Int,\n// attendance: some Attendance,\n// aid: one Bool, \n// academicWarning: one Int,\n// numFrozenSem: one Int\n// }\n\n// enum Medium { \n// English, \n// urdu, \n// other\n// }\n\n// sig Course {\n// medium: one Medium, \n\n// }\n\n// sig Attendance {\n// enrolledCourse: one Course,\n// totalClassesAttended: one Int, // Total classes attended by the student\n// totalClasses: one Int // Total classes for the course\n// }\n\n// enum FeeType {\n// freeze, \n// tuition\n// }\n// sig Fee {\n// type: one FeeType,\n// amount: one Int\n// }\n\n\n// // Facts \n// fact SemesterDurations {\n// all s: Spring + Fall | s.duration = 17\n// all s: Summer | s.duration = 8\n// }\n\n// fact startVsEnd {\n// all s: Semester | s.startDate < s.endDate\n// }\n\n// fact AcademicYearSemesterCount {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3\n// }\n\n\n// fact UniqueRollNumber {\n// all s1, s2: Student | s1 != s2 => s1.rollNumber != s2.rollNumber\n// }\n\n// fact attendancePolicy { \n// all s: Student | all a: s.attendance |\n// a.totalClassesAttended <= a.totalClasses \n// and a.totalClassesAttended * 100 / a.totalClasses >= 80\n// }\n\n\n// Existing signatures\nabstract sig Bool {}\none sig True extends Bool {}\none sig False extends Bool {}\n\nsig AcademicYear {\n semesters: some Semester,\n}\n\nsig Semester {\n duration: one Int,\n isOptional: one Bool,\n startDate: one Int, // in terms of weeks\n endDate: one Int\n}\nsig Summer extends Semester {}\nsig Fall extends Semester {}\nsig Spring extends Semester {}\n\nsig Student {\n rollNumber: one Int,\n attendance: some Attendance,\n aid: one Bool, \n academicWarning: one Int,\n numFrozenSem: one Int,\n enrolledProgram: one Program,\n feesPaid: set Fee\n}\n\nenum Medium { \n English, \n urdu, \n other\n}\n\nsig Course {\n medium: one Medium,\n offeredIn: some Semester,\n prerequisites: set Course\n}\n\nsig Attendance {\n enrolledCourse: one Course,\n totalClassesAttended: one Int, // Total classes attended by the student\n totalClasses: one Int // Total classes for the course\n}\n\nenum FeeType {\n freeze, \n tuition\n}\n\nsig Fee {\n type: one FeeType,\n amount: one Int\n}\n\nsig Program {}\n\n// Existing facts\nfact SemesterDurations {\n all s: Spring + Fall | s.duration = 17\n all s: Summer | s.duration = 8\n}\n\nfact startVsEnd {\n all s: Semester | s.startDate < s.endDate\n}\n\nfact AcademicYearSemesterCount {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3\n}\n\nfact UniqueRollNumber {\n all s1, s2: Student | s1 != s2 => s1.rollNumber != s2.rollNumber\n}\n\nfact attendancePolicy { \n all s: Student | all a: s.attendance |\n a.totalClassesAttended <= a.totalClasses and\n (a.totalClassesAttended * 100) >= (80 * a.totalClasses)\n}\n\n\n\n// Financial aid rule\nfact financialAidCancellation {\n all s: Student | \n s.aid = True => s.academicWarning = 0\n}\n\n// Fall and Spring semester registration and fee rule\nfact registrationAndFee {\n all s: Student | \n some sem: Fall + Spring |\n FeeType.tuition in s.feesPaid.type and \n all f: s.feesPaid | f.amount > 0\n}\n\n// Freeze semester fee and limit\nfact freezeSemesterRules {\n all s: Student | \n s.numFrozenSem <= 2 and\n FeeType.freeze in s.feesPaid.type => \n all f: s.feesPaid | f.type = FeeType.freeze => f.amount = 11000\n}\n\n// Concurrent admission rule\nfact noConcurrentAdmission {\n all s1, s2: Student | \n s1 != s2 => s1.enrolledProgram != s2.enrolledProgram\n}\n\n// Adding courses rule\nfact courseAddition {\n all s: Student | all c: Course |\n c in s.attendance.enrolledCourse =>\n all prereq: c.prerequisites | prereq in s.attendance.enrolledCourse\n}", "permalink": "resale-ocelot-garage-said", "time": "2024-11-18 14:41:41.710679", "cmd": 1} {"id": 23767, "parent": 23766, "code": "\n// abstract sig Bool {}\n// one sig True extends Bool {}\n// one sig False extends Bool {}\n\n\n// sig AcademicYear{\n// semesters: some Semester,\n// }\n\n\n// sig Semester {\n// duration: one Int, \n// isOptional: one Bool, \n// startDate: one Int, // in terms of weeks\n// endDate: one Int\n// }\n// sig Summer extends Semester{}\n// sig Fall extends Semester{}\n// sig Spring extends Semester{}\n\n\n// sig Student {\n// rollNumber: one Int,\n// attendance: some Attendance,\n// aid: one Bool, \n// academicWarning: one Int,\n// numFrozenSem: one Int\n// }\n\n// enum Medium { \n// English, \n// urdu, \n// other\n// }\n\n// sig Course {\n// medium: one Medium, \n\n// }\n\n// sig Attendance {\n// enrolledCourse: one Course,\n// totalClassesAttended: one Int, // Total classes attended by the student\n// totalClasses: one Int // Total classes for the course\n// }\n\n// enum FeeType {\n// freeze, \n// tuition\n// }\n// sig Fee {\n// type: one FeeType,\n// amount: one Int\n// }\n\n\n// // Facts \n// fact SemesterDurations {\n// all s: Spring + Fall | s.duration = 17\n// all s: Summer | s.duration = 8\n// }\n\n// fact startVsEnd {\n// all s: Semester | s.startDate < s.endDate\n// }\n\n// fact AcademicYearSemesterCount {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3\n// }\n\n\n// fact UniqueRollNumber {\n// all s1, s2: Student | s1 != s2 => s1.rollNumber != s2.rollNumber\n// }\n\n// fact attendancePolicy { \n// all s: Student | all a: s.attendance |\n// a.totalClassesAttended <= a.totalClasses \n// and a.totalClassesAttended * 100 / a.totalClasses >= 80\n// }\n\n\n// Existing signatures\nabstract sig Bool {}\none sig True extends Bool {}\none sig False extends Bool {}\n\nsig AcademicYear {\n semesters: some Semester,\n}\n\nsig Semester {\n duration: one Int,\n isOptional: one Bool,\n startDate: one Int, // in terms of weeks\n endDate: one Int\n}\nsig Summer extends Semester {}\nsig Fall extends Semester {}\nsig Spring extends Semester {}\n\nsig Student {\n rollNumber: one Int,\n attendance: some Attendance,\n aid: one Bool, \n academicWarning: one Int,\n numFrozenSem: one Int,\n enrolledProgram: one Program,\n feesPaid: set Fee\n}\n\nenum Medium { \n English, \n urdu, \n other\n}\n\nsig Course {\n medium: one Medium,\n offeredIn: some Semester,\n prerequisites: set Course\n}\n\nsig Attendance {\n enrolledCourse: one Course,\n totalClassesAttended: one Int, // Total classes attended by the student\n totalClasses: one Int // Total classes for the course\n}\n\nenum FeeType {\n freeze, \n tuition\n}\n\nsig Fee {\n type: one FeeType,\n amount: one Int\n}\n\nsig Program {}\n\n// Existing facts\nfact SemesterDurations {\n all s: Spring + Fall | s.duration = 17\n all s: Summer | s.duration = 8\n}\n\nfact startVsEnd {\n all s: Semester | s.startDate < s.endDate\n}\n\nfact AcademicYearSemesterCount {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3\n}\n\nfact UniqueRollNumber {\n all s1, s2: Student | s1 != s2 => s1.rollNumber != s2.rollNumber\n}\n\nfact attendancePolicy { \n all s: Student | all a: s.attendance |\n a.totalClassesAttended <= a.totalClasses and\n (a.totalClassesAttended * 100/a.totalClasses) >= (80)\n}\n\n\n\n// Financial aid rule\nfact financialAidCancellation {\n all s: Student | \n s.aid = True => s.academicWarning = 0\n}\n\n// Fall and Spring semester registration and fee rule\nfact registrationAndFee {\n all s: Student | \n some sem: Fall + Spring |\n FeeType.tuition in s.feesPaid.type and \n all f: s.feesPaid | f.amount > 0\n}\n\n// Freeze semester fee and limit\nfact freezeSemesterRules {\n all s: Student | \n s.numFrozenSem <= 2 and\n FeeType.freeze in s.feesPaid.type => \n all f: s.feesPaid | f.type = FeeType.freeze => f.amount = 11000\n}\n\n// Concurrent admission rule\nfact noConcurrentAdmission {\n all s1, s2: Student | \n s1 != s2 => s1.enrolledProgram != s2.enrolledProgram\n}\n\n// Adding courses rule\nfact courseAddition {\n all s: Student | all c: Course |\n c in s.attendance.enrolledCourse =>\n all prereq: c.prerequisites | prereq in s.attendance.enrolledCourse\n}", "permalink": "only-oyster-bakery-policy", "time": "2024-11-18 14:42:29.833359", "cmd": 1} {"id": 23768, "parent": 23762, "code": "//Anum Batool (anonymized)\n\n//***** Signatures *****//\n//Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester\nabstract sig Semester{\n duration: Int, //weeks\n startDate: Int, //nth day of the year\n endDate: Int, //nth day of the year\n //courses: some Course //offered in a semester\n}\nsig Spring, Summer, Fall extends Semester {}\n\n//Course\n//sig Course {}\n\n//***** Facts and Assertions *****//\n//Academic Year Constraint\nfact AcademicYearConstraint {\n all ay:AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 \n #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\n//Semester constraints\nfact SemesterDateConstraints {\n //Duration Constraints\n all s: Semester | s.endDate > s.startDate\n all s: Spring + Fall | s.duration = 17\n all s: Summer | s.duration = 8 \n\n //Summer semester July to July date constraint\n all s:Summer | ValidSummerDay[s]\n}\n\npred ValidSummerDay [s: Summer] {\n s.startDate >= 151 && s.startDate <= 180\n}\n\nrun {} ", "permalink": "ream-gear-puppet-treble", "time": "2024-11-18 14:44:16.724661", "cmd": 1} {"id": 23777, "parent": 23768, "code": "//Anum Batool (anonymized)\n\n//***** Signatures *****//\n//Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester\nabstract sig Semester{\n duration: Int, //weeks\n startDate: Int, //nth day of the year\n endDate: Int, //nth day of the year\n //courses: some Course //offered in a semester\n}\nsig Spring, Summer, Fall extends Semester {}\n\n//Course\n//sig Course {}\n\n//***** Facts and Assertions *****//\n//Academic Year Constraint\nfact AcademicYearConstraint {\n all ay:AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 \n #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\n//Semester constraints\nfact SemesterDateConstraints {\n //Duration Constraints\n all s: Semester | s.endDate > s.startDate\n all s: Spring + Fall | s.duration = 17\n all s: Summer | s.duration = 8 \n\n //Summer semester July to July date constraint\n all s:Summer | ValidSummerDay[s]\n}\n\npred ValidSummerDay [s: Summer] {\n s.startDate >= 151 && s.startDate <= 180\n}\n\nrun {} ", "permalink": "crispy-spotty-carve-hazy", "time": "2024-11-18 14:52:26.587551", "cmd": 1} {"id": 23769, "parent": 23767, "code": "\n// abstract sig Bool {}\n// one sig True extends Bool {}\n// one sig False extends Bool {}\n\n\n// sig AcademicYear{\n// semesters: some Semester,\n// }\n\n\n// sig Semester {\n// duration: one Int, \n// isOptional: one Bool, \n// startDate: one Int, // in terms of weeks\n// endDate: one Int\n// }\n// sig Summer extends Semester{}\n// sig Fall extends Semester{}\n// sig Spring extends Semester{}\n\n\n// sig Student {\n// rollNumber: one Int,\n// attendance: some Attendance,\n// aid: one Bool, \n// academicWarning: one Int,\n// numFrozenSem: one Int\n// }\n\n// enum Medium { \n// English, \n// urdu, \n// other\n// }\n\n// sig Course {\n// medium: one Medium, \n\n// }\n\n// sig Attendance {\n// enrolledCourse: one Course,\n// totalClassesAttended: one Int, // Total classes attended by the student\n// totalClasses: one Int // Total classes for the course\n// }\n\n// enum FeeType {\n// freeze, \n// tuition\n// }\n// sig Fee {\n// type: one FeeType,\n// amount: one Int\n// }\n\n\n// // Facts \n// fact SemesterDurations {\n// all s: Spring + Fall | s.duration = 17\n// all s: Summer | s.duration = 8\n// }\n\n// fact startVsEnd {\n// all s: Semester | s.startDate < s.endDate\n// }\n\n// fact AcademicYearSemesterCount {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3\n// }\n\n\n// fact UniqueRollNumber {\n// all s1, s2: Student | s1 != s2 => s1.rollNumber != s2.rollNumber\n// }\n\n// fact attendancePolicy { \n// all s: Student | all a: s.attendance |\n// a.totalClassesAttended <= a.totalClasses \n// and a.totalClassesAttended * 100 / a.totalClasses >= 80\n// }\n\n\n// Existing signatures\nabstract sig Bool {}\none sig True extends Bool {}\none sig False extends Bool {}\n\nsig AcademicYear {\n semesters: some Semester,\n}\n\nsig Semester {\n duration: one Int,\n isOptional: one Bool,\n startDate: one Int, // in terms of weeks\n endDate: one Int\n}\nsig Summer extends Semester {}\nsig Fall extends Semester {}\nsig Spring extends Semester {}\n\nsig Student {\n rollNumber: one Int,\n attendance: some Attendance,\n aid: one Bool, \n academicWarning: one Int,\n numFrozenSem: one Int,\n enrolledProgram: one Program,\n feesPaid: set Fee\n}\n\nenum Medium { \n English, \n urdu, \n other\n}\n\nsig Course {\n medium: one Medium,\n offeredIn: some Semester,\n prerequisites: set Course\n}\n\nsig Attendance {\n enrolledCourse: one Course,\n totalClassesAttended: one Int, // Total classes attended by the student\n totalClasses: one Int // Total classes for the course\n}\n\nenum FeeType {\n freeze, \n tuition\n}\n\nsig Fee {\n type: one FeeType,\n amount: one Int\n}\n\nsig Program {}\n\n// Existing facts\nfact SemesterDurations {\n all s: Spring + Fall | s.duration = 17\n all s: Summer | s.duration = 8\n}\n\nfact startVsEnd {\n all s: Semester | s.startDate < s.endDate\n}\n\nfact AcademicYearSemesterCount {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3\n}\n\nfact UniqueRollNumber {\n all s1, s2: Student | s1 != s2 => s1.rollNumber != s2.rollNumber\n}\n\n\nfact attendancePolicy { \n all s: Student | all a: s.attendance |\n a.totalClassesAttended <= a.totalClasses \n and a.totalClassesAttended * 100 / a.totalClasses >= 80\n}\n\n// Financial aid rule\nfact financialAidCancellation {\n all s: Student | \n s.aid = True => s.academicWarning = 0\n}\n\n// Fall and Spring semester registration and fee rule\nfact registrationAndFee {\n all s: Student | \n some sem: Fall + Spring |\n FeeType.tuition in s.feesPaid.type and \n all f: s.feesPaid | f.amount > 0\n}\n\n// Freeze semester fee and limit\nfact freezeSemesterRules {\n all s: Student | \n s.numFrozenSem <= 2 and\n FeeType.freeze in s.feesPaid.type => \n all f: s.feesPaid | f.type = FeeType.freeze => f.amount = 11000\n}\n\n// Concurrent admission rule\nfact noConcurrentAdmission {\n all s1, s2: Student | \n s1 != s2 => s1.enrolledProgram != s2.enrolledProgram\n}\n\n// Adding courses rule\nfact courseAddition {\n all s: Student | all c: Course |\n c in s.attendance.enrolledCourse =>\n all prereq: c.prerequisites | prereq in s.attendance.enrolledCourse\n}", "permalink": "afraid-jersey-enable-acts", "time": "2024-11-18 14:44:24.564174", "cmd": 1} {"id": 23771, "parent": null, "code": "\n// abstract sig Bool {}\n// one sig True extends Bool {}\n// one sig False extends Bool {}\n\n\n// sig AcademicYear{\n// semesters: some Semester,\n// }\n\n\n// sig Semester {\n// duration: one Int, \n// isOptional: one Bool, \n// startDate: one Int, // in terms of weeks\n// endDate: one Int\n// }\n// sig Summer extends Semester{}\n// sig Fall extends Semester{}\n// sig Spring extends Semester{}\n\n\n// sig Student {\n// rollNumber: one Int,\n// attendance: some Attendance,\n// aid: one Bool, \n// academicWarning: one Int,\n// numFrozenSem: one Int\n// }\n\n// enum Medium { \n// English, \n// urdu, \n// other\n// }\n\n// sig Course {\n// medium: one Medium, \n\n// }\n\n// sig Attendance {\n// enrolledCourse: one Course,\n// totalClassesAttended: one Int, // Total classes attended by the student\n// totalClasses: one Int // Total classes for the course\n// }\n\n// enum FeeType {\n// freeze, \n// tuition\n// }\n// sig Fee {\n// type: one FeeType,\n// amount: one Int\n// }\n\n\n// // Facts \n// fact SemesterDurations {\n// all s: Spring + Fall | s.duration = 17\n// all s: Summer | s.duration = 8\n// }\n\n// fact startVsEnd {\n// all s: Semester | s.startDate < s.endDate\n// }\n\n// fact AcademicYearSemesterCount {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3\n// }\n\n\n// fact UniqueRollNumber {\n// all s1, s2: Student | s1 != s2 => s1.rollNumber != s2.rollNumber\n// }\n\n// fact attendancePolicy { \n// all s: Student | all a: s.attendance |\n// a.totalClassesAttended <= a.totalClasses \n// and a.totalClassesAttended * 100 / a.totalClasses >= 80\n// }\n\n\n// Existing signatures\nabstract sig Bool {}\none sig True extends Bool {}\none sig False extends Bool {}\n\nsig AcademicYear {\n semesters: some Semester,\n}\n\nsig Semester {\n duration: one Int,\n isOptional: one Bool,\n startDate: one Int, // in terms of weeks\n endDate: one Int\n}\nsig Summer extends Semester {}\nsig Fall extends Semester {}\nsig Spring extends Semester {}\n\nsig Student {\n rollNumber: one Int,\n attendance: some Attendance,\n aid: one Bool, \n academicWarning: one Int,\n numFrozenSem: one Int,\n enrolledProgram: one Program,\n feesPaid: set Fee\n}\n\nenum Medium { \n English, \n urdu, \n other\n}\n\nsig Course {\n medium: one Medium,\n offeredIn: some Semester,\n prerequisites: set Course\n}\n\nsig Attendance {\n enrolledCourse: one Course,\n totalClassesAttended: one Int, // Total classes attended by the student\n totalClasses: one Int // Total classes for the course\n}\n\nenum FeeType {\n freeze, \n tuition\n}\n\nsig Fee {\n type: one FeeType,\n amount: one Int\n}\n\nsig Program {}\n\n// Existing facts\nfact SemesterDurations {\n all s: Spring + Fall | s.duration = 17\n all s: Summer | s.duration = 8\n}\n\nfact startVsEnd {\n all s: Semester | s.startDate < s.endDate\n}\n\nfact AcademicYearSemesterCount {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3\n}\n\nfact UniqueRollNumber {\n all s1, s2: Student | s1 != s2 => s1.rollNumber != s2.rollNumber\n}\n\n\nfact attendancePolicy { \n all s: Student | all a: s.attendance |\n a.totalClassesAttended <= a.totalClasses \n and a.totalClassesAttended * 100 / a.totalClasses >= 80\n}\n\n// Financial aid rule\nfact financialAidCancellation {\n all s: Student | \n s.aid = True => s.academicWarning = 0\n}\n\n// Fall and Spring semester registration and fee rule\nfact registrationAndFee {\n all s: Student | \n some sem: Fall + Spring |\n FeeType.tuition in s.feesPaid.type and \n all f: s.feesPaid | f.amount > 0\n}\n\n// Freeze semester fee and limit\nfact freezeSemesterRules {\n all s: Student | \n s.numFrozenSem <= 2 and\n FeeType.freeze in s.feesPaid.type => \n all f: s.feesPaid | f.type = FeeType.freeze => f.amount = 11000\n}\n\n// Concurrent admission rule\nfact noConcurrentAdmission {\n all s1, s2: Student | \n s1 != s2 => s1.enrolledProgram != s2.enrolledProgram\n}\n\n// Adding courses rule\nfact courseAddition {\n all s: Student | all c: Course |\n c in s.attendance.enrolledCourse =>\n all prereq: c.prerequisites | prereq in s.attendance.enrolledCourse\n}", "permalink": "ozone-fresh-blimp-kept", "time": "2024-11-18 14:50:28.490373", "cmd": 1} {"id": 23770, "parent": 23760, "code": "sig Book {Id: one String}\nsig Person { borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all P: Person | lone P.borrowedBooks }\npred borrowBook(P: Person, b: Book) { b in P.borrowedBooks }\nfun totalBooksBorrowed: Int {\n #Book - #({b: Book | no b.~borrowedBooks})\n}\nrun { some P: Person, b: Book | b in P.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "vastly-blitz-street-emote", "time": "2024-11-18 14:49:16.732144", "cmd": 1} {"id": 23772, "parent": 23770, "code": "sig Book {Id: one String}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all P: Person | lone P.borrowedBooks }\npred borrowBook(P: Person, b: Book) { b in P.borrowedBooks }\nfun totalBooksBorrowed: Int {\n #Book - #({b: Book | no b.~borrowedBooks})\n}\nrun { some P: Person, b: Book | b in P.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "survey-bok-visor-treble", "time": "2024-11-18 14:51:36.000837", "cmd": 1} {"id": 23773, "parent": 23772, "code": "sig Book {Id: one String}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all P: Person | lone P.borrowedBooks }\npred borrowBook(P: Person, b: Book, I:Id) { b in P.borrowedBooks }\nfun totalBooksBorrowed: Int {\n #Book - #({b: Book | no b.~borrowedBooks})\n}\nrun { some P: Person, b: Book | b in P.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "rental-collie-pellet-saggy", "time": "2024-11-18 14:51:58.490532", "cmd": 1} {"id": 23774, "parent": 23773, "code": "sig Book {Id: one String}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all P: Person | lone P.borrowedBooks }\npred borrowBook(P: Person, b: Book, I:Id) { b in P.borrowedBooks }\nfun totalBooksBorrowed: Int {\n #Book - #({b: Book | no b.~borrowedBooks})\n}\nrun { some P: Person, b: Book | b in P.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "oasis-street-stool-quit", "time": "2024-11-18 14:51:59.954647", "cmd": 1} {"id": 23775, "parent": 23774, "code": "sig Book {Id: one String}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all P: Person | lone P.borrowedBooks }\npred borrowBook(P: Person, b: Book, I:Id) { b in P.borrowedBooks }\nfun totalBooksBorrowed: Int {\n #Book - #({b: Book | no b.~borrowedBooks})\n}\nrun { some P: Person, b: Book, I: Id| b in P.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "lucid-output-jaws-eraser", "time": "2024-11-18 14:52:19.197941", "cmd": 1} {"id": 23776, "parent": 23775, "code": "sig Book {Id: one String}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all P: Person | lone P.borrowedBooks }\npred borrowBook(P: Person, b: Book, I:Id) { b in P.borrowedBooks }\nfun totalBooksBorrowed: Int {\n #Book - #({b: Book | no b.~borrowedBooks})\n}\nrun { some P: Person, b: Book, I: Id| b in P.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "creed-wilder-plural-vanity", "time": "2024-11-18 14:52:20.785481", "cmd": 1} {"id": 23779, "parent": 23778, "code": "sig Book {Id: one String}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all P: Person | lone P.borrowedBooks.Id }\npred borrowBook(P: Person, b: Book, I:Id) { b in P.borrowedBooks }\nfun totalBooksBorrowed: Int {\n #Book - #({b: Book | no b.~borrowedBooks})\n}\nrun { some P: Person, b: Book, I: Id| b in P.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "coil-french-unless-dipper", "time": "2024-11-18 14:52:40.975239", "cmd": 1} {"id": 23778, "parent": 23776, "code": "sig Book {Id: one String}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all P: Person | lone P.borrowedBooks.Id }\npred borrowBook(P: Person, b: Book, I:Id) { b in P.borrowedBooks }\nfun totalBooksBorrowed: Int {\n #Book - #({b: Book | no b.~borrowedBooks})\n}\nrun { some P: Person, b: Book, I: Id| b in P.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "bagged-living-subpar-coping", "time": "2024-11-18 14:52:38.840602", "cmd": 1} {"id": 23780, "parent": 23779, "code": "sig Book {Id: one String}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book, I:Id | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all P: Person | lone P.borrowedBooks }\npred borrowBook(P: Person, b: Book, I:Id) { b in P.borrowedBooks }\nfun totalBooksBorrowed: Int {\n #Book - #({b: Book | no b.~borrowedBooks})\n}\nrun { some P: Person, b: Book, I: Id| b in P.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "pumice-skinny-xbox-hertz", "time": "2024-11-18 14:53:03.718878", "cmd": 1} {"id": 23781, "parent": 23777, "code": "//Anum Batool (anonymized)\n\n//***** Signatures *****//\n//Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester\nabstract sig Semester{\n duration: Int, //weeks\n startDate: Int, //nth day of the year\n endDate: Int, //nth day of the year\n //courses: some Course //offered in a semester\n}\nsig Spring, Summer, Fall extends Semester {}\n\n//Course\n//sig Course {}\n\n//***** Facts and Assertions *****//\n//Academic Year Constraint\nfact AcademicYearConstraint {\n all ay:AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 \n #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\n//Semester constraints\nfact SemesterDateConstraints {\n //Duration Constraints\n all s: Semester | s.endDate > s.startDate\n all s: Spring | s.duration = 17\n all s: Fall | s.duration = 17\n all s: Summer | s.duration = 8 \n\n //Summer semester July to July date constraint\n all s:Summer | ValidSummerDay[s]\n}\n\npred ValidSummerDay [s: Summer] {\n s.startDate >= 151 && s.startDate <= 180\n}\n\nrun {} ", "permalink": "cargo-snuff-salt-baggy", "time": "2024-11-18 14:53:26.727448", "cmd": 1} {"id": 23782, "parent": 23781, "code": "//Anum Batool (anonymized)\n\n//***** Signatures *****//\n//Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester\nabstract sig Semester{\n duration: Int, //weeks\n startDate: Int, //nth day of the year\n endDate: Int, //nth day of the year\n //courses: some Course //offered in a semester\n}\nsig Spring, Summer, Fall extends Semester {}\n\n//Course\n//sig Course {}\n\n//***** Facts and Assertions *****//\n//Academic Year Constraint\nfact AcademicYearConstraint {\n all ay:AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 \n #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\n//Semester constraints\nfact SemesterDateConstraints {\n //Duration Constraints\n all s: Semester | s.endDate > s.startDate\n all s: Spring | s.duration = 17\n all s: Fall | s.duration = 17\n all s: Summer | s.duration = 8 \n\n //Summer semester July to July date constraint\n all s:Summer | ValidSummerDay[s]\n}\n\npred ValidSummerDay [s: Summer] {\n s.startDate >= 151 && s.endDate <= 180\n}\n\nrun {} ", "permalink": "spree-bouncy-pleat-expert", "time": "2024-11-18 14:54:34.896894", "cmd": 1} {"id": 23783, "parent": 23771, "code": "\n// abstract sig Bool {}\n// one sig True extends Bool {}\n// one sig False extends Bool {}\n\n\n// sig AcademicYear{\n// semesters: some Semester,\n// }\n\n\n// sig Semester {\n// duration: one Int, \n// isOptional: one Bool, \n// startDate: one Int, // in terms of weeks\n// endDate: one Int\n// }\n// sig Summer extends Semester{}\n// sig Fall extends Semester{}\n// sig Spring extends Semester{}\n\n\n// sig Student {\n// rollNumber: one Int,\n// attendance: some Attendance,\n// aid: one Bool, \n// academicWarning: one Int,\n// numFrozenSem: one Int\n// }\n\n// enum Medium { \n// English, \n// urdu, \n// other\n// }\n\n// sig Course {\n// medium: one Medium, \n\n// }\n\n// sig Attendance {\n// enrolledCourse: one Course,\n// totalClassesAttended: one Int, // Total classes attended by the student\n// totalClasses: one Int // Total classes for the course\n// }\n\n// enum FeeType {\n// freeze, \n// tuition\n// }\n// sig Fee {\n// type: one FeeType,\n// amount: one Int\n// }\n\n\n// // Facts \n// fact SemesterDurations {\n// all s: Spring + Fall | s.duration = 17\n// all s: Summer | s.duration = 8\n// }\n\n// fact startVsEnd {\n// all s: Semester | s.startDate < s.endDate\n// }\n\n// fact AcademicYearSemesterCount {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3\n// }\n\n\n// fact UniqueRollNumber {\n// all s1, s2: Student | s1 != s2 => s1.rollNumber != s2.rollNumber\n// }\n\n// fact attendancePolicy { \n// all s: Student | all a: s.attendance |\n// a.totalClassesAttended <= a.totalClasses \n// and a.totalClassesAttended * 100 / a.totalClasses >= 80\n// }\n\n\n// Existing signatures\nabstract sig Bool {}\none sig True extends Bool {}\none sig False extends Bool {}\n\nsig AcademicYear {\n semesters: some Semester,\n}\n\nsig Semester {\n duration: one Int,\n isOptional: one Bool,\n startDate: one Int, // in terms of weeks\n endDate: one Int\n}\nsig Summer extends Semester {}\nsig Fall extends Semester {}\nsig Spring extends Semester {}\n\nsig Student {\n rollNumber: one Int,\n attendance: some Attendance,\n aid: one Bool, \n academicWarning: one Int,\n numFrozenSem: one Int,\n enrolledProgram: one Program,\n feesPaid: set Fee\n}\n\nenum Medium { \n English, \n urdu, \n other\n}\n\nsig Course {\n medium: one Medium,\n offeredIn: some Semester,\n prerequisites: set Course\n}\n\nsig Attendance {\n enrolledCourse: one Course,\n totalClassesAttended: one Int, // Total classes attended by the student\n totalClasses: one Int // Total classes for the course\n}\n\nenum FeeType {\n freeze, \n tuition\n}\n\nsig Fee {\n type: one FeeType,\n amount: one Int\n}\n\nsig Program {}\n\n// Existing facts\nfact SemesterDurations {\n all s: Spring + Fall | s.duration = 17\n all s: Summer | s.duration = 8\n}\n\nfact startVsEnd {\n all s: Semester | s.startDate < s.endDate\n}\n\nfact AcademicYearSemesterCount {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3\n}\n\nfact UniqueRollNumber {\n all s1, s2: Student | s1 != s2 => s1.rollNumber != s2.rollNumber\n}\n\n\nfact attendancePolicy { \n all s: Student | all a: s.attendance |\n a.totalClassesAttended <= a.totalClasses \n and div[mul[a.totalClassesAttended,100], a.totalClasses] >= 80\n}\n\n// Financial aid rule\nfact financialAidCancellation {\n all s: Student | \n s.aid = True => s.academicWarning = 0\n}\n\n// Fall and Spring semester registration and fee rule\nfact registrationAndFee {\n all s: Student | \n some sem: Fall + Spring |\n FeeType.tuition in s.feesPaid.type and \n all f: s.feesPaid | f.amount > 0\n}\n\n// Freeze semester fee and limit\nfact freezeSemesterRules {\n all s: Student | \n s.numFrozenSem <= 2 and\n FeeType.freeze in s.feesPaid.type => \n all f: s.feesPaid | f.type = FeeType.freeze => f.amount = 11000\n}\n\n// Concurrent admission rule\nfact noConcurrentAdmission {\n all s1, s2: Student | \n s1 != s2 => s1.enrolledProgram != s2.enrolledProgram\n}\n\n// Adding courses rule\nfact courseAddition {\n all s: Student | all c: Course |\n c in s.attendance.enrolledCourse =>\n all prereq: c.prerequisites | prereq in s.attendance.enrolledCourse\n}", "permalink": "mural-finch-revert-spring", "time": "2024-11-18 14:54:53.283027", "cmd": 1} {"id": 23784, "parent": 23780, "code": "sig Book {Id: one String}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book, I:Id | lone b.borrowedBooks }\nassert NoDuplicateBorrowing { all P: Person | lone P.borrowedBooks }\npred borrowBook(P: Person, b: Book, I:Id) { b in P.borrowedBooks }\nfun totalBooksBorrowed: Int {\n #Book - #({b: Book | no b.~borrowedBooks})\n}\nrun { some P: Person, b: Book, I: Id| b in P.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "finale-author-casket-lusty", "time": "2024-11-18 14:57:34.638133", "cmd": 1} {"id": 23798, "parent": 23796, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.borrowedBooks }\nassert NoDuplicateBorrowing { all P: Person | lone P.borrowedBooks }\npred borrowBook(P: Person, b: Book) { b in P.borrowedBooks }\nfun totalBooksBorrowed: Int {\n #Book - #({b: Book | no b.~borrowedBooks})\n}\nrun { some P: Person, b: Book | b in P.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "aspire-relay-cackle-jazz", "time": "2024-11-18 15:06:29.106873", "cmd": 1} {"id": 23785, "parent": 23784, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.borrowedBooks }\nassert NoDuplicateBorrowing { all P: Person | lone P.borrowedBooks }\npred borrowBook(P: Person, b: Book) { b in P.borrowedBooks }\nfun totalBooksBorrowed: Int {\n #Book - #({b: Book | no b.~borrowedBooks})\n}\nrun { some P: Person, b: Book | b in P.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "voyage-oyster-bleak-flail", "time": "2024-11-18 14:58:14.181650", "cmd": 1} {"id": 23786, "parent": 23785, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.borrowedBooks }\nassert NoDuplicateBorrowing { all P: Person | one P.borrowedBooks }\npred borrowBook(P: Person, b: Book) { b in P.borrowedBooks }\nfun totalBooksBorrowed: Int {\n #Book - #({b: Book | no b.~borrowedBooks})\n}\nrun { some P: Person, b: Book | b in P.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "rinse-clique-lilac-sugar", "time": "2024-11-18 14:58:37.852681", "cmd": 1} {"id": 23787, "parent": 23786, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.borrowedBooks }\nassert NoDuplicateBorrowing { all P: Person | some P.borrowedBooks }\npred borrowBook(P: Person, b: Book) { b in P.borrowedBooks }\nfun totalBooksBorrowed: Int {\n #Book - #({b: Book | no b.~borrowedBooks})\n}\nrun { some P: Person, b: Book | b in P.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "crux-revoke-party-scurvy", "time": "2024-11-18 14:59:17.822362", "cmd": 1} {"id": 23788, "parent": 23787, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | some b.borrowedBooks }\nassert NoDuplicateBorrowing { all P: Person | lone P.borrowedBooks }\npred borrowBook(P: Person, b: Book) { b in P.borrowedBooks }\nfun totalBooksBorrowed: Int {\n #Book - #({b: Book | no b.~borrowedBooks})\n}\nrun { some P: Person, b: Book | b in P.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "specks-grass-splice-bamboo", "time": "2024-11-18 15:00:00.005813", "cmd": 1} {"id": 23789, "parent": 23788, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | some b.borrowedBooks }\nassert NoDuplicateBorrowing { all P: Person | lone P.borrowedBooks }\npred borrowBook(P: Person, b: Book) { b in P.borrowedBooks }\nfun totalBooksBorrowed: Int {\n #Book - #({b: Book | no b.~borrowedBooks})\n}\nrun { some P: Person, b: Book | b in P.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "ninth-unsure-lake-yelp", "time": "2024-11-18 15:00:06.565365", "cmd": 1} {"id": 23791, "parent": 23790, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | one b.borrowedBooks }\nassert NoDuplicateBorrowing { all P: Person | lone P.borrowedBooks }\npred borrowBook(P: Person, b: Book) { b in P.borrowedBooks }\nfun totalBooksBorrowed: Int {\n #Book - #({b: Book | no b.~borrowedBooks})\n}\nrun { some P: Person, b: Book | b in P.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "state-resume-giver-polish", "time": "2024-11-18 15:00:34.337777", "cmd": 1} {"id": 23790, "parent": 23789, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | one b.borrowedBooks }\nassert NoDuplicateBorrowing { all P: Person | lone P.borrowedBooks }\npred borrowBook(P: Person, b: Book) { b in P.borrowedBooks }\nfun totalBooksBorrowed: Int {\n #Book - #({b: Book | no b.~borrowedBooks})\n}\nrun { some P: Person, b: Book | b in P.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "cork-nature-native-wok", "time": "2024-11-18 15:00:32.495405", "cmd": 1} {"id": 23792, "parent": 23791, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | b.~borrowedBooks }\nassert NoDuplicateBorrowing { all P: Person | lone P.borrowedBooks }\npred borrowBook(P: Person, b: Book) { b in P.borrowedBooks }\nfun totalBooksBorrowed: Int {\n #Book - #({b: Book | no b.~borrowedBooks})\n}\nrun { some P: Person, b: Book | b in P.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "rash-repost-java-evil", "time": "2024-11-18 15:00:51.049380", "cmd": 1} {"id": 23793, "parent": 23792, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | no b.~borrowedBooks }\nassert NoDuplicateBorrowing { all P: Person | lone P.borrowedBooks }\npred borrowBook(P: Person, b: Book) { b in P.borrowedBooks }\nfun totalBooksBorrowed: Int {\n #Book - #({b: Book | no b.~borrowedBooks})\n}\nrun { some P: Person, b: Book | b in P.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "relax-spore-pod-smoked", "time": "2024-11-18 15:01:03.844289", "cmd": 1} {"id": 23794, "parent": 23793, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | 1 b.~borrowedBooks }\nassert NoDuplicateBorrowing { all P: Person | lone P.borrowedBooks }\npred borrowBook(P: Person, b: Book) { b in P.borrowedBooks }\nfun totalBooksBorrowed: Int {\n #Book - #({b: Book | no b.~borrowedBooks})\n}\nrun { some P: Person, b: Book | b in P.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "triage-dugout-elves-canine", "time": "2024-11-18 15:01:10.900154", "cmd": 1} {"id": 23795, "parent": 23794, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | one b.~borrowedBooks }\nassert NoDuplicateBorrowing { all P: Person | lone P.borrowedBooks }\npred borrowBook(P: Person, b: Book) { b in P.borrowedBooks }\nfun totalBooksBorrowed: Int {\n #Book - #({b: Book | no b.~borrowedBooks})\n}\nrun { some P: Person, b: Book | b in P.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "throat-kooky-versus-rift", "time": "2024-11-18 15:01:26.850197", "cmd": 1} {"id": 23796, "parent": 23795, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all P: Person | lone P.borrowedBooks }\npred borrowBook(P: Person, b: Book) { b in P.borrowedBooks }\nfun totalBooksBorrowed: Int {\n #Book - #({b: Book | no b.~borrowedBooks})\n}\nrun { some P: Person, b: Book | b in P.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "musky-repose-sphinx-thumb", "time": "2024-11-18 15:02:42.352495", "cmd": 1} {"id": 23797, "parent": 23782, "code": "//Anum Batool (anonymized)\n\n//***** Signatures *****//\n//Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester\nabstract sig Semester{\n duration: Int, //weeks\n startDate: Int, //nth day of the year\n endDate: Int, //nth day of the year\n //courses: some Course //offered in a semester\n}\nsig Spring, Summer, Fall extends Semester {}\n\n//Course\n//sig Course {}\n\n//***** Facts and Assertions *****//\n//Academic Year Constraint\nfact AcademicYearConstraint {\n all ay:AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 \n #ay.semesters <=3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n //Optional semester must be summer\n lone s: Summer | s in ay.semesters\n\n //Three semesters imply thrid is summer\n #ay.semesters = 3 implies { some s: Summer | s in ay.semesters}\n }\n}\n\n//Semester constraints\nfact SemesterDateConstraints {\n //Duration Constraints\n all s: Semester | s.endDate > s.startDate\n all s: Spring | s.duration = 17\n all s: Fall | s.duration = 17\n all s: Summer | s.duration = 8 \n\n //Summer semester July to July date constraint\n all s:Summer | ValidSummerDay[s]\n}\n\npred ValidSummerDay [s: Summer] {\n s.startDate >= 151 && s.endDate <= 180\n}\n\nrun {} for 3", "permalink": "wizard-revise-perish-scribe", "time": "2024-11-18 15:03:35.683575", "cmd": 1} {"id": 23799, "parent": 23783, "code": "\n// abstract sig Bool {}\n// one sig True extends Bool {}\n// one sig False extends Bool {}\n\n\n// sig AcademicYear{\n// semesters: some Semester,\n// }\n\n\n// sig Semester {\n// duration: one Int, \n// isOptional: one Bool, \n// startDate: one Int, // in terms of weeks\n// endDate: one Int\n// }\n// sig Summer extends Semester{}\n// sig Fall extends Semester{}\n// sig Spring extends Semester{}\n\n\n// sig Student {\n// rollNumber: one Int,\n// attendance: some Attendance,\n// aid: one Bool, \n// academicWarning: one Int,\n// numFrozenSem: one Int\n// }\n\n// enum Medium { \n// English, \n// urdu, \n// other\n// }\n\n// sig Course {\n// medium: one Medium, \n\n// }\n\n// sig Attendance {\n// enrolledCourse: one Course,\n// totalClassesAttended: one Int, // Total classes attended by the student\n// totalClasses: one Int // Total classes for the course\n// }\n\n// enum FeeType {\n// freeze, \n// tuition\n// }\n// sig Fee {\n// type: one FeeType,\n// amount: one Int\n// }\n\n\n// // Facts \n// fact SemesterDurations {\n// all s: Spring + Fall | s.duration = 17\n// all s: Summer | s.duration = 8\n// }\n\n// fact startVsEnd {\n// all s: Semester | s.startDate < s.endDate\n// }\n\n// fact AcademicYearSemesterCount {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3\n// }\n\n\n// fact UniqueRollNumber {\n// all s1, s2: Student | s1 != s2 => s1.rollNumber != s2.rollNumber\n// }\n\n// fact attendancePolicy { \n// all s: Student | all a: s.attendance |\n// a.totalClassesAttended <= a.totalClasses \n// and a.totalClassesAttended * 100 / a.totalClasses >= 80\n// }\n\n\n// Existing signatures\nabstract sig Bool {}\none sig True extends Bool {}\none sig False extends Bool {}\n\nsig AcademicYear {\n semesters: some Semester,\n}\n\nsig Semester {\n duration: one Int,\n isOptional: one Bool,\n startDate: one Int, // in terms of weeks\n endDate: one Int\n}\nsig Summer extends Semester {}\nsig Fall extends Semester {}\nsig Spring extends Semester {}\n\nsig Student {\n rollNumber: one Int,\n attendance: some Attendance,\n aid: one Bool, \n academicWarning: one Int,\n numFrozenSem: one Int,\n enrolledProgram: one Program,\n feesPaid: set Fee\n}\n\nenum Medium { \n English, \n urdu, \n other\n}\n\nsig Course {\n medium: one Medium,\n offeredIn: some Semester,\n prerequisites: set Course\n}\n\nsig Attendance {\n enrolledCourse: one Course,\n totalClassesAttended: one Int, // Total classes attended by the student\n totalClasses: one Int // Total classes for the course\n}\n\nenum FeeType {\n freeze, \n tuition\n}\n\nsig Fee {\n type: one FeeType,\n amount: one Int\n}\n\nsig Program {}\n\n// Existing facts\nfact SemesterDurations {\n all s: Spring + Fall | s.duration = 17\n all s: Summer | s.duration = 8\n}\n\nfact startVsEnd {\n all s: Semester | s.startDate < s.endDate\n}\n\nfact AcademicYearSemesterCount {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3\n}\n\nfact UniqueRollNumber {\n all s1, s2: Student | s1 != s2 => s1.rollNumber != s2.rollNumber\n}\n\n\nfact attendancePolicy { \n all s: Student | all a: s.attendance |\n a.totalClassesAttended <= a.totalClasses \n and div[mul[a.totalClassesAttended,100], a.totalClasses] >= 80\n}\n\n// Financial aid rule\nfact financialAidCancellation {\n all s: Student | \n s.aid = True => s.academicWarning = 0\n}\n\n// Fall and Spring semester registration and fee rule\nfact registrationAndFee {\n all s: Student | \n some sem: Semester | sem in (Fall + Spring) => \n some fee: s.feesPaid | fee.type = FeeType.tuition and fee.amount > 0\n}\n\n// Freeze semester fee and limit\nfact freezeSemesterRules {\n all s: Student | \n s.numFrozenSem <= 2 and\n FeeType.freeze in s.feesPaid.type => \n all f: s.feesPaid | f.type = FeeType.freeze => f.amount = 11000\n}\n\n// Concurrent admission rule\nfact noConcurrentAdmission {\n all s1, s2: Student | \n s1 != s2 => s1.enrolledProgram != s2.enrolledProgram\n}\n\n// Adding courses rule\nfact courseAddition {\n all s: Student | all c: Course |\n c in s.attendance.enrolledCourse =>\n all prereq: c.prerequisites | prereq in s.attendance.enrolledCourse\n}", "permalink": "reopen-resize-settle-thrift", "time": "2024-11-18 15:10:00.505972", "cmd": 1} {"id": 23800, "parent": 23799, "code": "\n// abstract sig Bool {}\n// one sig True extends Bool {}\n// one sig False extends Bool {}\n\n\n// sig AcademicYear{\n// semesters: some Semester,\n// }\n\n\n// sig Semester {\n// duration: one Int, \n// isOptional: one Bool, \n// startDate: one Int, // in terms of weeks\n// endDate: one Int\n// }\n// sig Summer extends Semester{}\n// sig Fall extends Semester{}\n// sig Spring extends Semester{}\n\n\n// sig Student {\n// rollNumber: one Int,\n// attendance: some Attendance,\n// aid: one Bool, \n// academicWarning: one Int,\n// numFrozenSem: one Int\n// }\n\n// enum Medium { \n// English, \n// urdu, \n// other\n// }\n\n// sig Course {\n// medium: one Medium, \n\n// }\n\n// sig Attendance {\n// enrolledCourse: one Course,\n// totalClassesAttended: one Int, // Total classes attended by the student\n// totalClasses: one Int // Total classes for the course\n// }\n\n// enum FeeType {\n// freeze, \n// tuition\n// }\n// sig Fee {\n// type: one FeeType,\n// amount: one Int\n// }\n\n\n// // Facts \n// fact SemesterDurations {\n// all s: Spring + Fall | s.duration = 17\n// all s: Summer | s.duration = 8\n// }\n\n// fact startVsEnd {\n// all s: Semester | s.startDate < s.endDate\n// }\n\n// fact AcademicYearSemesterCount {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3\n// }\n\n\n// fact UniqueRollNumber {\n// all s1, s2: Student | s1 != s2 => s1.rollNumber != s2.rollNumber\n// }\n\n// fact attendancePolicy { \n// all s: Student | all a: s.attendance |\n// a.totalClassesAttended <= a.totalClasses \n// and a.totalClassesAttended * 100 / a.totalClasses >= 80\n// }\n\n\n// Existing signatures\nabstract sig Bool {}\none sig True extends Bool {}\none sig False extends Bool {}\n\nsig AcademicYear {\n semesters: some Semester,\n}\n\nsig Semester {\n duration: one Int,\n isOptional: one Bool,\n startDate: one Int, // in terms of weeks\n endDate: one Int\n}\nsig Summer extends Semester {}\nsig Fall extends Semester {}\nsig Spring extends Semester {}\n\nsig Student {\n rollNumber: one Int,\n attendance: some Attendance,\n aid: one Bool, \n academicWarning: one Int,\n numFrozenSem: one Int,\n enrolledProgram: one Program,\n feesPaid: set Fee\n}\n\nenum Medium { \n English, \n urdu, \n other\n}\n\nsig Course {\n medium: one Medium,\n offeredIn: some Semester,\n prerequisites: set Course\n}\n\nsig Attendance {\n enrolledCourse: one Course,\n totalClassesAttended: one Int, // Total classes attended by the student\n totalClasses: one Int // Total classes for the course\n}\n\nenum FeeType {\n freeze, \n tuition\n}\n\nsig Fee {\n type: one FeeType,\n amount: one Int\n}\n\nsig Program {}\n\n// Existing facts\nfact SemesterDurations {\n all s: Spring + Fall | s.duration = 17\n all s: Summer | s.duration = 8\n}\n\nfact startVsEnd {\n all s: Semester | s.startDate < s.endDate\n}\n\nfact AcademicYearSemesterCount {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3\n}\n\nfact UniqueRollNumber {\n all s1, s2: Student | s1 != s2 => s1.rollNumber != s2.rollNumber\n}\n\n\nfact attendancePolicy { \n all s: Student | all a: s.attendance |\n a.totalClassesAttended <= a.totalClasses \n and div[mul[a.totalClassesAttended,100], a.totalClasses] >= 80\n}\n\n// Financial aid rule\nfact financialAidCancellation {\n all s: Student | \n s.aid = True => s.academicWarning = 0\n}\n\n// Fall and Spring semester registration and fee rule\nfact registrationAndFee {\n all s: Student | \n all sem: Semester | sem in (Fall + Spring) =>\n (sem in s.attendance.enrolledCourse.offeredIn => \n some fee: s.feesPaid | fee.type = FeeType.tuition and fee.amount > 0)\n}\n\n\n// Freeze semester fee and limit\nfact freezeSemesterRules {\n all s: Student | \n s.numFrozenSem <= 2 and\n FeeType.freeze in s.feesPaid.type => \n all f: s.feesPaid | f.type = FeeType.freeze => f.amount = 11000\n}\n\n// Concurrent admission rule\nfact noConcurrentAdmission {\n all s1, s2: Student | \n s1 != s2 => s1.enrolledProgram != s2.enrolledProgram\n}\n\n// Adding courses rule\nfact courseAddition {\n all s: Student | all c: Course |\n c in s.attendance.enrolledCourse =>\n all prereq: c.prerequisites | prereq in s.attendance.enrolledCourse\n}", "permalink": "rebuff-pried-friend-lather", "time": "2024-11-18 15:10:29.365425", "cmd": 1} {"id": 23801, "parent": 23797, "code": "//Anum Batool (anonymized)\n\n//***** Signatures *****//\n//Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester\nabstract sig Semester {\n duration: Int, //weeks\n startDate: Int, //nth day of the year\n endDate: Int //nth day of the year\n}\nsig Spring, Summer, Fall extends Semester {}\n\n//***** Facts and Assertions *****//\n//Academic Year Constraints\nfact AcademicYearConstraint {\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 && #ay.semesters <= 3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional Summer semester\n lone su: Summer | su in ay.semesters\n\n //Three semesters imply third is Summer\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n\n//Semester Date and Duration Constraints\nfact SemesterDateConstraints {\n all s: Semester | s.endDate > s.startDate\n \n // Duration for Spring, Fall, and Summer\n all sp: Spring | sp.duration = 17\n all fl: Fall | fl.duration = 17\n all su: Summer | su.duration = 8\n \n //Summer semester date constraints\n all su: Summer | ValidSummerDay[su]\n}\n\n// Valid Summer Semester Dates\npred ValidSummerDay [s: Summer] {\n s.startDate >= 151 && s.startDate <= 181 && \n s.endDate > s.startDate\n}\n\n// Test the model\nrun {} for 3", "permalink": "chatty-kisser-unsold-yam", "time": "2024-11-18 15:15:37.705010", "cmd": 1} {"id": 23802, "parent": 23801, "code": "//Anum Batool (anonymized)\n\n//***** Signatures *****//\n//Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester\nabstract sig Semester {\n duration: Int, //weeks\n startDate: Int, //nth day of the year\n endDate: Int //nth day of the year\n}\nsig Spring, Summer, Fall extends Semester {}\n\n//***** Facts and Assertions *****//\n//Academic Year Constraints\nfact AcademicYearConstraint {\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 && #ay.semesters <= 3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional Summer semester\n lone su: Summer | su in ay.semesters\n\n //Three semesters imply third is Summer\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n\n//Semester Date and Duration Constraints\nfact SemesterDateConstraints {\n all s: Semester | s.endDate > s.startDate\n \n // Duration for Spring, Fall, and Summer\n all sp: Spring | sp.duration = 17\n all fl: Fall | fl.duration = 17\n all su: Summer | su.duration = 8\n \n //Summer semester date constraints\n all su: Summer | ValidSummerDay[su]\n}\n\n// Valid Summer Semester Dates\npred ValidSummerDay [s: Summer] {\n s.startDate >= 151 && s.startDate <= 181 && \n s.endDate > s.startDate\n}\n\n// Test the model\nrun {} for 3", "permalink": "quench-comfy-litmus-nanny", "time": "2024-11-18 15:15:40.394220", "cmd": 1} {"id": 23803, "parent": 23798, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun availableBooks(b: set Book): set Book {\n b - (all p: Person| m.borrowedBooks)\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "enrage-dupe-grid-verse", "time": "2024-11-18 15:29:50.390203", "cmd": 1} {"id": 23804, "parent": 23803, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun availableBooks(b: set Book): set Book {\n b - (all p: Person| p.borrowedBooks)\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "choice-debate-step-shawl", "time": "2024-11-18 15:30:03.444285", "cmd": 1} {"id": 23805, "parent": 23804, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun availableBooks(b: set Book): set Book {\n b -> (all p: Person| p.borrowedBooks)\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "outlet-apple-septum-uproar", "time": "2024-11-18 15:30:53.623712", "cmd": 1} {"id": 23806, "parent": 23805, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun availableBooks(b: set Book): set Book {\n b -> (all p: Person | p.borrowedBooks)\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "dodge-ploy-spoon-plow", "time": "2024-11-18 15:31:35.684760", "cmd": 1} {"id": 23807, "parent": 23806, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun availableBooks(b: set Book): set Book {\n b -> (all p: Person | lone p.borrowedBooks)\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "trifle-swept-bouncy-grape", "time": "2024-11-18 15:33:09.858314", "cmd": 1} {"id": 23808, "parent": 23807, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun availableBooks(b: set Book): set Book {\n b -> (all p: Person | set p.borrowedBooks)\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "proxy-recall-elm-dainty", "time": "2024-11-18 15:33:22.098671", "cmd": 1} {"id": 23809, "parent": 23808, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun availableBooks(b: set Book): set Book {\n b -> (all p: Person | b in p.borrowedBooks)\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "viewer-bootie-dipper-stays", "time": "2024-11-18 15:33:50.173895", "cmd": 1} {"id": 23810, "parent": 23809, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun availableBooks(b: set Book): set Book {\n b -> (all p: Person | set b in p.borrowedBooks)\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "neatly-perm-outwit-recopy", "time": "2024-11-18 15:34:04.513251", "cmd": 1} {"id": 23811, "parent": 23810, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun availableBooks(b: set Book): set Book {\n b -> (all p: Person | p.~borrowedBooks)\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "tacky-flight-agenda-kisser", "time": "2024-11-18 15:35:58.239168", "cmd": 1} {"id": 23813, "parent": 23812, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun availableBooks(b: set Book): set Book {\n b -> (all p: Person | p. borrowedBooks)\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "hunk-hyphen-hurt-chain", "time": "2024-11-18 15:37:17.688148", "cmd": 1} {"id": 23812, "parent": 23811, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun availableBooks(b: set Book): set Book {\n b -> (all p: Person | p. borrowedBooks)\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "stinky-stamp-omit-spew", "time": "2024-11-18 15:37:15.590880", "cmd": 1} {"id": 23814, "parent": 23813, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun availableBooks(b: set Book): set Book {\n b -> (all p: Person | p. borrowedBooks)\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "cozy-draw-bottle-lunacy", "time": "2024-11-18 15:37:27.856572", "cmd": 1} {"id": 23815, "parent": 23814, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun availableBooks(b: set Book): set Book {\n b -> (all p: Person | p. borrowedBooks)\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "rerun-lushly-dude-derby", "time": "2024-11-18 15:37:34.233253", "cmd": 1} {"id": 23816, "parent": 23815, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun availableBooks(b: set Book): set Book {\n b -> (all p: Person | p.this->borrowedBooks)\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "uneven-grub-dock-defeat", "time": "2024-11-18 15:37:51.334783", "cmd": 1} {"id": 23817, "parent": 23816, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun availableBooks(b: set Book): set Book {\n b -> (all p: Person | p.this.borrowedBooks)\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "sled-anvil-rash-supply", "time": "2024-11-18 15:38:00.466958", "cmd": 1} {"id": 23818, "parent": 23817, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun availableBooks(b: set Book): set Book {\n b -> (all p: Person | p.Book->borrowedBooks)\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "dugout-purist-slate-last", "time": "2024-11-18 15:38:20.602289", "cmd": 1} {"id": 23819, "parent": 23818, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun availableBooks(b: set Book): set Book {\n b -> (all p: Person | p.Books)\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "runt-cradle-pesky-brunt", "time": "2024-11-18 15:38:56.651356", "cmd": 1} {"id": 23820, "parent": 23819, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun availableBooks(b: set Book): set Book {\n b -> (all p: Person | p.Book)\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "legend-primal-syrup-pastor", "time": "2024-11-18 15:39:04.410042", "cmd": 1} {"id": 23821, "parent": 23820, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun availableBooks(b: set Book): set Book {\n b -> (all p: Person | p.-Book)\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "curler-bobbed-remake-map", "time": "2024-11-18 15:39:17.210246", "cmd": 1} {"id": 23822, "parent": 23821, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun availableBooks(b: set Book): set Book {\n b (all p: Person | p.borrowedBooks)\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "pummel-swarm-risk-opal", "time": "2024-11-18 15:39:54.353712", "cmd": 1} {"id": 23823, "parent": 23822, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun availableBooks(b: set Book): set Book {\n b - (all p: Person | p.borrowedBooks)\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "rise-bleach-unruly-myth", "time": "2024-11-18 15:40:05.837417", "cmd": 1} {"id": 23824, "parent": 23823, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun availableBooks(b: set Book): set Book {\n b - (all p: Person | Person.borrowedBooks)\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "ascent-afar-roving-rewind", "time": "2024-11-18 15:40:47.097147", "cmd": 1} {"id": 23825, "parent": 23824, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun availableBooks(b: set Book): set Book {\n b - (all p: Person | P:orrowedBooks)\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "taste-amends-gory-papaya", "time": "2024-11-18 15:41:31.764142", "cmd": 1} {"id": 23826, "parent": 23825, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun availableBooks(b: set Book): set Book {\n b - (all p: Person | P.orrowedBooks)\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "sugar-kennel-cursor-pope", "time": "2024-11-18 15:41:39.678373", "cmd": 1} {"id": 23827, "parent": 23826, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun availableBooks(b: set Book): set Book {\n b - (all p: Person | P.borrowBooks)\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "waking-kabob-shrine-winner", "time": "2024-11-18 15:42:08.766161", "cmd": 1} {"id": 23828, "parent": 23827, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun availableBooks(b: set Book): set Book {\n b - (all p: Person | P.borrowBook)\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "dense-sassy-raving-humble", "time": "2024-11-18 15:42:14.046106", "cmd": 1} {"id": 23829, "parent": 23828, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun availableBooks(b: set Book): set Book {\n b - (all p: Person | P.borrowedBooks)\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "hug-campus-broken-wafer", "time": "2024-11-18 15:42:23.371620", "cmd": 1} {"id": 23830, "parent": 23829, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun availableBooks(b: set Book): set Book {\n (all p: Person | b in P.borrowedBooks)\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "ditto-stony-froth-goon", "time": "2024-11-18 15:42:55.000631", "cmd": 1} {"id": 23831, "parent": 23830, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun availableBooks(b: set Book): set Book {\n (all p: Person | b in p.borrowedBooks)\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "lurch-curing-gown-canary", "time": "2024-11-18 15:43:22.287608", "cmd": 1} {"id": 23832, "parent": 23831, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun availableBooks(b: set Book): set Book {\n (all p: Person | b -> p.borrowedBooks)\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "reopen-chevy-sprang-bronco", "time": "2024-11-18 15:43:51.995974", "cmd": 1} {"id": 23833, "parent": 23832, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun availableBooks(b: set Book): set Book {\n (all b: Book | b.borrowedBooks)\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "salt-mowing-spleen-plot", "time": "2024-11-18 15:44:52.390015", "cmd": 1} {"id": 23834, "parent": 23833, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun availableBooks(b: set Book): set Book {\n (all b: Book | none b.borrowedBooks)\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "brush-fling-water-pang", "time": "2024-11-18 15:45:01.460934", "cmd": 1} {"id": 23836, "parent": 23835, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun availableBooks(b: set Book): set Book {\n (all b: Book | none b.~borrowedBooks)\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "bottom-duplex-thrash-plop", "time": "2024-11-18 15:45:24.196980", "cmd": 1} {"id": 23835, "parent": 23834, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun availableBooks(b: set Book): set Book {\n (all b: Book | none b.~borrowedBooks)\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "daily-deduct-chevy-sank", "time": "2024-11-18 15:45:22.856572", "cmd": 1} {"id": 23837, "parent": 23836, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun availableBooks(b: set Book): set Book {\n (all b: Book | none b.^borrowedBooks)\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "barley-impure-extent-impose", "time": "2024-11-18 15:45:32.073632", "cmd": 1} {"id": 23838, "parent": 23837, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun availableBooks(b: set Book): set Book {\n (all b: Book | b in Book)\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "headed-ahoy-maybe-sierra", "time": "2024-11-18 15:46:19.216991", "cmd": 1} {"id": 23839, "parent": 23838, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun availableBooks(b: set Book): set Book {\n b in (all p.Person | p.borrowedBooks)\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "hurled-pusher-chomp-sandy", "time": "2024-11-18 15:47:53.311784", "cmd": 1} {"id": 23840, "parent": 23839, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun availableBooks(b: set Book): set Book {\n b - (all p.Person | p.borrowedBooks)\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "five-raven-vision-unsold", "time": "2024-11-18 15:48:22.723621", "cmd": 1} {"id": 23841, "parent": 23840, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun availableBooks(b: set Book): type{\n b - (all p.Person | p.borrowedBooks)\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "olive-eagle-canned-shrine", "time": "2024-11-18 15:50:12.434883", "cmd": 1} {"id": 23842, "parent": 23841, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun availableBooks(b: set Book): Int{\n b - (all p.Person | p.borrowedBooks)\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "bounce-ream-unclog-yoyo", "time": "2024-11-18 15:50:55.149141", "cmd": 1} {"id": 23843, "parent": 23842, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun availableBooks(b: set Book): Int{\n b - (all p.Person | no p.borrowedBooks)\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "poker-shaft-vegan-whinny", "time": "2024-11-18 15:51:41.967218", "cmd": 1} {"id": 23844, "parent": 23843, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun availableBooks(b: set Book): Int{\n #b - #(all p.Person | no p.borrowedBooks)\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "flaky-gander-false-water", "time": "2024-11-18 15:52:08.065722", "cmd": 1} {"id": 23847, "parent": 23846, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int {\n #Book - #({b: Book | no b.~borrowedBooks})\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "remote-job-energy-glitzy", "time": "2024-11-18 15:54:11.105170", "cmd": 1} {"id": 23845, "parent": 23844, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int {\n #Book - #({b: Book | no b.~borrowedBooks})\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "limes-repost-cabana-equate", "time": "2024-11-18 15:53:06.649469", "cmd": 1} {"id": 23846, "parent": 23845, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun availableBooks(b: set Book): Int{\n #b - #({all b.Book | no p.borrowedBooks})\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "sheath-pantry-froth-lunacy", "time": "2024-11-18 15:53:44.691526", "cmd": 1} {"id": 23848, "parent": 23847, "code": "sig Book {\n title: one String\n author: one String\n Id: one String\n}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int {\n #Book - #({b: Book | no b.~borrowedBooks})\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "tiring-ditzy-yarn-juror", "time": "2024-11-18 15:54:59.894640", "cmd": 1} {"id": 23849, "parent": 23848, "code": "sig Book {\n title: one String\n author: one String\n Id: one String\n}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int {\n #Book - #({b: Book | no b.~borrowedBooks})\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "oink-reseal-maroon-saline", "time": "2024-11-18 15:55:23.959790", "cmd": 1} {"id": 23850, "parent": 23849, "code": "sig Book {\n title: one String,\n author: one String,\n Id: one String\n}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int {\n #Book - #({b: Book | no b.~borrowedBooks})\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "jimmy-anchor-whole-yin", "time": "2024-11-18 15:55:42.842461", "cmd": 1} {"id": 23851, "parent": 23488, "code": "sig Book {\n title: one String,\n author: one String,\n publicationYear: one Int\n}\n\nsig Member {\n name: one String,\n borrowedBooks: set Book\n}\n\nfact UniqueBorrow {\n all b: Book | lone b.~borrowedBooks\n}\n\npred borrowBook(m: Member, b: Book) {\n b in m.borrowedBooks\n}\n\nassert MaxBorrowLimit {\n all m: Member | #m.borrowedBooks <= 3\n}\n\nfun availableBooks(b: set Book): set Book {\n b - (all m: Member | m.borrowedBooks)\n}\nrun { some m: Member, b: Book | b in m.borrowedBooks } for 3 Book, 3 Person\ncheck MaxBorrowLimit", "permalink": "ascend-equal-secret-tarot", "time": "2024-11-18 15:57:43.674299", "cmd": 1} {"id": 23852, "parent": 23851, "code": "sig Book {\n title: one String,\n author: one String,\n publicationYear: one Int\n}\n\nsig Member {\n name: one String,\n borrowedBooks: set Book\n}\n\nfact UniqueBorrow {\n all b: Book | lone b.~borrowedBooks\n}\n\npred borrowBook(m: Member, b: Book) {\n b in m.borrowedBooks\n}\n\nassert MaxBorrowLimit {\n all m: Member | #m.borrowedBooks <= 3\n}\n\nfun availableBooks(b: set Book): set Book {\n b - (all m: Member | m.borrowedBooks)\n}\nrun { some m: Member, b: Book | b in m.borrowedBooks } for 3 Book, 3 Person\ncheck MaxBorrowLimit", "permalink": "stem-dust-duo-skype", "time": "2024-11-18 15:57:46.187804", "cmd": 1} {"id": 23853, "parent": 23852, "code": "sig Book {\n title: one String,\n author: one String,\n publicationYear: one Int\n}\n\nsig Member {\n name: one String,\n borrowedBooks: set Book\n}\n\nfact UniqueBorrow {\n all b: Book | lone b.~borrowedBooks\n}\n\npred borrowBook(m: Member, b: Book) {\n b in m.borrowedBooks\n}\n\nassert MaxBorrowLimit {\n all m: Member | #m.borrowedBooks <= 3\n}\n\nrun { some m: Member, b: Book | b in m.borrowedBooks } for 3 Book, 3 Person\ncheck MaxBorrowLimit", "permalink": "disk-nephew-fled-pushy", "time": "2024-11-18 15:57:55.985289", "cmd": 1} {"id": 23855, "parent": 23854, "code": "sig Book {\n title: one String,\n author: one String,\n publicationYear: one Int\n}\n\nsig Member {\n name: one String,\n borrowedBooks: set Book\n}\n\nfact UniqueBorrow {\n all b: Book | lone b.~borrowedBooks\n}\n\npred borrowBook(m: Member, b: Book) {\n b in m.borrowedBooks\n}\n\nassert MaxBorrowLimit {\n all m: Member | #m.borrowedBooks <= 3\n}\n\nrun { some m: Member, b: Book | b in m.borrowedBooks } for 3 Book, 3 Member\ncheck MaxBorrowLimit", "permalink": "stir-share-tablet-iodine", "time": "2024-11-18 15:58:39.823001", "cmd": 1} {"id": 23856, "parent": 23855, "code": "sig Book {\n title: one String,\n author: one String,\n publicationYear: one Int\n}\n\nsig Member {\n name: one String,\n borrowedBooks: set Book\n}\n\nfact UniqueBorrow {\n all b: Book | lone b.~borrowedBooks\n}\n\npred borrowBook(m: Member, b: Book) {\n b in m.borrowedBooks\n}\n\nassert MaxBorrowLimit {\n all m: Member | #m.borrowedBooks <= 3\n}\n\nrun { some m: Member, b: Book | b in m.borrowedBooks } for 3 Book, 3 Member\ncheck MaxBorrowLimit", "permalink": "apple-hangup-spew-steep", "time": "2024-11-18 15:58:42.963557", "cmd": 1} {"id": 23854, "parent": 23853, "code": "sig Book {\n title: one String,\n author: one String,\n publicationYear: one Int\n}\n\nsig Member {\n name: one String,\n borrowedBooks: set Book\n}\n\nfact UniqueBorrow {\n all b: Book | lone b.~borrowedBooks\n}\n\npred borrowBook(m: Member, b: Book) {\n b in m.borrowedBooks\n}\n\nassert MaxBorrowLimit {\n all m: Member | #m.borrowedBooks <= 3\n}\n\nrun { some m: Member, b: Book | b in m.borrowedBooks } for 3 Book, 3 Member\ncheck MaxBorrowLimit", "permalink": "lively-wifi-eggnog-blurry", "time": "2024-11-18 15:58:21.423488", "cmd": 1} {"id": 23857, "parent": 23856, "code": "sig Book {}\n\nsig Member {\n borrowedBooks: set Book\n}\n\nfact UniqueBorrow {\n all b: Book | lone b.~borrowedBooks\n}\n\npred borrowBook(m: Member, b: Book) {\n b in m.borrowedBooks\n}\n\nassert MaxBorrowLimit {\n all m: Member | #m.borrowedBooks <= 3\n}\n\nrun { some m: Member, b: Book | b in m.borrowedBooks } for 3 Book, 3 Member\ncheck MaxBorrowLimit", "permalink": "nutmeg-bok-sulk-demote", "time": "2024-11-18 15:59:52.521214", "cmd": 1} {"id": 23858, "parent": 23857, "code": "sig Book {\n title: one \"GDgd\"\n author: one \"Henry\"\n}\n\nsig Member {\n borrowedBooks: set Book\n}\n\nfact UniqueBorrow {\n all b: Book | lone b.~borrowedBooks\n}\n\npred borrowBook(m: Member, b: Book) {\n b in m.borrowedBooks\n}\n\nassert MaxBorrowLimit {\n all m: Member | #m.borrowedBooks <= 3\n}\n\nrun { some m: Member, b: Book | b in m.borrowedBooks } for 3 Book, 3 Member\ncheck MaxBorrowLimit", "permalink": "unsafe-manor-crate-cement", "time": "2024-11-18 16:01:47.592635", "cmd": 1} {"id": 23859, "parent": 23858, "code": "sig Book {\n title: one \"GDgd\",\n author: one \"Henry\"\n}\n\nsig Member {\n borrowedBooks: set Book\n}\n\nfact UniqueBorrow {\n all b: Book | lone b.~borrowedBooks\n}\n\npred borrowBook(m: Member, b: Book) {\n b in m.borrowedBooks\n}\n\nassert MaxBorrowLimit {\n all m: Member | #m.borrowedBooks <= 3\n}\n\nrun { some m: Member, b: Book | b in m.borrowedBooks } for 3 Book, 3 Member\ncheck MaxBorrowLimit", "permalink": "decode-nifty-conch-pants", "time": "2024-11-18 16:01:55.318317", "cmd": 1} {"id": 23861, "parent": 23860, "code": "sig Book {\n title: set String,\n author: set String,\n Id: one String\n}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int {\n #Book - #({b: Book | no b.~borrowedBooks})\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "pout-sierra-bundle-giver", "time": "2024-11-18 16:02:39.289853", "cmd": 1} {"id": 23862, "parent": 23861, "code": "sig Book {\n title: set String,\n author: set String,\n Id: one String\n}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int {\n #Book - #({b: Book | no b.~borrowedBooks})\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "cure-ion-cake-deduce", "time": "2024-11-18 16:02:40.363855", "cmd": 1} {"id": 23863, "parent": 23862, "code": "sig Book {\n title: set String,\n author: set String,\n Id: one String\n}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int {\n #Book - #({b: Book | no b.~borrowedBooks})\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "skier-prison-bobcat-scroll", "time": "2024-11-18 16:02:41.749618", "cmd": 1} {"id": 23860, "parent": 23850, "code": "sig Book {\n title: set String,\n author: set String,\n Id: one String\n}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int {\n #Book - #({b: Book | no b.~borrowedBooks})\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "cable-scared-juice-yippee", "time": "2024-11-18 16:02:37.211534", "cmd": 1} {"id": 23864, "parent": 23863, "code": "sig Book {\n title: set String,\n author: set String,\n Id: one String\n}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int {\n #Book - #({b: Book | no b.~borrowedBooks})\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "moaner-tumble-graded-prayer", "time": "2024-11-18 16:02:43.285087", "cmd": 1} {"id": 23865, "parent": 23864, "code": "sig Book {\n title: some \"C++\", \"Python\",\n author: set String,\n Id: one String\n}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int {\n #Book - #({b: Book | no b.~borrowedBooks})\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "shrimp-cake-sultry-corral", "time": "2024-11-18 16:03:35.474802", "cmd": 1} {"id": 23866, "parent": 23865, "code": "sig Book {\n title: one \"Daffodils\",\n author: one \"William Shakespare\",\n Id: one 2201\n}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int {\n #Book - #({b: Book | no b.~borrowedBooks})\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "caress-grit-shack-avoid", "time": "2024-11-18 16:05:30.361146", "cmd": 1} {"id": 23867, "parent": 23866, "code": "sig Book {\n title: one \"Daffodils\",\n author: one \"William Shakespare\",\n Id: one \"2201\"\n}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int {\n #Book - #({b: Book | no b.~borrowedBooks})\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "hubcap-pueblo-shrink-shrine", "time": "2024-11-18 16:06:10.509340", "cmd": 1} {"id": 23868, "parent": 23867, "code": "sig Book {\n title: one \"Daffodils\",\n author: one \"William Shakespare\",\n Id: one \"2201\"\n}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int {\n Book - ({b: Book | no b.~borrowedBooks})\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "scant-lard-quake-five", "time": "2024-11-18 16:06:57.896902", "cmd": 1} {"id": 23869, "parent": 23868, "code": "sig Book {\n title: one \"Daffodils\",\n author: one \"William Shakespare\",\n Id: one \"2201\"\n}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int {\n ({b: Book | no b.~borrowedBooks})\n}\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "clamp-cork-cussed-gazing", "time": "2024-11-18 16:07:14.328628", "cmd": 1} {"id": 23870, "parent": 23869, "code": "sig Book {\n title: one \"Daffodils\",\n author: one \"William Shakespare\",\n Id: lone \"2201\"\n}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int { ({b: Book | no b.borrowedBooks}) }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "avenge-drone-pasted-false", "time": "2024-11-18 16:14:32.264934", "cmd": 1} {"id": 23871, "parent": 23870, "code": "sig Book {\n title: one \"Daffodils\",\n author: one \"William Shakespare\",\n Id: one \"2201\"\n}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int { ({b: Book | no b.borrowedBooks}) }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "blank-feeble-mutiny-obtuse", "time": "2024-11-18 16:15:08.064890", "cmd": 1} {"id": 23874, "parent": 23873, "code": "sig Book {\n title: one \"Daffodils\",\n author: one \"William Shakespare\",\n Id: one \"2201\"\n}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int { ({b: Book | no b.borrowedBooks}) }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "upon-wife-shrubs-revise", "time": "2024-11-18 16:16:25.430424", "cmd": 1} {"id": 23877, "parent": 23876, "code": "sig Book {\n title: one \"Daffodils\",\n author: one \"William Shakespare\",\n Id: one \"2201\"\n}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int { ({b: Book | no b.borrowedBooks}) }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "outfit-prissy-mutual-afford", "time": "2024-11-18 16:17:31.008731", "cmd": 1} {"id": 23872, "parent": 23871, "code": "sig Book {\n title: one \"Daffodils\",\n author: one \"William Shakespare\",\n Id: one \"2201\"\n}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int { ({b: Book | no b.~borrowedBooks}) }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "snuff-life-barrel-blah", "time": "2024-11-18 16:15:35.258798", "cmd": 1} {"id": 23873, "parent": 23872, "code": "sig Book {\n title: one \"Daffodils\",\n author: one \"William Shakespare\",\n Id: lone \"2201\"\n}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int { ({b: Book | no b.~borrowedBooks}) }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "probe-casino-cage-oxygen", "time": "2024-11-18 16:15:48.609993", "cmd": 1} {"id": 23875, "parent": 23874, "code": "sig Book {\n title: one \"Daffodils\",\n author: one \"William Shakespare\",\n Id: some \"2201\"\n}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int { ({b: Book | no b.borrowedBooks}) }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "whole-laptop-grill-pulse", "time": "2024-11-18 16:17:05.936307", "cmd": 1} {"id": 23876, "parent": 23875, "code": "sig Book {\n title: one \"Daffodils\",\n author: one \"William Shakespare\",\n Id: 1 \"2201\"\n}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int { ({b: Book | no b.borrowedBooks}) }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "snare-aflame-garnet-arrest", "time": "2024-11-18 16:17:23.302960", "cmd": 1} {"id": 23878, "parent": 23877, "code": "sig Book {\n title: one \"Daffodils\",\n author: one \"William Shakespare\",\n Id: one \"2201\"\n}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nfact UniqueId{ all i:Id | lone i.Book}\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int { ({b: Book | no b.borrowedBooks}) }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "oval-marrow-take-dose", "time": "2024-11-18 16:19:25.753322", "cmd": 1} {"id": 23879, "parent": 23878, "code": "sig Book {\n title: one \"Daffodils\",\n author: one \"William Shakespare\",\n Id: one \"2201\"\n}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nfact UniqueId{ all i:Id | lone i in borrowedBooks}\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int { ({b: Book | no b.borrowedBooks}) }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "mower-recopy-fifth-velcro", "time": "2024-11-18 16:20:22.353738", "cmd": 1} {"id": 23880, "parent": 23879, "code": "sig Book {\n title: one \"Daffodils\",\n author: one \"William Shakespare\",\n Id: one \"2201\"\n}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nfact UniqueId{ all i:Id | set book }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int { ({b: Book | no b.borrowedBooks}) }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "oboe-whinny-delete-gray", "time": "2024-11-18 16:21:04.832787", "cmd": 1} {"id": 23881, "parent": 23880, "code": "sig Book {\n title: one \"Daffodils\",\n author: one \"William Shakespare\",\n Id: one \"2201\"\n}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nfact UniqueId{ all i:Id | set Id.Book }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int { ({b: Book | no b.borrowedBooks}) }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "macaw-letter-user-lilly", "time": "2024-11-18 16:21:31.711533", "cmd": 1} {"id": 23882, "parent": 23881, "code": "sig Book {\n title: one \"Daffodils\",\n author: one \"William Shakespare\",\n Id: one \"2201\"\n}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nfact UniqueId{ all i:Id | Id.Book }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int { ({b: Book | no b.borrowedBooks}) }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "chirpy-blog-await-coping", "time": "2024-11-18 16:21:40.572276", "cmd": 1} {"id": 23883, "parent": 23882, "code": "sig Book {\n title: one \"Daffodils\",\n author: one \"William Shakespare\",\n Id: one \"2201\"\n}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nfact UniqueId{ all i:Id | Id.~Book }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int { ({b: Book | no b.borrowedBooks}) }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "twerp-faster-blush-hurray", "time": "2024-11-18 16:21:49.325999", "cmd": 1} {"id": 23884, "parent": 23883, "code": "sig Book {\n title: one \"Daffodils\",\n author: one \"William Shakespare\",\n Id: one \"2201\"\n}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nfact UniqueId{ all b:Book | one b.Id }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int { ({b: Book | no b.borrowedBooks}) }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "goon-detail-gully-unlit", "time": "2024-11-18 16:22:28.867677", "cmd": 1} {"id": 23889, "parent": 23888, "code": "sig Book {\n title: one \"Daffodils\",\n author: one \"William Shakespare\",\n Id: one \"2201\"\n}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nfact UniqueId{ all b:Book | one b.Id }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int { ({b: Book | no b.borrowedBooks}) }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "salsa-truce-aim-thread", "time": "2024-11-18 16:24:24.871643", "cmd": 1} {"id": 23885, "parent": 23884, "code": "sig Book {\n title: one \"Daffodils\",\n author: one \"William Shakespare\",\n Id: one \"2201\"\n}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nfact UniqueId{ all b:Book | lone b.Id }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int { ({b: Book | no b.borrowedBooks}) }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "catnip-pony-septum-ample", "time": "2024-11-18 16:23:32.849995", "cmd": 1} {"id": 23886, "parent": 23885, "code": "sig Book {\n title: one \"Daffodils\",\n author: one \"William Shakespare\",\n Id: one \"2201\"\n}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nfact UniqueId{ all b:Book | lone b.~Id }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int { ({b: Book | no b.borrowedBooks}) }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "attain-fossil-emblem-disarm", "time": "2024-11-18 16:23:46.410006", "cmd": 1} {"id": 23887, "parent": 23886, "code": "sig Book {\n title: one \"Daffodils\",\n author: one \"William Shakespare\",\n Id: one \"2201\"\n}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nfact UniqueId{ all b:Book | one b.~Id }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int { ({b: Book | no b.borrowedBooks}) }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "nibble-bulge-lucid-sitter", "time": "2024-11-18 16:24:07.618843", "cmd": 1} {"id": 23888, "parent": 23887, "code": "sig Book {\n title: one \"Daffodils\",\n author: one \"William Shakespare\",\n Id: one \"2201\"\n}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nfact UniqueId{ all b:Book | one ~b.Id }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int { ({b: Book | no b.borrowedBooks}) }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "senior-unify-anger-header", "time": "2024-11-18 16:24:19.262012", "cmd": 1} {"id": 23890, "parent": 23889, "code": "sig Book {\n title: one \"Daffodils\",\n author: one \"William Shakespare\",\n Id: one String\n}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nfact UniqueId{ all b:Book | one b.Id }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int { ({b: Book | no b.borrowedBooks}) }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "turret-breach-nearly-aids", "time": "2024-11-18 16:24:50.177658", "cmd": 1} {"id": 23891, "parent": 23859, "code": "sig Book {\n title: one \"Daffodils\",\n author: one \"William Shakespare\",\n Id: one \"2201\"\n}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks ,all b:Book | one b.Id}\n\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int { ({b: Book | no b.borrowedBooks}) }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "giblet-stream-carve-brick", "time": "2024-11-18 16:26:24.898182", "cmd": 1} {"id": 23894, "parent": 23893, "code": "sig Book {\n title: one \"Daffodils\",\n author: one \"William Shakespare\",\n Id: one \"2201\"\n}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks | one b.Id}\n\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int { ({b: Book | no b.borrowedBooks}) }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "twig-cold-ridden-gave", "time": "2024-11-18 16:27:11.362880", "cmd": 1} {"id": 23892, "parent": 23891, "code": "sig Book {\n title: one \"Daffodils\",\n author: one \"William Shakespare\",\n Id: one \"2201\"\n}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks | one b.Id}\n\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int { ({b: Book | no b.borrowedBooks}) }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "rarity-richly-sitter-sheath", "time": "2024-11-18 16:27:07.491119", "cmd": 1} {"id": 23893, "parent": 23892, "code": "sig Book {\n title: one \"Daffodils\",\n author: one \"William Shakespare\",\n Id: one \"2201\"\n}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks | one b.Id}\n\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int { ({b: Book | no b.borrowedBooks}) }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "volley-press-come-tycoon", "time": "2024-11-18 16:27:09.576873", "cmd": 1} {"id": 23895, "parent": 23894, "code": "sig Book {\n title: one \"Daffodils\",\n author: one \"William Shakespare\",\n Id: one \"2201\"\n}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { \n all b : Book | lone b.~borrowedBooks \n all b: Book |one b.Id}\n\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int { ({b: Book | no b.borrowedBooks}) }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "spouse-twitch-theme-slacks", "time": "2024-11-18 16:28:17.539946", "cmd": 1} {"id": 23896, "parent": 23895, "code": "sig Book {\n title: one \"Daffodils\",\n author: one \"William Shakespare\",\n Id: one String\n}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { \n all b : Book | lone b.~borrowedBooks \n all b: Book |one b.Id}\n\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int { ({b: Book | no b.borrowedBooks}) }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "waffle-barley-fetal-diaper", "time": "2024-11-18 16:29:56.715956", "cmd": 1} {"id": 23897, "parent": 23896, "code": "sig Book {\n title: one \"Daffodils\",\n author: one String,\n Id: one String\n}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { \n all b : Book | lone b.~borrowedBooks \n all b: Book |one b.Id}\n\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int { ({b: Book | no b.borrowedBooks}) }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "august-dab-taste-ashen", "time": "2024-11-18 16:30:11.034642", "cmd": 1} {"id": 23898, "parent": 6741, "code": "sig AcademicYear {\n semesters: set Semester\n}\n\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n courses: set Course\n}\n\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n// Summer is optional\n\nsig Student {\n rollNumber: one String,\n attendance: one Attendance,\n courses: set Course,\n registeredSemester: one Semester,\n scholarship: lone Scholarship,\n feesPaid: one Bool,\n academicWarning: one Bool\n}\n\nsig Course {\n name: one String,\n creditHours: one Int,\n preReqs: set Course\n}\n\nsig Scholarship {\n name: one String\n}\n\nsig Attendance {\n totalLectures: one Int,\n attendedLectures: one Int\n}\n\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n\nfact AcademicYearRules {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4\n all s: Semester | s.endDate.day > s.startDate.day or \n s.endDate.month > s.startDate.month // Rule 3\n all s: Summer | s.startDate.month = 6 and s.endDate.month = 7 // Rule 2 (special semester duration)\n all s: Spring + Fall | s.endDate.day - s.startDate.day >= 17 * 7 // Rule 2 (Spring and Fall duration)\n}\n\nfact StudentRules {\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber // Rule 5\n\n // Attendance constraints\n all s: Student | \n let total = s.attendance.totalLectures,\n attended = s.attendance.attendedLectures |\n attended >= 0.8 * total // Rule 6\n\n // Medium of instruction\n all c: Course | c.name = \"Religious and Islamic Studies\" implies\n (some lang: String | lang in {\"English\", \"Urdu\"}) // Rule 7\n\n // Students must pay fees for fall/spring\n all s: Student | (s.registeredSemester in Spring + Fall) implies s.feesPaid // Rule 12\n\n // A student can freeze a semester\n all s: Student | #s.registeredSemester <= 2 // Rules 14, 15\n}\n\nfact CourseRules {\n // Normal load: 5 courses (15-18 credit hours)\n all s: Student | #s.courses >= 5 and #s.courses.creditHours <= 18 // Rules 8, 18\n\n // Pre-reqs must be completed\n all s: Student | \n all c: s.courses | c.preReqs in s.courses // Rule 18\n\n // Summer rules\n all s: Student |\n s.registeredSemester = Summer implies \n (all c: s.courses | c in s.courses and #s.courses <= 2) // Rules 19a, 19b, 19c\n}\n\nfact ScholarshipRules {\n // No scholarship in summer\n all s: Student | s.registeredSemester = Summer implies no s.scholarship // Rule 19d\n\n // Scholarship cancellation on academic warning\n all s: Student | \n s.scholarship.name = \"FAST\" and s.academicWarning = true implies no s.scholarship // Rule 11\n}\n\nfact CreditTransfer {\n // Credit transfer criteria\n all c: Course |\n c.creditHours >= 3 implies\n (c.grade >= \"C\" and c.name in {\"Bachelor\"}) or\n (c.grade >= \"B-\" and c.name in {\"Master\"}) // Rule 20a\n}\n\nfact CreditTransfer {\n // Credit transfer criteria\n all c: Course |\n c.creditHours >= 3 implies\n (c.grade >= \"C\" and c.name in {\"Bachelor\"}) or\n (c.grade >= \"B-\" and c.name in {\"Master\"}) // Rule 20a\n}\n\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\n\nassert AttendanceEligibility {\n all s: Student | \n s.attendance.attendedLectures >= 0.8 * s.attendance.totalLectures implies \n s.eligibleForExam = true\n}\n\nassert CreditTransferConsistency {\n all s: Student | \n all c: s.courses | c.preReqs.creditHours <= c.creditHours\n}", "permalink": "whoops-tug-enamel-late", "time": "2024-11-18 16:30:29.781586", "cmd": 1} {"id": 23899, "parent": 23897, "code": "sig Book {\n title: one String,\n author: one String,\n Id: one String\n}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { \n all b : Book | lone b.~borrowedBooks \n all b: Book |one b.Id}\n\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int { ({b: Book | no b.borrowedBooks}) }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "feed-chug-bash-yo-yo", "time": "2024-11-18 16:30:31.624073", "cmd": 1} {"id": 23900, "parent": 23898, "code": "sig AcademicYear {\n semesters: set Semester\n}\n\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n courses: set Course\n}\n\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n// Summer is optional\n\nsig Student {\n rollNumber: one String,\n attendance: one Attendance,\n courses: set Course,\n registeredSemester: one Semester,\n scholarship: lone Scholarship,\n feesPaid: one Bool,\n academicWarning: one Bool\n}\n\nsig Course {\n name: one String,\n creditHours: one Int,\n preReqs: set Course\n}\n\nsig Scholarship {\n name: one String\n}\n\nsig Attendance {\n totalLectures: one Int,\n attendedLectures: one Int\n}\n\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n\nfact AcademicYearRules {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4\n all s: Semester | s.endDate.day > s.startDate.day or \n s.endDate.month > s.startDate.month // Rule 3\n all s: Summer | s.startDate.month = 6 and s.endDate.month = 7 // Rule 2 (special semester duration)\n all s: Spring + Fall | s.endDate.day - s.startDate.day >= 17 * 7 // Rule 2 (Spring and Fall duration)\n}\n\nfact StudentRules {\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber // Rule 5\n\n // Attendance constraints\n all s: Student | \n let total = s.attendance.totalLectures,\n attended = s.attendance.attendedLectures |\n attended >= 0.8 * total // Rule 6\n\n // Medium of instruction\n all c: Course | c.name = \"Religious and Islamic Studies\" ->\n (some lang: String | lang in {\"English\", \"Urdu\"}) // Rule 7\n\n // Students must pay fees for fall/spring\n all s: Student | (s.registeredSemester in Spring + Fall) implies s.feesPaid // Rule 12\n\n // A student can freeze a semester\n all s: Student | #s.registeredSemester <= 2 // Rules 14, 15\n}\n\nfact CourseRules {\n // Normal load: 5 courses (15-18 credit hours)\n all s: Student | #s.courses >= 5 and #s.courses.creditHours <= 18 // Rules 8, 18\n\n // Pre-reqs must be completed\n all s: Student | \n all c: s.courses | c.preReqs in s.courses // Rule 18\n\n // Summer rules\n all s: Student |\n s.registeredSemester = Summer implies \n (all c: s.courses | c in s.courses and #s.courses <= 2) // Rules 19a, 19b, 19c\n}\n\nfact ScholarshipRules {\n // No scholarship in summer\n all s: Student | s.registeredSemester = Summer implies no s.scholarship // Rule 19d\n\n // Scholarship cancellation on academic warning\n all s: Student | \n s.scholarship.name = \"FAST\" and s.academicWarning = true implies no s.scholarship // Rule 11\n}\n\nfact CreditTransfer {\n // Credit transfer criteria\n all c: Course |\n c.creditHours >= 3 implies\n (c.grade >= \"C\" and c.name in {\"Bachelor\"}) or\n (c.grade >= \"B-\" and c.name in {\"Master\"}) // Rule 20a\n}\n\nfact CreditTransfer {\n // Credit transfer criteria\n all c: Course |\n c.creditHours >= 3 implies\n (c.grade >= \"C\" and c.name in {\"Bachelor\"}) or\n (c.grade >= \"B-\" and c.name in {\"Master\"}) // Rule 20a\n}\n\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\n\nassert AttendanceEligibility {\n all s: Student | \n s.attendance.attendedLectures >= 0.8 * s.attendance.totalLectures implies \n s.eligibleForExam = true\n}\n\nassert CreditTransferConsistency {\n all s: Student | \n all c: s.courses | c.preReqs.creditHours <= c.creditHours\n}", "permalink": "lugged-civic-gap-grasp", "time": "2024-11-18 16:30:54.704513", "cmd": 1} {"id": 23901, "parent": 23899, "code": "sig Book {\n title: one String,\n author: one String,\n Id: one id\n}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { \n all b : Book | lone b.~borrowedBooks \n all b: Book |one b.Id}\n\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int { ({b: Book | no b.borrowedBooks}) }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "impose-dealer-stuffy-legend", "time": "2024-11-18 16:30:58.924576", "cmd": 1} {"id": 23902, "parent": 23900, "code": "sig AcademicYear {\n semesters: set Semester\n}\n\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n courses: set Course\n}\n\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n// Summer is optional\n\nsig Student {\n rollNumber: one String,\n attendance: one Attendance,\n courses: set Course,\n registeredSemester: one Semester,\n scholarship: lone Scholarship,\n feesPaid: one Bool,\n academicWarning: one Bool\n}\n\nsig Course {\n name: one String,\n creditHours: one Int,\n preReqs: set Course\n}\n\nsig Scholarship {\n name: one String\n}\n\nsig Attendance {\n totalLectures: one Int,\n attendedLectures: one Int\n}\n\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n\nfact AcademicYearRules {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4\n all s: Semester | s.endDate.day > s.startDate.day or \n s.endDate.month > s.startDate.month // Rule 3\n all s: Summer | s.startDate.month = 6 and s.endDate.month = 7 // Rule 2 (special semester duration)\n all s: Spring + Fall | s.endDate.day - s.startDate.day >= 17 * 7 // Rule 2 (Spring and Fall duration)\n}\n\nfact StudentRules {\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber // Rule 5\n\n // Attendance constraints\n all s: Student | \n let total = s.attendance.totalLectures,\n attended = s.attendance.attendedLectures |\n attended >= 0.8 * total // Rule 6\n\n // Medium of instruction\n all c: Course | c.name = \"Religious and Islamic Studies\" =>\n (some lang: String | lang in {\"English\", \"Urdu\"}) // Rule 7\n\n // Students must pay fees for fall/spring\n all s: Student | (s.registeredSemester in Spring + Fall) implies s.feesPaid // Rule 12\n\n // A student can freeze a semester\n all s: Student | #s.registeredSemester <= 2 // Rules 14, 15\n}\n\nfact CourseRules {\n // Normal load: 5 courses (15-18 credit hours)\n all s: Student | #s.courses >= 5 and #s.courses.creditHours <= 18 // Rules 8, 18\n\n // Pre-reqs must be completed\n all s: Student | \n all c: s.courses | c.preReqs in s.courses // Rule 18\n\n // Summer rules\n all s: Student |\n s.registeredSemester = Summer implies \n (all c: s.courses | c in s.courses and #s.courses <= 2) // Rules 19a, 19b, 19c\n}\n\nfact ScholarshipRules {\n // No scholarship in summer\n all s: Student | s.registeredSemester = Summer implies no s.scholarship // Rule 19d\n\n // Scholarship cancellation on academic warning\n all s: Student | \n s.scholarship.name = \"FAST\" and s.academicWarning = true implies no s.scholarship // Rule 11\n}\n\nfact CreditTransfer {\n // Credit transfer criteria\n all c: Course |\n c.creditHours >= 3 implies\n (c.grade >= \"C\" and c.name in {\"Bachelor\"}) or\n (c.grade >= \"B-\" and c.name in {\"Master\"}) // Rule 20a\n}\n\nfact CreditTransfer {\n // Credit transfer criteria\n all c: Course |\n c.creditHours >= 3 implies\n (c.grade >= \"C\" and c.name in {\"Bachelor\"}) or\n (c.grade >= \"B-\" and c.name in {\"Master\"}) // Rule 20a\n}\n\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\n\nassert AttendanceEligibility {\n all s: Student | \n s.attendance.attendedLectures >= 0.8 * s.attendance.totalLectures implies \n s.eligibleForExam = true\n}\n\nassert CreditTransferConsistency {\n all s: Student | \n all c: s.courses | c.preReqs.creditHours <= c.creditHours\n}", "permalink": "unseen-aside-viewer-manned", "time": "2024-11-18 16:31:04.110235", "cmd": 1} {"id": 23903, "parent": 23901, "code": "sig Book {\n title: one String,\n author: one String,\n Id: (\"2201\", \"2202\")\n}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { \n all b : Book | lone b.~borrowedBooks \n all b: Book |one b.Id}\n\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int { ({b: Book | no b.borrowedBooks}) }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "relock-vibes-grinch-ahoy", "time": "2024-11-18 16:31:44.880953", "cmd": 1} {"id": 24108, "parent": null, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int { ({b: Book | no b.borrowedBooks}) }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "tank-elk-chewer-footer", "time": "2024-11-18 20:13:24.866727", "cmd": 1} {"id": 24109, "parent": 24108, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int { ({b: Book | no b.borrowedBooks}) }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "cape-ritzy-fame-nest", "time": "2024-11-18 20:13:37.107006", "cmd": 2} {"id": 23904, "parent": 23890, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int { ({b: Book | no b.borrowedBooks}) }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 3 Book, 3 Person\ncheck NoDuplicateBorrowing", "permalink": "buggy-aspire-echo-chief", "time": "2024-11-18 16:32:40.581686", "cmd": 1} {"id": 23905, "parent": 23902, "code": "sig AcademicYear {\n semesters: set Semester\n}\n\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n courses: set Course\n}\n\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n// Summer is optional\n\nsig Student {\n rollNumber: one String,\n attendance: one Attendance,\n courses: set Course,\n registeredSemester: one Semester,\n scholarship: lone Scholarship,\n feesPaid: one Bool,\n academicWarning: one Bool\n}\n\nsig Course {\n name: one String,\n creditHours: one Int,\n preReqs: set Course\n}\n\nsig Scholarship {\n name: one String\n}\n\nsig Attendance {\n totalLectures: one Int,\n attendedLectures: one Int\n}\n\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n\nabstract sig Language {}\none sig English extends Language {}\none sig Urdu extends Language {}\n\n\nfact AcademicYearRules {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4\n all s: Semester | s.endDate.day > s.startDate.day or \n s.endDate.month > s.startDate.month // Rule 3\n all s: Summer | s.startDate.month = 6 and s.endDate.month = 7 // Rule 2 (special semester duration)\n all s: Spring + Fall | s.endDate.day - s.startDate.day >= 17 * 7 // Rule 2 (Spring and Fall duration)\n}\n\nfact StudentRules {\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber // Rule 5\n\n // Attendance constraints\n all s: Student | \n let total = s.attendance.totalLectures,\n attended = s.attendance.attendedLectures |\n attended >= 0.8 * total // Rule 6\n\n // Medium of instruction\n all c: Course | \n c.name = \"Religious and Islamic Studies\" implies \n (some l: Language | l in English + Urdu) // Rule 7\n\n // Students must pay fees for fall/spring\n all s: Student | (s.registeredSemester in Spring + Fall) implies s.feesPaid // Rule 12\n\n // A student can freeze a semester\n all s: Student | #s.registeredSemester <= 2 // Rules 14, 15\n}\n\nfact CourseRules {\n // Normal load: 5 courses (15-18 credit hours)\n all s: Student | #s.courses >= 5 and #s.courses.creditHours <= 18 // Rules 8, 18\n\n // Pre-reqs must be completed\n all s: Student | \n all c: s.courses | c.preReqs in s.courses // Rule 18\n\n // Summer rules\n all s: Student |\n s.registeredSemester = Summer implies \n (all c: s.courses | c in s.courses and #s.courses <= 2) // Rules 19a, 19b, 19c\n}\n\nfact ScholarshipRules {\n // No scholarship in summer\n all s: Student | s.registeredSemester = Summer implies no s.scholarship // Rule 19d\n\n // Scholarship cancellation on academic warning\n all s: Student | \n s.scholarship.name = \"FAST\" and s.academicWarning = true implies no s.scholarship // Rule 11\n}\n\nfact CreditTransfer {\n // Credit transfer criteria\n all c: Course |\n c.creditHours >= 3 implies\n (c.grade >= \"C\" and c.name in {\"Bachelor\"}) or\n (c.grade >= \"B-\" and c.name in {\"Master\"}) // Rule 20a\n}\n\nfact CreditTransfer {\n // Credit transfer criteria\n all c: Course |\n c.creditHours >= 3 implies\n (c.grade >= \"C\" and c.name in {\"Bachelor\"}) or\n (c.grade >= \"B-\" and c.name in {\"Master\"}) // Rule 20a\n}\n\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\n\nassert AttendanceEligibility {\n all s: Student | \n s.attendance.attendedLectures >= 0.8 * s.attendance.totalLectures implies \n s.eligibleForExam = true\n}\n\nassert CreditTransferConsistency {\n all s: Student | \n all c: s.courses | c.preReqs.creditHours <= c.creditHours\n}", "permalink": "patio-mating-skinny-deluxe", "time": "2024-11-18 16:33:18.648624", "cmd": 1} {"id": 24107, "parent": 23909, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int { ({b: Book | no b.borrowedBooks}) }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 6 Book, 6 Person\ncheck NoDuplicateBorrowing", "permalink": "lugged-thong-easter-elbow", "time": "2024-11-18 20:08:15.910905", "cmd": 1} {"id": 23909, "parent": 23904, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int { ({b: Book | no b.borrowedBooks}) }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 6 Book, 6 Person\ncheck NoDuplicateBorrowing", "permalink": "talon-cinema-refold-shut", "time": "2024-11-18 16:35:47.149935", "cmd": 1} {"id": 23910, "parent": 23905, "code": "sig AcademicYear {\n semesters: set Semester\n}\n\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n courses: set Course\n}\n\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n// Summer is optional\n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\n\nsig Student {\n rollNumber: one String,\n attendance: one Attendance,\n courses: set Course,\n registeredSemester: one Semester,\n scholarship: lone Scholarship,\n feesPaid: one Boolean,\n academicWarning: one Boolean\n}\n\nsig Course {\n name: one String,\n creditHours: one Int,\n preReqs: set Course\n}\n\nsig Scholarship {\n name: one String\n}\n\nsig Attendance {\n totalLectures: one Int,\n attendedLectures: one Int\n}\n\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n\nabstract sig Language {}\none sig English extends Language {}\none sig Urdu extends Language {}\n\n\nfact AcademicYearRules {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4\n all s: Semester | s.endDate.day > s.startDate.day or \n s.endDate.month > s.startDate.month // Rule 3\n all s: Summer | s.startDate.month = 6 and s.endDate.month = 7 // Rule 2 (special semester duration)\n all s: Spring + Fall | s.endDate.day - s.startDate.day >= 17 * 7 // Rule 2 (Spring and Fall duration)\n}\n\nfact StudentRules {\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber // Rule 5\n\n // Attendance constraints\n all s: Student | \n let total = s.attendance.totalLectures,\n attended = s.attendance.attendedLectures |\n attended >= 0.8 * total // Rule 6\n\n // Medium of instruction\n all c: Course | \n c.name = \"Religious and Islamic Studies\" implies \n (some l: Language | l in English + Urdu) // Rule 7\n\n // Students must pay fees for fall/spring\n all s: Student | (s.registeredSemester in Spring + Fall) implies s.feesPaid // Rule 12\n\n // A student can freeze a semester\n all s: Student | #s.registeredSemester <= 2 // Rules 14, 15\n}\n\nfact CourseRules {\n // Normal load: 5 courses (15-18 credit hours)\n all s: Student | #s.courses >= 5 and #s.courses.creditHours <= 18 // Rules 8, 18\n\n // Pre-reqs must be completed\n all s: Student | \n all c: s.courses | c.preReqs in s.courses // Rule 18\n\n // Summer rules\n all s: Student |\n s.registeredSemester = Summer implies \n (all c: s.courses | c in s.courses and #s.courses <= 2) // Rules 19a, 19b, 19c\n}\n\nfact ScholarshipRules {\n // No scholarship in summer\n all s: Student | s.registeredSemester = Summer implies no s.scholarship // Rule 19d\n\n // Scholarship cancellation on academic warning\n all s: Student | \n s.scholarship.name = \"FAST\" and s.academicWarning = true implies no s.scholarship // Rule 11\n}\n\nfact CreditTransfer {\n // Credit transfer criteria\n all c: Course |\n c.creditHours >= 3 implies\n (c.grade >= \"C\" and c.name in {\"Bachelor\"}) or\n (c.grade >= \"B-\" and c.name in {\"Master\"}) // Rule 20a\n}\n\nfact CreditTransfer {\n // Credit transfer criteria\n all c: Course |\n c.creditHours >= 3 implies\n (c.grade >= \"C\" and c.name in {\"Bachelor\"}) or\n (c.grade >= \"B-\" and c.name in {\"Master\"}) // Rule 20a\n}\n\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\n\nassert AttendanceEligibility {\n all s: Student | \n s.attendance.attendedLectures >= 0.8 * s.attendance.totalLectures implies \n s.eligibleForExam = true\n}\n\nassert CreditTransferConsistency {\n all s: Student | \n all c: s.courses | c.preReqs.creditHours <= c.creditHours\n}", "permalink": "mooned-primal-quail-hurdle", "time": "2024-11-18 16:36:01.709962", "cmd": 1} {"id": 23913, "parent": 23910, "code": "sig AcademicYear {\n semesters: set Semester\n}\n\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n courses: set Course\n}\n\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n// Summer is optional\n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\n\nsig Student {\n rollNumber: one String,\n attendance: one Attendance,\n courses: set Course,\n registeredSemester: one Semester,\n scholarship: lone Scholarship,\n feesPaid: one Boolean,\n academicWarning: one Boolean\n}\n\nsig Course {\n name: one String,\n creditHours: one Int,\n preReqs: set Course\n}\n\nsig Scholarship {\n name: one String\n}\n\nsig Attendance {\n totalLectures: one Int,\n attendedLectures: one Int\n}\n\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n\nabstract sig Language {}\none sig English extends Language {}\none sig Urdu extends Language {}\n\n\nfact AcademicYearRules {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4\n all s: Semester | s.endDate.day > s.startDate.day or \n s.endDate.month > s.startDate.month // Rule 3\n all s: Summer | s.startDate.month = 6 and s.endDate.month = 7 // Rule 2 (special semester duration)\n all s: Spring + Fall | s.endDate.day - s.startDate.day >= 17 * 7 // Rule 2 (Spring and Fall duration)\n}\n\nfact StudentRules {\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber // Rule 5\n\n // Attendance constraints\n all s: Student | \n let total = s.attendance.totalLectures,\n attended = s.attendance.attendedLectures |\n attended >= 0.8 * total // Rule 6\n\n // Medium of instruction\n all c: Course | \n c.name = \"Religious and Islamic Studies\" implies \n (some l: Language | l in English + Urdu) // Rule 7\n\n // Students must pay fees for fall/spring\n all s: Student | (s.registeredSemester in Spring + Fall) implies s.feesPaid // Rule 12\n\n // A student can freeze a semester\n all s: Student | #s.registeredSemester <= 2 // Rules 14, 15\n}\n\nfact CourseRules {\n // Normal load: 5 courses (15-18 credit hours)\n all s: Student | #s.courses >= 5 and #s.courses.creditHours <= 18 // Rules 8, 18\n\n // Pre-reqs must be completed\n all s: Student | \n all c: s.courses | c.preReqs in s.courses // Rule 18\n\n // Summer rules\n all s: Student |\n s.registeredSemester = Summer implies \n (all c: s.courses | c in s.courses and #s.courses <= 2) // Rules 19a, 19b, 19c\n}\n\nfact ScholarshipRules {\n // No scholarship in summer\n all s: Student | s.registeredSemester = Summer implies no s.scholarship // Rule 19d\n\n // Scholarship cancellation on academic warning\n all s: Student | \n s.scholarship.name = \"FAST\" and s.academicWarning = true implies no s.scholarship // Rule 11\n}\n\nfact CreditTransfer {\n // Credit transfer criteria\n all c: Course |\n c.creditHours >= 3 implies\n (c.grade >= \"C\" and c.name in {\"Bachelor\"}) or\n (c.grade >= \"B-\" and c.name in {\"Master\"}) // Rule 20a\n}\n\nfact CreditTransfer {\n // Credit transfer criteria\n all c: Course |\n c.creditHours >= 3 implies\n (c.grade >= \"C\" and c.name in {\"Bachelor\"}) or\n (c.grade >= \"B-\" and c.name in {\"Master\"}) // Rule 20a\n}\n\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\n\n// assert AttendanceEligibility {\n// all s: Student | \n// s.attendance.attendedLectures >= 0.8 * s.attendance.totalLectures implies \n// s.eligibleForExam = true\n// }\n\nassert CreditTransferConsistency {\n all s: Student | \n all c: s.courses | c.preReqs.creditHours <= c.creditHours\n}", "permalink": "legacy-ladies-sprig-quilt", "time": "2024-11-18 16:37:46.324475", "cmd": 1} {"id": 23916, "parent": 23914, "code": "sig AcademicYear {\n semesters: set Semester\n}\n\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n courses: set Course\n}\n\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n// Summer is optional\n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\n\nsig Student {\n rollNumber: one String,\n attendance: one Attendance,\n courses: set Course,\n registeredSemester: one Semester,\n scholarship: lone Scholarship,\n feesPaid: one Boolean,\n academicWarning: one Boolean\n}\n\nsig Course {\n name: one String,\n creditHours: one Int,\n preReqs: set Course\n}\n\nsig Scholarship {\n name: one String\n}\n\nsig Attendance {\n totalLectures: one Int,\n attendedLectures: one Int\n}\n\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n\nabstract sig Language {}\none sig English extends Language {}\none sig Urdu extends Language {}\n\n\nfact AcademicYearRules {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4\n all s: Semester | s.endDate.day > s.startDate.day or \n s.endDate.month > s.startDate.month // Rule 3\n all s: Summer | s.startDate.month = 6 and s.endDate.month = 7 // Rule 2 (special semester duration)\n all s: Spring + Fall | s.endDate.day - s.startDate.day >= 17 * 7 // Rule 2 (Spring and Fall duration)\n}\n\nfact StudentRules {\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber // Rule 5\n\n // Attendance constraints\n all s: Student | \n let total = s.attendance.totalLectures,\n attended = s.attendance.attendedLectures |\n attended >= 0.8 * total // Rule 6\n\n // Medium of instruction\n all c: Course | \n c.name = \"Religious and Islamic Studies\" implies \n (some l: Language | l in English + Urdu) // Rule 7\n\n // Students must pay fees for fall/spring\n all s: Student | (s.registeredSemester in Spring + Fall) implies s.feesPaid // Rule 12\n\n // A student can freeze a semester\n all s: Student | #s.registeredSemester <= 2 // Rules 14, 15\n}\n\nfact CourseRules {\n // Normal load: 5 courses (15-18 credit hours)\n all s: Student | #s.courses >= 5 and #s.courses.creditHours <= 18 // Rules 8, 18\n\n // Pre-reqs must be completed\n all s: Student | \n all c: s.courses | c.preReqs in s.courses // Rule 18\n\n // Summer rules\n all s: Student |\n s.registeredSemester = Summer implies \n (all c: s.courses | c in s.courses and #s.courses <= 2) // Rules 19a, 19b, 19c\n}\n\nfact ScholarshipRules {\n // No scholarship in summer\n all s: Student | s.registeredSemester = Summer implies no s.scholarship // Rule 19d\n\n // Scholarship cancellation on academic warning\n all s: Student | \n s.scholarship.name = \"FAST\" and s.academicWarning = true implies no s.scholarship // Rule 11\n}\n\nfact CreditTransfer {\n // Credit transfer criteria\n all c: Course |\n c.creditHours >= 3 implies\n (c.grade >= \"C\" and c.name in {\"Bachelor\"}) or\n (c.grade >= \"B-\" and c.name in {\"Master\"}) // Rule 20a\n}\n\nfact CreditTransfer {\n // Credit transfer criteria\n all c: Course |\n c.creditHours >= 3 implies\n (c.grade >= \"C\" and c.name in {\"Bachelor\"}) or\n (c.grade >= \"B-\" and c.name in {\"Master\"}) // Rule 20a\n}\n\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\n\n// assert AttendanceEligibility {\n// all s: Student | \n// s.attendance.attendedLectures >= 0.8 * s.attendance.totalLectures implies \n// s.eligibleForExam = true\n// }\n\nassert CreditTransferConsistency {\n all s: Student | \n all c: s.courses | c.preReqs.creditHours <= c.creditHours\n}", "permalink": "cable-staff-dining-wasabi", "time": "2024-11-18 16:38:12.888879", "cmd": 1} {"id": 23914, "parent": 23913, "code": "sig AcademicYear {\n semesters: set Semester\n}\n\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n courses: set Course\n}\n\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n// Summer is optional\n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\n\nsig Student {\n rollNumber: one String,\n attendance: one Attendance,\n courses: set Course,\n registeredSemester: one Semester,\n scholarship: lone Scholarship,\n feesPaid: one Boolean,\n academicWarning: one Boolean\n}\n\nsig Course {\n name: one String,\n creditHours: one Int,\n preReqs: set Course\n}\n\nsig Scholarship {\n name: one String\n}\n\nsig Attendance {\n totalLectures: one Int,\n attendedLectures: one Int\n}\n\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n\nabstract sig Language {}\none sig English extends Language {}\none sig Urdu extends Language {}\n\n\nfact AcademicYearRules {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4\n all s: Semester | s.endDate.day > s.startDate.day or \n s.endDate.month > s.startDate.month // Rule 3\n all s: Summer | s.startDate.month = 6 and s.endDate.month = 7 // Rule 2 (special semester duration)\n all s: Spring + Fall | s.endDate.day - s.startDate.day >= 17*7 // Rule 2 (Spring and Fall duration)\n}\n\nfact StudentRules {\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber // Rule 5\n\n // Attendance constraints\n all s: Student | \n let total = s.attendance.totalLectures,\n attended = s.attendance.attendedLectures |\n attended >= 0.8 * total // Rule 6\n\n // Medium of instruction\n all c: Course | \n c.name = \"Religious and Islamic Studies\" implies \n (some l: Language | l in English + Urdu) // Rule 7\n\n // Students must pay fees for fall/spring\n all s: Student | (s.registeredSemester in Spring + Fall) implies s.feesPaid // Rule 12\n\n // A student can freeze a semester\n all s: Student | #s.registeredSemester <= 2 // Rules 14, 15\n}\n\nfact CourseRules {\n // Normal load: 5 courses (15-18 credit hours)\n all s: Student | #s.courses >= 5 and #s.courses.creditHours <= 18 // Rules 8, 18\n\n // Pre-reqs must be completed\n all s: Student | \n all c: s.courses | c.preReqs in s.courses // Rule 18\n\n // Summer rules\n all s: Student |\n s.registeredSemester = Summer implies \n (all c: s.courses | c in s.courses and #s.courses <= 2) // Rules 19a, 19b, 19c\n}\n\nfact ScholarshipRules {\n // No scholarship in summer\n all s: Student | s.registeredSemester = Summer implies no s.scholarship // Rule 19d\n\n // Scholarship cancellation on academic warning\n all s: Student | \n s.scholarship.name = \"FAST\" and s.academicWarning = true implies no s.scholarship // Rule 11\n}\n\nfact CreditTransfer {\n // Credit transfer criteria\n all c: Course |\n c.creditHours >= 3 implies\n (c.grade >= \"C\" and c.name in {\"Bachelor\"}) or\n (c.grade >= \"B-\" and c.name in {\"Master\"}) // Rule 20a\n}\n\nfact CreditTransfer {\n // Credit transfer criteria\n all c: Course |\n c.creditHours >= 3 implies\n (c.grade >= \"C\" and c.name in {\"Bachelor\"}) or\n (c.grade >= \"B-\" and c.name in {\"Master\"}) // Rule 20a\n}\n\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\n\n// assert AttendanceEligibility {\n// all s: Student | \n// s.attendance.attendedLectures >= 0.8 * s.attendance.totalLectures implies \n// s.eligibleForExam = true\n// }\n\nassert CreditTransferConsistency {\n all s: Student | \n all c: s.courses | c.preReqs.creditHours <= c.creditHours\n}", "permalink": "flaky-spray-scant-prune", "time": "2024-11-18 16:38:04.344747", "cmd": 1} {"id": 23917, "parent": 23916, "code": "sig AcademicYear {\n semesters: set Semester\n}\n\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n courses: set Course\n}\n\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n// Summer is optional\n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\n\nsig Student {\n rollNumber: one String,\n attendance: one Attendance,\n courses: set Course,\n registeredSemester: one Semester,\n scholarship: lone Scholarship,\n feesPaid: one Boolean,\n academicWarning: one Boolean\n}\n\nsig Course {\n name: one String,\n creditHours: one Int,\n preReqs: set Course\n}\n\nsig Scholarship {\n name: one String\n}\n\nsig Attendance {\n totalLectures: one Int,\n attendedLectures: one Int\n}\n\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n\nabstract sig Language {}\none sig English extends Language {}\none sig Urdu extends Language {}\n\n\nfact AcademicYearRules {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4\n all s: Semester | s.endDate.day > s.startDate.day or \n s.endDate.month > s.startDate.month // Rule 3\n all s: Summer | s.startDate.month = 6 and s.endDate.month = 7 // Rule 2 (special semester duration)\n all s: Spring + Fall | s.endDate.day - s.startDate.day >= (17 * 7) // Rule 2 (Spring and Fall duration)\n}\n\nfact StudentRules {\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber // Rule 5\n\n // Attendance constraints\n all s: Student | \n let total = s.attendance.totalLectures,\n attended = s.attendance.attendedLectures |\n attended >= 0.8 * total // Rule 6\n\n // Medium of instruction\n all c: Course | \n c.name = \"Religious and Islamic Studies\" implies \n (some l: Language | l in English + Urdu) // Rule 7\n\n // Students must pay fees for fall/spring\n all s: Student | (s.registeredSemester in Spring + Fall) implies s.feesPaid // Rule 12\n\n // A student can freeze a semester\n all s: Student | #s.registeredSemester <= 2 // Rules 14, 15\n}\n\nfact CourseRules {\n // Normal load: 5 courses (15-18 credit hours)\n all s: Student | #s.courses >= 5 and #s.courses.creditHours <= 18 // Rules 8, 18\n\n // Pre-reqs must be completed\n all s: Student | \n all c: s.courses | c.preReqs in s.courses // Rule 18\n\n // Summer rules\n all s: Student |\n s.registeredSemester = Summer implies \n (all c: s.courses | c in s.courses and #s.courses <= 2) // Rules 19a, 19b, 19c\n}\n\nfact ScholarshipRules {\n // No scholarship in summer\n all s: Student | s.registeredSemester = Summer implies no s.scholarship // Rule 19d\n\n // Scholarship cancellation on academic warning\n all s: Student | \n s.scholarship.name = \"FAST\" and s.academicWarning = true implies no s.scholarship // Rule 11\n}\n\nfact CreditTransfer {\n // Credit transfer criteria\n all c: Course |\n c.creditHours >= 3 implies\n (c.grade >= \"C\" and c.name in {\"Bachelor\"}) or\n (c.grade >= \"B-\" and c.name in {\"Master\"}) // Rule 20a\n}\n\nfact CreditTransfer {\n // Credit transfer criteria\n all c: Course |\n c.creditHours >= 3 implies\n (c.grade >= \"C\" and c.name in {\"Bachelor\"}) or\n (c.grade >= \"B-\" and c.name in {\"Master\"}) // Rule 20a\n}\n\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\n\n// assert AttendanceEligibility {\n// all s: Student | \n// s.attendance.attendedLectures >= 0.8 * s.attendance.totalLectures implies \n// s.eligibleForExam = true\n// }\n\nassert CreditTransferConsistency {\n all s: Student | \n all c: s.courses | c.preReqs.creditHours <= c.creditHours\n}", "permalink": "proton-glass-swoop-change", "time": "2024-11-18 16:38:20.620980", "cmd": 1} {"id": 23920, "parent": 23917, "code": "sig AcademicYear {\n semesters: set Semester\n}\n\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n courses: set Course\n}\n\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n// Summer is optional\n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\n\nsig Student {\n rollNumber: one String,\n attendance: one Attendance,\n courses: set Course,\n registeredSemester: one Semester,\n scholarship: lone Scholarship,\n feesPaid: one Boolean,\n academicWarning: one Boolean\n}\n\nsig Course {\n name: one String,\n creditHours: one Int,\n preReqs: set Course\n}\n\nsig Scholarship {\n name: one String\n}\n\nsig Attendance {\n totalLectures: one Int,\n attendedLectures: one Int\n}\n\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n\nabstract sig Language {}\none sig English extends Language {}\none sig Urdu extends Language {}\n\n\nfact AcademicYearRules {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4\n all s: Semester | s.endDate.day > s.startDate.day or \n s.endDate.month > s.startDate.month // Rule 3\n all s: Summer | s.startDate.month = 6 and s.endDate.month = 7 // Rule 2 (special semester duration)\n all s: Spring + Fall | s.endDate.day - s.startDate.day >= 119 // 17 * 7 = 119 Rule 2 (Spring and Fall duration)\n}\n\nfact StudentRules {\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber // Rule 5\n\n // Attendance constraints\n all s: Student | \n let total = s.attendance.totalLectures,\n attended = s.attendance.attendedLectures |\n attended >= 0.8 * total // Rule 6\n\n // Medium of instruction\n all c: Course | \n c.name = \"Religious and Islamic Studies\" implies \n (some l: Language | l in English + Urdu) // Rule 7\n\n // Students must pay fees for fall/spring\n all s: Student | (s.registeredSemester in Spring + Fall) implies s.feesPaid // Rule 12\n\n // A student can freeze a semester\n all s: Student | #s.registeredSemester <= 2 // Rules 14, 15\n}\n\nfact CourseRules {\n // Normal load: 5 courses (15-18 credit hours)\n all s: Student | #s.courses >= 5 and #s.courses.creditHours <= 18 // Rules 8, 18\n\n // Pre-reqs must be completed\n all s: Student | \n all c: s.courses | c.preReqs in s.courses // Rule 18\n\n // Summer rules\n all s: Student |\n s.registeredSemester = Summer implies \n (all c: s.courses | c in s.courses and #s.courses <= 2) // Rules 19a, 19b, 19c\n}\n\nfact ScholarshipRules {\n // No scholarship in summer\n all s: Student | s.registeredSemester = Summer implies no s.scholarship // Rule 19d\n\n // Scholarship cancellation on academic warning\n all s: Student | \n s.scholarship.name = \"FAST\" and s.academicWarning = true implies no s.scholarship // Rule 11\n}\n\nfact CreditTransfer {\n // Credit transfer criteria\n all c: Course |\n c.creditHours >= 3 implies\n (c.grade >= \"C\" and c.name in {\"Bachelor\"}) or\n (c.grade >= \"B-\" and c.name in {\"Master\"}) // Rule 20a\n}\n\nfact CreditTransfer {\n // Credit transfer criteria\n all c: Course |\n c.creditHours >= 3 implies\n (c.grade >= \"C\" and c.name in {\"Bachelor\"}) or\n (c.grade >= \"B-\" and c.name in {\"Master\"}) // Rule 20a\n}\n\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\n\n// assert AttendanceEligibility {\n// all s: Student | \n// s.attendance.attendedLectures >= 0.8 * s.attendance.totalLectures implies \n// s.eligibleForExam = true\n// }\n\nassert CreditTransferConsistency {\n all s: Student | \n all c: s.courses | c.preReqs.creditHours <= c.creditHours\n}", "permalink": "idly-anew-proud-jumble", "time": "2024-11-18 16:39:17.405314", "cmd": 1} {"id": 23923, "parent": 23920, "code": "sig AcademicYear {\n semesters: set Semester\n}\n\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n courses: set Course\n}\n\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n// Summer is optional\n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\n\nsig Student {\n rollNumber: one String,\n attendance: one Attendance,\n courses: set Course,\n registeredSemester: one Semester,\n scholarship: lone Scholarship,\n feesPaid: one Boolean,\n academicWarning: one Boolean\n}\n\nsig Course {\n name: one String,\n creditHours: one Int,\n preReqs: set Course\n}\n\nsig Scholarship {\n name: one String\n}\n\nsig Attendance {\n totalLectures: one Int,\n attendedLectures: one Int\n}\n\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n\nabstract sig Language {}\none sig English extends Language {}\none sig Urdu extends Language {}\n\n\nfact AcademicYearRules {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4\n all s: Semester | s.endDate.day > s.startDate.day or \n s.endDate.month > s.startDate.month // Rule 3\n all s: Summer | s.startDate.month = 6 and s.endDate.month = 7 // Rule 2 (special semester duration)\n all s: Spring + Fall | s.endDate.day - s.startDate.day >= 119 // 17 * 7 = 119 Rule 2 (Spring and Fall duration)\n}\n\nfact StudentRules {\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber // Rule 5\n\n // // Attendance constraints\n // all s: Student | \n // let total = s.attendance.totalLectures,\n // attended = s.attendance.attendedLectures |\n // attended >= 0.8 * total // Rule 6\n\n // Medium of instruction\n all c: Course | \n c.name = \"Religious and Islamic Studies\" implies \n (some l: Language | l in English + Urdu) // Rule 7\n\n // Students must pay fees for fall/spring\n all s: Student | (s.registeredSemester in Spring + Fall) implies s.feesPaid // Rule 12\n\n // A student can freeze a semester\n all s: Student | #s.registeredSemester <= 2 // Rules 14, 15\n}\n\nfact CourseRules {\n // Normal load: 5 courses (15-18 credit hours)\n all s: Student | #s.courses >= 5 and #s.courses.creditHours <= 18 // Rules 8, 18\n\n // Pre-reqs must be completed\n all s: Student | \n all c: s.courses | c.preReqs in s.courses // Rule 18\n\n // Summer rules\n all s: Student |\n s.registeredSemester = Summer implies \n (all c: s.courses | c in s.courses and #s.courses <= 2) // Rules 19a, 19b, 19c\n}\n\nfact ScholarshipRules {\n // No scholarship in summer\n all s: Student | s.registeredSemester = Summer implies no s.scholarship // Rule 19d\n\n // Scholarship cancellation on academic warning\n all s: Student | \n s.scholarship.name = \"FAST\" and s.academicWarning = true implies no s.scholarship // Rule 11\n}\n\nfact CreditTransfer {\n // Credit transfer criteria\n all c: Course |\n c.creditHours >= 3 implies\n (c.grade >= \"C\" and c.name in {\"Bachelor\"}) or\n (c.grade >= \"B-\" and c.name in {\"Master\"}) // Rule 20a\n}\n\nfact CreditTransfer {\n // Credit transfer criteria\n all c: Course |\n c.creditHours >= 3 implies\n (c.grade >= \"C\" and c.name in {\"Bachelor\"}) or\n (c.grade >= \"B-\" and c.name in {\"Master\"}) // Rule 20a\n}\n\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\n\n// assert AttendanceEligibility {\n// all s: Student | \n// s.attendance.attendedLectures >= 0.8 * s.attendance.totalLectures implies \n// s.eligibleForExam = true\n// }\n\nassert CreditTransferConsistency {\n all s: Student | \n all c: s.courses | c.preReqs.creditHours <= c.creditHours\n}", "permalink": "fence-femur-lugged-state", "time": "2024-11-18 16:40:25.020433", "cmd": 1} {"id": 23928, "parent": 23923, "code": "sig AcademicYear {\n semesters: set Semester\n}\n\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n courses: set Course\n}\n\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n// Summer is optional\n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\n\nsig Student {\n rollNumber: one String,\n attendance: one Attendance,\n courses: set Course,\n registeredSemester: one Semester,\n scholarship: lone Scholarship,\n feesPaid: one Boolean,\n academicWarning: one Boolean\n}\n\nsig Course {\n name: one String,\n creditHours: one Int,\n preReqs: set Course\n}\n\nsig Scholarship {\n name: one String\n}\n\nsig Attendance {\n totalLectures: one Int,\n attendedLectures: one Int\n}\n\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n\nabstract sig Language {}\none sig English extends Language {}\none sig Urdu extends Language {}\n\n\nfact AcademicYearRules {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4\n all s: Semester | s.endDate.day > s.startDate.day or \n s.endDate.month > s.startDate.month // Rule 3\n all s: Summer | s.startDate.month = 6 and s.endDate.month = 7 // Rule 2 (special semester duration)\n all s: Spring + Fall | s.endDate.day - s.startDate.day >= 119 // 17 * 7 = 119 Rule 2 (Spring and Fall duration)\n}\n\nfact StudentRules {\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber // Rule 5\n\n // // Attendance constraints\n // all s: Student | \n // let total = s.attendance.totalLectures,\n // attended = s.attendance.attendedLectures |\n // attended >= 0.8 * total // Rule 6\n\n // Medium of instruction\n all c: Course | \n c.name = \"Religious and Islamic Studies\" implies \n (some l: Language | l in English + Urdu) // Rule 7\n\n // Students must pay fees for fall/spring\n all s: Student | \n (s.registeredSemester in Spring + Fall) implies (s.feesPaid = True) // Rule 12\n\n // A student can freeze a semester\n all s: Student | #s.registeredSemester <= 2 // Rules 14, 15\n}\n\nfact CourseRules {\n // Normal load: 5 courses (15-18 credit hours)\n all s: Student | #s.courses >= 5 and #s.courses.creditHours <= 18 // Rules 8, 18\n\n // Pre-reqs must be completed\n all s: Student | \n all c: s.courses | c.preReqs in s.courses // Rule 18\n\n // Summer rules\n all s: Student |\n s.registeredSemester = Summer implies \n (all c: s.courses | c in s.courses and #s.courses <= 2) // Rules 19a, 19b, 19c\n}\n\nfact ScholarshipRules {\n // No scholarship in summer\n all s: Student | s.registeredSemester = Summer implies no s.scholarship // Rule 19d\n\n // Scholarship cancellation on academic warning\n all s: Student | \n s.scholarship.name = \"FAST\" and s.academicWarning = true implies no s.scholarship // Rule 11\n}\n\nfact CreditTransfer {\n // Credit transfer criteria\n all c: Course |\n c.creditHours >= 3 implies\n (c.grade >= \"C\" and c.name in {\"Bachelor\"}) or\n (c.grade >= \"B-\" and c.name in {\"Master\"}) // Rule 20a\n}\n\nfact CreditTransfer {\n // Credit transfer criteria\n all c: Course |\n c.creditHours >= 3 implies\n (c.grade >= \"C\" and c.name in {\"Bachelor\"}) or\n (c.grade >= \"B-\" and c.name in {\"Master\"}) // Rule 20a\n}\n\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\n\n// assert AttendanceEligibility {\n// all s: Student | \n// s.attendance.attendedLectures >= 0.8 * s.attendance.totalLectures implies \n// s.eligibleForExam = true\n// }\n\nassert CreditTransferConsistency {\n all s: Student | \n all c: s.courses | c.preReqs.creditHours <= c.creditHours\n}", "permalink": "tummy-seduce-antler-bonnet", "time": "2024-11-18 16:44:16.393105", "cmd": 1} {"id": 23929, "parent": 23928, "code": "sig AcademicYear {\n semesters: set Semester\n}\n\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n courses: set Course\n}\n\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n// Summer is optional\n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\n\nsig Student {\n rollNumber: one String,\n attendance: one Attendance,\n courses: set Course,\n registeredSemester: one Semester,\n scholarship: lone Scholarship,\n feesPaid: one Boolean,\n academicWarning: one Boolean\n}\n\nsig Course {\n name: one String,\n creditHours: one Int,\n preReqs: set Course\n}\n\nsig Scholarship {\n name: one String\n}\n\nsig Attendance {\n totalLectures: one Int,\n attendedLectures: one Int\n}\n\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n\nabstract sig Language {}\none sig English extends Language {}\none sig Urdu extends Language {}\n\n\nfact AcademicYearRules {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4\n all s: Semester | s.endDate.day > s.startDate.day or \n s.endDate.month > s.startDate.month // Rule 3\n all s: Summer | s.startDate.month = 6 and s.endDate.month = 7 // Rule 2 (special semester duration)\n all s: Spring + Fall | s.endDate.day - s.startDate.day >= 119 // 17 * 7 = 119 Rule 2 (Spring and Fall duration)\n}\n\nfact StudentRules {\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber // Rule 5\n\n // // Attendance constraints\n // all s: Student | \n // let total = s.attendance.totalLectures,\n // attended = s.attendance.attendedLectures |\n // attended >= 0.8 * total // Rule 6\n\n // Medium of instruction\n all c: Course | \n c.name = \"Religious and Islamic Studies\" implies \n (some l: Language | l in English + Urdu) // Rule 7\n\n // Students must pay fees for fall/spring\n all s: Student | \n (s.registeredSemester in Spring + Fall) implies (s.feesPaid = True) // Rule 12\n\n // A student can freeze a semester\n all s: Student | #s.registeredSemester <= 2 // Rules 14, 15\n}\n\nfact CourseRules {\n // Normal load: 5 courses (15-18 credit hours)\n all s: Student | #s.courses >= 5 and #s.courses.creditHours <= 18 // Rules 8, 18\n\n // Pre-reqs must be completed\n all s: Student | \n all c: s.courses | c.preReqs in s.courses // Rule 18\n\n // Summer rules\n all s: Student |\n s.registeredSemester = Summer implies \n (all c: s.courses | c in s.courses and #s.courses <= 2) // Rules 19a, 19b, 19c\n}\n\nfact ScholarshipRules {\n // No scholarship in summer\n all s: Student | s.registeredSemester = Summer implies no s.scholarship // Rule 19d\n\n // Scholarship cancellation on academic warning\n all s: Student | \n s.scholarship.name = \"FAST\" and s.academicWarning = True implies no s.scholarship // Rule 11\n}\n\nfact CreditTransfer {\n // Credit transfer criteria\n all c: Course |\n c.creditHours >= 3 implies\n (c.grade >= \"C\" and c.name in {\"Bachelor\"}) or\n (c.grade >= \"B-\" and c.name in {\"Master\"}) // Rule 20a\n}\n\nfact CreditTransfer {\n // Credit transfer criteria\n all c: Course |\n c.creditHours >= 3 implies\n (c.grade >= \"C\" and c.name in {\"Bachelor\"}) or\n (c.grade >= \"B-\" and c.name in {\"Master\"}) // Rule 20a\n}\n\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\n\n// assert AttendanceEligibility {\n// all s: Student | \n// s.attendance.attendedLectures >= 0.8 * s.attendance.totalLectures implies \n// s.eligibleForExam = true\n// }\n\nassert CreditTransferConsistency {\n all s: Student | \n all c: s.courses | c.preReqs.creditHours <= c.creditHours\n}", "permalink": "speech-yam-pulse-slaw", "time": "2024-11-18 16:45:00.754159", "cmd": 1} {"id": 23931, "parent": 23929, "code": "sig AcademicYear {\n semesters: set Semester\n}\n\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n courses: set Course\n}\n\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n// Summer is optional\n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\n\nsig Student {\n rollNumber: one String,\n attendance: one Attendance,\n courses: set Course,\n registeredSemester: one Semester,\n scholarship: lone Scholarship,\n feesPaid: one Boolean,\n academicWarning: one Boolean\n}\n\nsig Course {\n name: one String,\n creditHours: one Int,\n preReqs: set Course,\n grade: one Grade\n}\n\nabstract sig Grade {}\none sig A, B, C, D, F extends Grade {} // Bachelor grades\none sig APlus, AMinus, BPlus, BMinus extends Grade {} // Master grades\n\n\nsig Scholarship {\n name: one String\n}\n\nsig Attendance {\n totalLectures: one Int,\n attendedLectures: one Int\n}\n\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n\nabstract sig Language {}\none sig English extends Language {}\none sig Urdu extends Language {}\n\n\nfact AcademicYearRules {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4\n all s: Semester | s.endDate.day > s.startDate.day or \n s.endDate.month > s.startDate.month // Rule 3\n all s: Summer | s.startDate.month = 6 and s.endDate.month = 7 // Rule 2 (special semester duration)\n all s: Spring + Fall | s.endDate.day - s.startDate.day >= 119 // 17 * 7 = 119 Rule 2 (Spring and Fall duration)\n}\n\nfact StudentRules {\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber // Rule 5\n\n // // Attendance constraints\n // all s: Student | \n // let total = s.attendance.totalLectures,\n // attended = s.attendance.attendedLectures |\n // attended >= 0.8 * total // Rule 6\n\n // Medium of instruction\n all c: Course | \n c.name = \"Religious and Islamic Studies\" implies \n (some l: Language | l in English + Urdu) // Rule 7\n\n // Students must pay fees for fall/spring\n all s: Student | \n (s.registeredSemester in Spring + Fall) implies (s.feesPaid = True) // Rule 12\n\n // A student can freeze a semester\n all s: Student | #s.registeredSemester <= 2 // Rules 14, 15\n}\n\nfact CourseRules {\n // Normal load: 5 courses (15-18 credit hours)\n all s: Student | #s.courses >= 5 and #s.courses.creditHours <= 18 // Rules 8, 18\n\n // Pre-reqs must be completed\n all s: Student | \n all c: s.courses | c.preReqs in s.courses // Rule 18\n\n // Summer rules\n all s: Student |\n s.registeredSemester = Summer implies \n (all c: s.courses | c in s.courses and #s.courses <= 2) // Rules 19a, 19b, 19c\n}\n\nfact ScholarshipRules {\n // No scholarship in summer\n all s: Student | s.registeredSemester = Summer implies no s.scholarship // Rule 19d\n\n // Scholarship cancellation on academic warning\n all s: Student | \n s.scholarship.name = \"FAST\" and s.academicWarning = True implies no s.scholarship // Rule 11\n}\n\nfact CreditTransfer {\n // Credit transfer criteria\n all c: Course |\n c.creditHours >= 3 implies\n (c.grade >= \"C\" and c.name in {\"Bachelor\"}) or\n (c.grade >= \"B-\" and c.name in {\"Master\"}) // Rule 20a\n}\n\nfact CreditTransfer {\n // Credit transfer criteria\n all c: Course |\n (c.creditHours >= 3 and \n ((c.grade in C + A + B and c.name = \"Bachelor\") or \n (c.grade in BMinus + B + A + APlus and c.name = \"Master\")))\n}\n\n\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\n\n// assert AttendanceEligibility {\n// all s: Student | \n// s.attendance.attendedLectures >= 0.8 * s.attendance.totalLectures implies \n// s.eligibleForExam = true\n// }\n\nassert CreditTransferConsistency {\n all s: Student | \n all c: s.courses | c.preReqs.creditHours <= c.creditHours\n}", "permalink": "polish-ought-sly-stick", "time": "2024-11-18 16:46:35.125580", "cmd": 1} {"id": 23932, "parent": 23931, "code": "sig AcademicYear {\n semesters: set Semester\n}\n\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n courses: set Course\n}\n\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n// Summer is optional\n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\n\nsig Student {\n rollNumber: one String,\n attendance: one Attendance,\n courses: set Course,\n registeredSemester: one Semester,\n scholarship: lone Scholarship,\n feesPaid: one Boolean,\n academicWarning: one Boolean\n}\n\nsig Course {\n name: one String,\n creditHours: one Int,\n preReqs: set Course,\n grade: one Int\n}\n\n\nsig Scholarship {\n name: one String\n}\n\nsig Attendance {\n totalLectures: one Int,\n attendedLectures: one Int\n}\n\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n\nabstract sig Language {}\none sig English extends Language {}\none sig Urdu extends Language {}\n\n\nfact AcademicYearRules {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4\n all s: Semester | s.endDate.day > s.startDate.day or \n s.endDate.month > s.startDate.month // Rule 3\n all s: Summer | s.startDate.month = 6 and s.endDate.month = 7 // Rule 2 (special semester duration)\n all s: Spring + Fall | s.endDate.day - s.startDate.day >= 119 // 17 * 7 = 119 Rule 2 (Spring and Fall duration)\n}\n\nfact StudentRules {\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber // Rule 5\n\n // // Attendance constraints\n // all s: Student | \n // let total = s.attendance.totalLectures,\n // attended = s.attendance.attendedLectures |\n // attended >= 0.8 * total // Rule 6\n\n // Medium of instruction\n all c: Course | \n c.name = \"Religious and Islamic Studies\" implies \n (some l: Language | l in English + Urdu) // Rule 7\n\n // Students must pay fees for fall/spring\n all s: Student | \n (s.registeredSemester in Spring + Fall) implies (s.feesPaid = True) // Rule 12\n\n // A student can freeze a semester\n all s: Student | #s.registeredSemester <= 2 // Rules 14, 15\n}\n\nfact CourseRules {\n // Normal load: 5 courses (15-18 credit hours)\n all s: Student | #s.courses >= 5 and #s.courses.creditHours <= 18 // Rules 8, 18\n\n // Pre-reqs must be completed\n all s: Student | \n all c: s.courses | c.preReqs in s.courses // Rule 18\n\n // Summer rules\n all s: Student |\n s.registeredSemester = Summer implies \n (all c: s.courses | c in s.courses and #s.courses <= 2) // Rules 19a, 19b, 19c\n}\n\nfact ScholarshipRules {\n // No scholarship in summer\n all s: Student | s.registeredSemester = Summer implies no s.scholarship // Rule 19d\n\n // Scholarship cancellation on academic warning\n all s: Student | \n s.scholarship.name = \"FAST\" and s.academicWarning = True implies no s.scholarship // Rule 11\n}\n\nfact GradeValidity {\n // Valid grades for Bachelor programs: A (4), B (3), C (2), D (1), F (0)\n all c: Course | \n c.name = \"Bachelor\" implies c.grade in Int[0..4]\n \n // Valid grades for Master programs: APlus (4.3), A (4), BMinus (2.7), etc.\n all c: Course | \n c.name = \"Master\" implies c.grade in Int[3..5]\n}\n\nfact CreditTransfer {\n all c: Course |\n c.creditHours >= 3 implies\n ((c.grade >= 2 and c.name = \"Bachelor\") or \n (c.grade >= 2.7 and c.name = \"Master\"))\n}// Rule 20a\n\n\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\n\n// assert AttendanceEligibility {\n// all s: Student | \n// s.attendance.attendedLectures >= 0.8 * s.attendance.totalLectures implies \n// s.eligibleForExam = true\n// }\n\nassert CreditTransferConsistency {\n all s: Student | \n all c: s.courses | c.preReqs.creditHours <= c.creditHours\n}", "permalink": "fried-creme-supper-spiny", "time": "2024-11-18 16:49:46.486336", "cmd": 1} {"id": 23933, "parent": 23932, "code": "sig AcademicYear {\n semesters: set Semester\n}\n\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n courses: set Course\n}\n\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n// Summer is optional\n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\n\nsig Student {\n rollNumber: one String,\n attendance: one Attendance,\n courses: set Course,\n registeredSemester: one Semester,\n scholarship: lone Scholarship,\n feesPaid: one Boolean,\n academicWarning: one Boolean\n}\n\nsig Course {\n name: one String,\n creditHours: one Int,\n preReqs: set Course,\n grade: one Int\n}\n\n\nsig Scholarship {\n name: one String\n}\n\nsig Attendance {\n totalLectures: one Int,\n attendedLectures: one Int\n}\n\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n\nabstract sig Language {}\none sig English extends Language {}\none sig Urdu extends Language {}\n\n\nfact AcademicYearRules {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4\n all s: Semester | s.endDate.day > s.startDate.day or \n s.endDate.month > s.startDate.month // Rule 3\n all s: Summer | s.startDate.month = 6 and s.endDate.month = 7 // Rule 2 (special semester duration)\n all s: Spring + Fall | s.endDate.day - s.startDate.day >= 119 // 17 * 7 = 119 Rule 2 (Spring and Fall duration)\n}\n\nfact StudentRules {\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber // Rule 5\n\n // // Attendance constraints\n // all s: Student | \n // let total = s.attendance.totalLectures,\n // attended = s.attendance.attendedLectures |\n // attended >= 0.8 * total // Rule 6\n\n // Medium of instruction\n all c: Course | \n c.name = \"Religious and Islamic Studies\" implies \n (some l: Language | l in English + Urdu) // Rule 7\n\n // Students must pay fees for fall/spring\n all s: Student | \n (s.registeredSemester in Spring + Fall) implies (s.feesPaid = True) // Rule 12\n\n // A student can freeze a semester\n all s: Student | #s.registeredSemester <= 2 // Rules 14, 15\n}\n\nfact CourseRules {\n // Normal load: 5 courses (15-18 credit hours)\n all s: Student | #s.courses >= 5 and #s.courses.creditHours <= 18 // Rules 8, 18\n\n // Pre-reqs must be completed\n all s: Student | \n all c: s.courses | c.preReqs in s.courses // Rule 18\n\n // Summer rules\n all s: Student |\n s.registeredSemester = Summer implies \n (all c: s.courses | c in s.courses and #s.courses <= 2) // Rules 19a, 19b, 19c\n}\n\nfact ScholarshipRules {\n // No scholarship in summer\n all s: Student | s.registeredSemester = Summer implies no s.scholarship // Rule 19d\n\n // Scholarship cancellation on academic warning\n all s: Student | \n s.scholarship.name = \"FAST\" and s.academicWarning = True implies no s.scholarship // Rule 11\n}\n\nfact GradeValidity {\n // Valid grades for Bachelor programs: A (4), B (3), C (2), D (1), F (0)\n all c: Course | \n c.name = \"Bachelor\" implies (c.grade >= 0 and c.grade <= 4)\n \n // Valid grades for Master programs: APlus (4.3), A (4), BMinus (2.7), etc.\n all c: Course | \n c.name = \"Master\" implies (c.grade >= 3 and c.grade <= 5)\n}\n\n\nfact CreditTransfer {\n all c: Course |\n c.creditHours >= 3 implies\n ((c.grade >= 2 and c.name = \"Bachelor\") or \n (c.grade >= 2.7 and c.name = \"Master\"))\n}// Rule 20a\n\n\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\n\n// assert AttendanceEligibility {\n// all s: Student | \n// s.attendance.attendedLectures >= 0.8 * s.attendance.totalLectures implies \n// s.eligibleForExam = true\n// }\n\nassert CreditTransferConsistency {\n all s: Student | \n all c: s.courses | c.preReqs.creditHours <= c.creditHours\n}", "permalink": "unsure-occupy-only-lint", "time": "2024-11-18 16:50:43.431681", "cmd": 1} {"id": 23934, "parent": 23933, "code": "sig AcademicYear {\n semesters: set Semester\n}\n\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n courses: set Course\n}\n\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n// Summer is optional\n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\n\nsig Student {\n rollNumber: one String,\n attendance: one Attendance,\n courses: set Course,\n registeredSemester: one Semester,\n scholarship: lone Scholarship,\n feesPaid: one Boolean,\n academicWarning: one Boolean\n}\n\nsig Course {\n name: one String,\n creditHours: one Int,\n preReqs: set Course,\n grade: one Float\n}\n\n\nsig Scholarship {\n name: one String\n}\n\nsig Attendance {\n totalLectures: one Int,\n attendedLectures: one Int\n}\n\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n\nabstract sig Language {}\none sig English extends Language {}\none sig Urdu extends Language {}\n\n\nfact AcademicYearRules {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4\n all s: Semester | s.endDate.day > s.startDate.day or \n s.endDate.month > s.startDate.month // Rule 3\n all s: Summer | s.startDate.month = 6 and s.endDate.month = 7 // Rule 2 (special semester duration)\n all s: Spring + Fall | s.endDate.day - s.startDate.day >= 119 // 17 * 7 = 119 Rule 2 (Spring and Fall duration)\n}\n\nfact StudentRules {\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber // Rule 5\n\n // // Attendance constraints\n // all s: Student | \n // let total = s.attendance.totalLectures,\n // attended = s.attendance.attendedLectures |\n // attended >= 0.8 * total // Rule 6\n\n // Medium of instruction\n all c: Course | \n c.name = \"Religious and Islamic Studies\" implies \n (some l: Language | l in English + Urdu) // Rule 7\n\n // Students must pay fees for fall/spring\n all s: Student | \n (s.registeredSemester in Spring + Fall) implies (s.feesPaid = True) // Rule 12\n\n // A student can freeze a semester\n all s: Student | #s.registeredSemester <= 2 // Rules 14, 15\n}\n\nfact CourseRules {\n // Normal load: 5 courses (15-18 credit hours)\n all s: Student | #s.courses >= 5 and #s.courses.creditHours <= 18 // Rules 8, 18\n\n // Pre-reqs must be completed\n all s: Student | \n all c: s.courses | c.preReqs in s.courses // Rule 18\n\n // Summer rules\n all s: Student |\n s.registeredSemester = Summer implies \n (all c: s.courses | c in s.courses and #s.courses <= 2) // Rules 19a, 19b, 19c\n}\n\nfact ScholarshipRules {\n // No scholarship in summer\n all s: Student | s.registeredSemester = Summer implies no s.scholarship // Rule 19d\n\n // Scholarship cancellation on academic warning\n all s: Student | \n s.scholarship.name = \"FAST\" and s.academicWarning = True implies no s.scholarship // Rule 11\n}\n\nfact GradeValidity {\n // Valid grades for Bachelor programs: A (4), B (3), C (2), D (1), F (0)\n all c: Course | \n c.name = \"Bachelor\" implies (c.grade >= 0 and c.grade <= 4)\n \n // Valid grades for Master programs: APlus (4.3), A (4), BMinus (2.7), etc.\n all c: Course | \n c.name = \"Master\" implies (c.grade >= 3 and c.grade <= 5)\n}\n\n\nfact CreditTransfer {\n all c: Course |\n c.creditHours >= 3 implies\n ((c.grade >= 2 and c.name = \"Bachelor\") or \n (c.grade >= 2.7 and c.name = \"Master\"))\n}// Rule 20a\n\n\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\n\n// assert AttendanceEligibility {\n// all s: Student | \n// s.attendance.attendedLectures >= 0.8 * s.attendance.totalLectures implies \n// s.eligibleForExam = true\n// }\n\nassert CreditTransferConsistency {\n all s: Student | \n all c: s.courses | c.preReqs.creditHours <= c.creditHours\n}", "permalink": "police-reopen-evict-frame", "time": "2024-11-18 16:53:08.254059", "cmd": 1} {"id": 23935, "parent": 23934, "code": "sig AcademicYear {\n semesters: set Semester\n}\n\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n courses: set Course\n}\n\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n// Summer is optional\n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\n\nsig Student {\n rollNumber: one String,\n attendance: one Attendance,\n courses: set Course,\n registeredSemester: one Semester,\n scholarship: lone Scholarship,\n feesPaid: one Boolean,\n academicWarning: one Boolean\n}\n\nsig Course {\n name: one String,\n creditHours: one Int,\n preReqs: set Course,\n grade: one Int\n}\n\n\nsig Scholarship {\n name: one String\n}\n\nsig Attendance {\n totalLectures: one Int,\n attendedLectures: one Int\n}\n\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n\nabstract sig Language {}\none sig English extends Language {}\none sig Urdu extends Language {}\n\n\nfact AcademicYearRules {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4\n all s: Semester | s.endDate.day > s.startDate.day or \n s.endDate.month > s.startDate.month // Rule 3\n all s: Summer | s.startDate.month = 6 and s.endDate.month = 7 // Rule 2 (special semester duration)\n all s: Spring + Fall | s.endDate.day - s.startDate.day >= 119 // 17 * 7 = 119 Rule 2 (Spring and Fall duration)\n}\n\nfact StudentRules {\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber // Rule 5\n\n // // Attendance constraints\n // all s: Student | \n // let total = s.attendance.totalLectures,\n // attended = s.attendance.attendedLectures |\n // attended >= 0.8 * total // Rule 6\n\n // Medium of instruction\n all c: Course | \n c.name = \"Religious and Islamic Studies\" implies \n (some l: Language | l in English + Urdu) // Rule 7\n\n // Students must pay fees for fall/spring\n all s: Student | \n (s.registeredSemester in Spring + Fall) implies (s.feesPaid = True) // Rule 12\n\n // A student can freeze a semester\n all s: Student | #s.registeredSemester <= 2 // Rules 14, 15\n}\n\nfact CourseRules {\n // Normal load: 5 courses (15-18 credit hours)\n all s: Student | #s.courses >= 5 and #s.courses.creditHours <= 18 // Rules 8, 18\n\n // Pre-reqs must be completed\n all s: Student | \n all c: s.courses | c.preReqs in s.courses // Rule 18\n\n // Summer rules\n all s: Student |\n s.registeredSemester = Summer implies \n (all c: s.courses | c in s.courses and #s.courses <= 2) // Rules 19a, 19b, 19c\n}\n\nfact ScholarshipRules {\n // No scholarship in summer\n all s: Student | s.registeredSemester = Summer implies no s.scholarship // Rule 19d\n\n // Scholarship cancellation on academic warning\n all s: Student | \n s.scholarship.name = \"FAST\" and s.academicWarning = True implies no s.scholarship // Rule 11\n}\n\nfact GradeValidity {\n // Valid grades for Bachelor programs: A (4), B (3), C (2), D (1), F (0)\n all c: Course | \n c.name = \"Bachelor\" implies (c.grade >= 0 and c.grade <= 40)\n \n // Valid grades for Master programs: APlus (4.3), A (4), BMinus (2.7), etc.\n all c: Course | \n c.name = \"Master\" implies (c.grade >= 30 and c.grade <= 50)\n}\n\n\nfact CreditTransfer {\n all c: Course |\n c.creditHours >= 30 implies //no float hence 2 is 20 and 2.7 27\n ((c.grade >= 20 and c.name = \"Bachelor\") or \n (c.grade >= 27 and c.name = \"Master\"))\n}// Rule 20a\n\n\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\n\n// assert AttendanceEligibility {\n// all s: Student | \n// s.attendance.attendedLectures >= 0.8 * s.attendance.totalLectures implies \n// s.eligibleForExam = true\n// }\n\nassert CreditTransferConsistency {\n all s: Student | \n all c: s.courses | c.preReqs.creditHours <= c.creditHours\n}", "permalink": "myself-annex-twice-evict", "time": "2024-11-18 16:54:57.021054", "cmd": 1} {"id": 23936, "parent": 23935, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n courses: set Course\n}\n\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n// Summer is optional\n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\n\nsig Student {\n rollNumber: one String,\n attendance: one Attendance,\n courses: set Course,\n registeredSemester: one Semester,\n scholarship: lone Scholarship,\n feesPaid: one Boolean,\n academicWarning: one Boolean\n}\n\nsig Course {\n name: one String,\n creditHours: one Int,\n preReqs: set Course,\n grade: one Int\n}\n\n\nsig Scholarship {\n name: one String\n}\n\nsig Attendance {\n totalLectures: one Int,\n attendedLectures: one Int\n}\n\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n\nabstract sig Language {}\none sig English extends Language {}\none sig Urdu extends Language {}\n\n\nfact AcademicYearRules {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4\n all s: Semester | s.endDate.day > s.startDate.day or \n s.endDate.month > s.startDate.month // Rule 3\n all s: Summer | s.startDate.month = 6 and s.endDate.month = 7 // Rule 2 (special semester duration)\n all s: Spring + Fall | s.endDate.day - s.startDate.day >= 119 // 17 * 7 = 119 Rule 2 (Spring and Fall duration)\n}\n\nfact StudentRules {\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber // Rule 5\n\n // // Attendance constraints\n // all s: Student | \n // let total = s.attendance.totalLectures,\n // attended = s.attendance.attendedLectures |\n // attended >= 0.8 * total // Rule 6\n\n // Medium of instruction\n all c: Course | \n c.name = \"Religious and Islamic Studies\" implies \n (some l: Language | l in English + Urdu) // Rule 7\n\n // Students must pay fees for fall/spring\n all s: Student | \n (s.registeredSemester in Spring + Fall) implies (s.feesPaid = True) // Rule 12\n\n // A student can freeze a semester\n all s: Student | #s.registeredSemester <= 2 // Rules 14, 15\n}\n\nfact CourseRules {\n // Normal load: 5 courses (15-18 credit hours)\n all s: Student | #s.courses >= 5 and #s.courses.creditHours <= 18 // Rules 8, 18\n\n // Pre-reqs must be completed\n all s: Student | \n all c: s.courses | c.preReqs in s.courses // Rule 18\n\n // Summer rules\n all s: Student |\n s.registeredSemester = Summer implies \n (all c: s.courses | c in s.courses and #s.courses <= 2) // Rules 19a, 19b, 19c\n}\n\nfact ScholarshipRules {\n // No scholarship in summer\n all s: Student | s.registeredSemester = Summer implies no s.scholarship // Rule 19d\n\n // Scholarship cancellation on academic warning\n all s: Student | \n s.scholarship.name = \"FAST\" and s.academicWarning = True implies no s.scholarship // Rule 11\n}\n\nfact GradeValidity {\n // Valid grades for Bachelor programs: A (4), B (3), C (2), D (1), F (0)\n all c: Course | \n c.name = \"Bachelor\" implies (c.grade >= 0 and c.grade <= 40)\n \n // Valid grades for Master programs: APlus (4.3), A (4), BMinus (2.7), etc.\n all c: Course | \n c.name = \"Master\" implies (c.grade >= 30 and c.grade <= 50)\n}\n\n\nfact CreditTransfer {\n all c: Course |\n c.creditHours >= 30 implies //no float hence 2 is 20 and 2.7 27\n ((c.grade >= 20 and c.name = \"Bachelor\") or \n (c.grade >= 27 and c.name = \"Master\"))\n}// Rule 20a\n\n\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\n\n// assert AttendanceEligibility {\n// all s: Student | \n// s.attendance.attendedLectures >= 0.8 * s.attendance.totalLectures implies \n// s.eligibleForExam = true\n// }\n\nassert CreditTransferConsistency {\n all s: Student | \n all c: s.courses | c.preReqs.creditHours <= c.creditHours\n}", "permalink": "skewer-lazy-saga-sliced", "time": "2024-11-18 16:56:56.462261", "cmd": 1} {"id": 23940, "parent": null, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\n// Constraint 1\nfact AcademicYearRules {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n}\n\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\n\nrun{}", "permalink": "refute-strum-stable-cane", "time": "2024-11-18 17:05:35.230118", "cmd": 1} {"id": 23941, "parent": 23940, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\n// Constraint 1\nfact AcademicYearRules {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n}\n\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\n\nrun{}", "permalink": "vendor-cycle-dotted-trash", "time": "2024-11-18 17:05:57.523705", "cmd": 1} {"id": 23942, "parent": 23941, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\n// Constraint 1\nfact AcademicYearRules {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date |\n d.day >= 1 and d.day <= 31 and\n d.month >= 1 and d.month <= 12 and\n d.year > 0\n}\n\nrun{}", "permalink": "irk-kisser-dangle-freely", "time": "2024-11-18 17:07:42.414664", "cmd": 1} {"id": 23943, "parent": 23942, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\n// Constraint 1\nfact AcademicYearRules {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date |\n d.day >= 1 and d.day <= 31 and\n d.month >= 1 and d.month <= 12 and\n d.year > 0\n}\n\nrun{}", "permalink": "wobbly-darn-bulk-zombie", "time": "2024-11-18 17:07:45.258313", "cmd": 1} {"id": 23946, "parent": 23945, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\n// Constraint 1\nfact AcademicYearRules {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date |\n d.day >= 1 and d.day <= 31 and\n d.month >= 1 and d.month <= 12 and\n d.year > 0\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester - Spring | \n s1 != s2 implies \n (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n}\n\n// Run command to find an instance.\nrun {} for 3 but 1 AcademicYear, 1 Spring, 1 Fall, 1 Summer, 3 Date", "permalink": "lunacy-stress-kindly-reveal", "time": "2024-11-18 17:09:50.006146", "cmd": 1} {"id": 23951, "parent": 23950, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\n// Constraint 1\nfact AcademicYearRules {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date |\n d.day >= 1 and d.day <= 31 and\n d.month >= 1 and d.month <= 12 and\n d.year > 0\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester - Spring | \n s1 != s2 implies \n (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n}\n\n// Run command to find an instance.\nrun {} for 3 but 1 AcademicYear, 1 Spring, 1 Fall, 1 Summer, 3 Date", "permalink": "crispy-dipped-heat-huddle", "time": "2024-11-18 17:11:27.841988", "cmd": 1} {"id": 23944, "parent": 23943, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\n// Constraint 1\nfact AcademicYearRules {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date |\n d.day >= 1 and d.day <= 31 and\n d.month >= 1 and d.month <= 12 and\n d.year > 0\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester - Spring | \n s1 != s2 implies \n (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n}\n\n// Run command to find an instance.\nrun {} for 3 but 1 AcademicYear, 1 Spring, 1 Fall, 1 Summer, 3 Date", "permalink": "county-riot-slain-unclog", "time": "2024-11-18 17:09:47.165966", "cmd": 1} {"id": 23945, "parent": 23944, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\n// Constraint 1\nfact AcademicYearRules {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date |\n d.day >= 1 and d.day <= 31 and\n d.month >= 1 and d.month <= 12 and\n d.year > 0\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester - Spring | \n s1 != s2 implies \n (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n}\n\n// Run command to find an instance.\nrun {} for 3 but 1 AcademicYear, 1 Spring, 1 Fall, 1 Summer, 3 Date", "permalink": "snowy-usher-chevy-stank", "time": "2024-11-18 17:09:49.152944", "cmd": 1} {"id": 23947, "parent": 23946, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\n// Constraint 1\nfact AcademicYearRules {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nassert DateRules {\n all d: Date |\n d.day >= 1 and d.day <= 31 and\n d.month >= 1 and d.month <= 12 and\n d.year > 0\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester - Spring | \n s1 != s2 implies \n (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n}\n\n// Run command to find an instance.\nrun {} for 3 but 1 AcademicYear, 1 Spring, 1 Fall, 1 Summer, 3 Date", "permalink": "impose-blob-creme-claim", "time": "2024-11-18 17:09:55.842591", "cmd": 1} {"id": 23948, "parent": 23947, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\n// Constraint 1\nfact AcademicYearRules {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\npred DateRules {\n all d: Date |\n d.day >= 1 and d.day <= 31 and\n d.month >= 1 and d.month <= 12 and\n d.year > 0\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester - Spring | \n s1 != s2 implies \n (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n}\n\n// Run command to find an instance.\nrun {} for 3 but 1 DateRules, AcademicYear, 1 Spring, 1 Fall, 1 Summer, 3 Date", "permalink": "nuclei-aim-prism-sizzle", "time": "2024-11-18 17:10:53.562100", "cmd": 1} {"id": 23949, "parent": 23948, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\n// Constraint 1\nfact AcademicYearRules {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\npred DateRules {\n all d: Date |\n d.day >= 1 and d.day <= 31 and\n d.month >= 1 and d.month <= 12 and\n d.year > 0\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester - Spring | \n s1 != s2 implies \n (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n}\n\n// Run command to find an instance.\nrun {} for 3 but DateRules, 1 AcademicYear, 1 Spring, 1 Fall, 1 Summer, 3 Date", "permalink": "humble-napkin-attic-police", "time": "2024-11-18 17:11:07.290454", "cmd": 1} {"id": 23950, "parent": 23949, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\n// Constraint 1\nfact AcademicYearRules {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\npred DateRules {\n all d: Date |\n d.day >= 1 and d.day <= 31 and\n d.month >= 1 and d.month <= 12 and\n d.year > 0\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester - Spring | \n s1 != s2 implies \n (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n}\n\n// Run command to find an instance.\nrun {} for 3 but 1 AcademicYear, 1 Spring, 1 Fall, 1 Summer, 3 Date", "permalink": "giver-untidy-chewer-shell", "time": "2024-11-18 17:11:17.291517", "cmd": 1} {"id": 23952, "parent": 23951, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\n// Constraint 1\nfact AcademicYearRules {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date |\n d.day >= 1 and d.day <= 31 and\n d.month >= 1 and d.month <= 12 and\n d.year > 0\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester - Spring | \n s1 != s2 implies \n (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n}\n\n// Run command to find an instance.\nrun {} for 3 but 1 AcademicYear, 1 Spring, 1 Fall, 1 Summer, 6 Date", "permalink": "alibi-aptly-bash-sherry", "time": "2024-11-18 17:16:09.894062", "cmd": 1} {"id": 23954, "parent": 23953, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\n// Constraint 1\nfact AcademicYearRules {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date |\n d.day >= 1 and d.day <= 31 and\n d.month >= 1 and d.month <= 12 and\n d.year > 0\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester - Spring | \n s1 != s2 implies \n (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n}\n\n// Run command to find an instance.\nrun {} for 3 but 1 AcademicYear, 1 Spring, 1 Fall, 1 Summer", "permalink": "editor-unsaid-smirk-slain", "time": "2024-11-18 17:16:19.770391", "cmd": 1} {"id": 23953, "parent": 23952, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\n// Constraint 1\nfact AcademicYearRules {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date |\n d.day >= 1 and d.day <= 31 and\n d.month >= 1 and d.month <= 12 and\n d.year > 0\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester - Spring | \n s1 != s2 implies \n (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n}\n\n// Run command to find an instance.\nrun {} for 3 but 1 AcademicYear, 1 Spring, 1 Fall, 1 Summer", "permalink": "neuron-tricky-jab-lard", "time": "2024-11-18 17:16:18.375755", "cmd": 1} {"id": 23955, "parent": 23954, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\n// Constraint 1\nfact AcademicYearRules {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date |\n d.day >= 1 and d.day <= 31 and\n d.month >= 1 and d.month <= 12 and\n d.year > 0\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester - Spring | \n s1 != s2 implies \n (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n}\n\n// Run command to find an instance.\nrun {} for 6 but 1 AcademicYear, 1 Spring, 1 Fall, 1 Summer", "permalink": "amigo-defog-array-curler", "time": "2024-11-18 17:16:32.502941", "cmd": 1} {"id": 23957, "parent": 23956, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\n// Constraint 1\nfact AcademicYearRules {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date |\n d.day >= 1 and d.day <= 31 and\n d.month >= 1 and d.month <= 12 and\n d.year > 0\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester - Spring | \n s1 != s2 implies \n (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n}\n\n// Run command to find an instance.\nrun {} for 6 but 1 AcademicYear, 1 Spring, 1 Fall, 1 Summer", "permalink": "willow-seldom-graph-album", "time": "2024-11-18 17:16:37.488308", "cmd": 1} {"id": 23958, "parent": 23957, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\n// Constraint 1\nfact AcademicYearRules {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date |\n d.day >= 1 and d.day <= 31 and\n d.month >= 1 and d.month <= 12 and\n d.year > 0\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester - Spring | \n s1 != s2 implies \n (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n}\n\n// Run command to find an instance.\nrun {} for 6 but 1 AcademicYear, 1 Spring, 1 Fall, 1 Summer", "permalink": "valid-repose-canyon-bush", "time": "2024-11-18 17:16:38.243673", "cmd": 1} {"id": 23959, "parent": 23958, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\n// Constraint 1\nfact AcademicYearRules {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date |\n d.day >= 1 and d.day <= 31 and\n d.month >= 1 and d.month <= 12 and\n d.year > 0\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester - Spring | \n s1 != s2 implies \n (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n}\n\n// Run command to find an instance.\nrun {} for 6 but 1 AcademicYear, 1 Spring, 1 Fall, 1 Summer", "permalink": "slurp-glory-impose-stilt", "time": "2024-11-18 17:16:39.030521", "cmd": 1} {"id": 23956, "parent": 23955, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\n// Constraint 1\nfact AcademicYearRules {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date |\n d.day >= 1 and d.day <= 31 and\n d.month >= 1 and d.month <= 12 and\n d.year > 0\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester - Spring | \n s1 != s2 implies \n (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n}\n\n// Run command to find an instance.\nrun {} for 6 but 1 AcademicYear, 1 Spring, 1 Fall, 1 Summer", "permalink": "retake-knelt-visa-shut", "time": "2024-11-18 17:16:34.280084", "cmd": 1} {"id": 23961, "parent": 23960, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// Constraint 1\n// fact AcademicYearRules {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\nfact DateRules {\n all d: Date |\n d.day >= 1 and d.day <= 31 and\n d.month >= 1 and d.month <= 12 and\n d.year > 0\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester - Spring | \n// s1 != s2 implies \n// (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n// }\n\n// Run command to find an instance.\n\nrun {} for 3", "permalink": "septic-lusty-cried-unzip", "time": "2024-11-18 17:19:12.523310", "cmd": 1} {"id": 23960, "parent": 23959, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// Constraint 1\n// fact AcademicYearRules {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\nfact DateRules {\n all d: Date |\n d.day >= 1 and d.day <= 31 and\n d.month >= 1 and d.month <= 12 and\n d.year > 0\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester - Spring | \n// s1 != s2 implies \n// (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n// }\n\n// Run command to find an instance.\n\nrun {} for 3", "permalink": "cloud-single-kept-catchy", "time": "2024-11-18 17:18:36.861074", "cmd": 1} {"id": 23962, "parent": 23961, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// Constraint 1\n// fact AcademicYearRules {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\nfact DateRules {\n all d: Date |\n d.day >= 1 and d.day <= 31 and\n d.month >= 1 and d.month <= 12 and\n d.year > 0\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester - Spring | \n// s1 != s2 implies \n// (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n// }\n\n// Run command to find an instance.\n\nrun {} for 3 but 3 Date", "permalink": "lent-batch-unbend-zombie", "time": "2024-11-18 17:19:24.262198", "cmd": 1} {"id": 23964, "parent": 23963, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// Constraint 1\n// fact AcademicYearRules {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\nfact DateRules {\n all d: Date |\n d.day >= 1 and d.day <= 31 and\n d.month >= 1 and d.month <= 12 and\n d.year > 0\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester - Spring | \n// s1 != s2 implies \n// (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n// }\n\n// Run command to find an instance.\n\nrun {} for 3 but 3 Date", "permalink": "okay-second-coming-hulk", "time": "2024-11-18 17:19:28.329673", "cmd": 1} {"id": 23963, "parent": 23962, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// Constraint 1\n// fact AcademicYearRules {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\nfact DateRules {\n all d: Date |\n d.day >= 1 and d.day <= 31 and\n d.month >= 1 and d.month <= 12 and\n d.year > 0\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester - Spring | \n// s1 != s2 implies \n// (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n// }\n\n// Run command to find an instance.\n\nrun {} for 3 but 3 Date", "permalink": "grant-tux-shut-femur", "time": "2024-11-18 17:19:27.219198", "cmd": 1} {"id": 23966, "parent": 23965, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// Constraint 1\n// fact AcademicYearRules {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\nfact DateRules {\n all d: Date |\n d.day >= 1 and d.day <= 31 and\n d.month >= 1 and d.month <= 12 and\n d.year > 0\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester - Spring | \n// s1 != s2 implies \n// (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n// }\n\n// Run command to find an instance.\n\nrun {} for 3 but 5 Date", "permalink": "abroad-cinema-shack-wiry", "time": "2024-11-18 17:19:57.035113", "cmd": 1} {"id": 23965, "parent": 23964, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// Constraint 1\n// fact AcademicYearRules {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\nfact DateRules {\n all d: Date |\n d.day >= 1 and d.day <= 31 and\n d.month >= 1 and d.month <= 12 and\n d.year > 0\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester - Spring | \n// s1 != s2 implies \n// (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n// }\n\n// Run command to find an instance.\n\nrun {} for 3 but 5 Date", "permalink": "boggle-septum-reflux-jaws", "time": "2024-11-18 17:19:49.533408", "cmd": 1} {"id": 23967, "parent": 23966, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// Constraint 1\n// fact AcademicYearRules {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\nfact DateRules {\n all d: Date |\n d.day >= 1 and d.day <= 31 and\n d.month >= 1 and d.month <= 12 and\n d.year > 0\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester - Spring | \n// s1 != s2 implies \n// (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n// }\n\n// Run command to find an instance.\n\nrun {} for 5 but 5 Date", "permalink": "ivory-perm-dolly-slug", "time": "2024-11-18 17:21:01.324054", "cmd": 1} {"id": 23968, "parent": 23967, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// Constraint 1\n// fact AcademicYearRules {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\nfact DateRules {\n all d: Date |\n d.day >= 1 and d.day <= 31 and\n d.month >= 1 and d.month <= 12 and\n d.year > 0\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester - Spring | \n// s1 != s2 implies \n// (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n// }\n\n// Run command to find an instance.\n\nrun {} for 1", "permalink": "buggy-collar-outer-spooky", "time": "2024-11-18 17:21:06.850366", "cmd": 1} {"id": 23971, "parent": 23970, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// Constraint 1\n// fact AcademicYearRules {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\nfact DateRules {\n all d: Date |\n d.day >= 1 and d.day <= 31 and\n d.month >= 1 and d.month <= 12 and\n d.year > 0\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester - Spring | \n// s1 != s2 implies \n// (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n// }\n\n// Run command to find an instance.\n\nrun {} for 1", "permalink": "doable-ream-spiffy-neuter", "time": "2024-11-18 17:21:30.602652", "cmd": 1} {"id": 23970, "parent": 23969, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// Constraint 1\n// fact AcademicYearRules {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\nfact DateRules {\n all d: Date |\n d.day >= 1 and d.day <= 31 and\n d.month >= 1 and d.month <= 12 and\n d.year > 0\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester - Spring | \n// s1 != s2 implies \n// (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n// }\n\n// Run command to find an instance.\n\nrun {}", "permalink": "bling-ample-neuter-pouch", "time": "2024-11-18 17:21:19.202213", "cmd": 1} {"id": 23969, "parent": 23968, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// Constraint 1\n// fact AcademicYearRules {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\nfact DateRules {\n all d: Date |\n d.day >= 1 and d.day <= 31 and\n d.month >= 1 and d.month <= 12 and\n d.year > 0\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester - Spring | \n// s1 != s2 implies \n// (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n// }\n\n// Run command to find an instance.\n\nrun {}", "permalink": "mumble-squeak-savor-gummy", "time": "2024-11-18 17:21:13.834257", "cmd": 1} {"id": 23973, "parent": 23972, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// Constraint 1\n// fact AcademicYearRules {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// fact DateRules {\n// all d: Date |\n// d.day >= 1 and d.day <= 31 and\n// d.month >= 1 and d.month <= 12 and\n// d.year > 0\n// }\n\n// Additional constraints to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester - Spring | \n// s1 != s2 implies \n// (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n// }\n\n// Run command to find an instance.\n\nrun {} for 1", "permalink": "sprint-almost-opium-diner", "time": "2024-11-18 17:22:10.715379", "cmd": 1} {"id": 23972, "parent": 23971, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// Constraint 1\n// fact AcademicYearRules {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// fact DateRules {\n// all d: Date |\n// d.day >= 1 and d.day <= 31 and\n// d.month >= 1 and d.month <= 12 and\n// d.year > 0\n// }\n\n// Additional constraints to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester - Spring | \n// s1 != s2 implies \n// (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n// }\n\n// Run command to find an instance.\n\nrun {} for 1", "permalink": "badge-fox-mango-feed", "time": "2024-11-18 17:22:07.235049", "cmd": 1} {"id": 23974, "parent": 23973, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// Constraint 1\n// fact AcademicYearRules {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// fact DateRules {\n// all d: Date |\n// d.day >= 1 and d.day <= 31 and\n// d.month >= 1 and d.month <= 12 and\n// d.year > 0\n// }\n\n// Additional constraints to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester - Spring | \n// s1 != s2 implies \n// (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n// }\n\n// Run command to find an instance.\n\nrun {} ", "permalink": "serve-wispy-lend-nervy", "time": "2024-11-18 17:22:25.005276", "cmd": 1} {"id": 23975, "parent": 23974, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// Constraint 1\n// fact AcademicYearRules {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// fact DateRules {\n// all d: Date |\n// d.day >= 1 and d.day <= 31 and\n// d.month >= 1 and d.month <= 12 and\n// d.year > 0\n// }\n\n// Additional constraints to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester - Spring | \n// s1 != s2 implies \n// (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n// }\n\n// Run command to find an instance.\n\nrun {} ", "permalink": "armful-crazy-scorer-baboon", "time": "2024-11-18 17:22:32.543781", "cmd": 1} {"id": 23976, "parent": 23975, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// Constraint 1\n// fact AcademicYearRules {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\nfact DateRules {\n all d: Date |\n //d.day >= 1 and d.day <= 31 and\n //d.month >= 1 and d.month <= 12 and\n d.year > 2000\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester - Spring | \n// s1 != s2 implies \n// (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n// }\n\n// Run command to find an instance.\n\nrun {} ", "permalink": "dust-task-lure-detest", "time": "2024-11-18 17:23:20.754411", "cmd": 1} {"id": 23978, "parent": 23977, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\nsig Date {\n day: one Int,\n month: one Int,\n year: one Int\n}\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// Constraint 1\n// fact AcademicYearRules {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\nfact DateRules {\n all d: Date |\n //d.day >= 1 and d.day <= 31 and\n //d.month >= 1 and d.month <= 12 and\n d.year > 2000\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester - Spring | \n// s1 != s2 implies \n// (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n// }\n\n// Run command to find an instance.\n\nrun {} ", "permalink": "wifi-amber-gong-iodize", "time": "2024-11-18 17:23:50.863146", "cmd": 1} {"id": 23977, "parent": 23976, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\nsig Date {\n day: one Int,\n month: one Int,\n year: one Int\n}\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// Constraint 1\n// fact AcademicYearRules {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\nfact DateRules {\n all d: Date |\n //d.day >= 1 and d.day <= 31 and\n //d.month >= 1 and d.month <= 12 and\n d.year > 2000\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester - Spring | \n// s1 != s2 implies \n// (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n// }\n\n// Run command to find an instance.\n\nrun {} ", "permalink": "gaffe-petty-proven-bluish", "time": "2024-11-18 17:23:44.029204", "cmd": 1} {"id": 23980, "parent": 23979, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\nsig Date {\n day: one Int,\n month: one Int,\n year: one Int\n}\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// Constraint 1\n// fact AcademicYearRules {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\nfact DateRules {\n all d: Date |\n //d.day >= 1 and d.day <= 31 and\n //d.month >= 1 and d.month <= 12 and\n d.year > 0\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester - Spring | \n// s1 != s2 implies \n// (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n// }\n\n// Run command to find an instance.\n\nrun {} ", "permalink": "carrot-hardy-verse-spider", "time": "2024-11-18 17:24:05.728224", "cmd": 1} {"id": 23982, "parent": 23981, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\nsig Date {\n day: one Int,\n month: one Int,\n year: one Int\n}\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// Constraint 1\n// fact AcademicYearRules {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\nfact DateRules {\n all d: Date |\n //d.day >= 1 and d.day <= 31 and\n //d.month >= 1 and d.month <= 12 and\n d.year > 0\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester - Spring | \n// s1 != s2 implies \n// (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n// }\n\n// Run command to find an instance.\n\nrun {} ", "permalink": "bogus-ladle-squint-velcro", "time": "2024-11-18 17:24:52.755243", "cmd": 1} {"id": 23979, "parent": 23978, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\nsig Date {\n day: one Int,\n month: one Int,\n year: one Int\n}\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// Constraint 1\n// fact AcademicYearRules {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\nfact DateRules {\n all d: Date |\n //d.day >= 1 and d.day <= 31 and\n //d.month >= 1 and d.month <= 12 and\n d.year > 0\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester - Spring | \n// s1 != s2 implies \n// (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n// }\n\n// Run command to find an instance.\n\nrun {} ", "permalink": "cape-street-scabby-recall", "time": "2024-11-18 17:24:04.540754", "cmd": 1} {"id": 23981, "parent": 23980, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\nsig Date {\n day: one Int,\n month: one Int,\n year: one Int\n}\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// Constraint 1\n// fact AcademicYearRules {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\nfact DateRules {\n all d: Date |\n //d.day >= 1 and d.day <= 31 and\n //d.month >= 1 and d.month <= 12 and\n d.year > 20\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester - Spring | \n// s1 != s2 implies \n// (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n// }\n\n// Run command to find an instance.\n\nrun {} ", "permalink": "vixen-bagful-panda-exert", "time": "2024-11-18 17:24:41.347422", "cmd": 1} {"id": 23983, "parent": 23982, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// Constraint 1\n// fact AcademicYearRules {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\nfact DateRules {\n all d: Date |\n one d.day and one d.month and one d.year\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester - Spring | \n// s1 != s2 implies \n// (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n// }\n\n// Run command to find an instance.\n\nrun {} ", "permalink": "mardi-dilute-creole-viral", "time": "2024-11-18 17:26:53.790419", "cmd": 1} {"id": 23985, "parent": 23984, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// Constraint 1\n// fact AcademicYearRules {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\nfact DateRules {\n all d: Date | one d.day and one d.month and one d.year\n all d: Date | d.day > 0\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester - Spring | \n// s1 != s2 implies \n// (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n// }\n\n// Run command to find an instance.\n\nrun {} ", "permalink": "upheld-rants-wiring-litter", "time": "2024-11-18 17:27:38.847872", "cmd": 1} {"id": 23984, "parent": 23983, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// Constraint 1\n// fact AcademicYearRules {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\nfact DateRules {\n all d: Date | one d.day and one d.month and one d.year\n all d: Date | d.day > 0\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester - Spring | \n// s1 != s2 implies \n// (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n// }\n\n// Run command to find an instance.\n\nrun {} ", "permalink": "crook-fade-prissy-down", "time": "2024-11-18 17:27:37.406963", "cmd": 1} {"id": 23986, "parent": 23985, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// Constraint 1\n// fact AcademicYearRules {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\nfact DateRules {\n all d: Date | one d.day and one d.month and one d.year\n all d: Date | d.day > 0 and d.month > 0 and d.year > 2000\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester - Spring | \n// s1 != s2 implies \n// (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n// }\n\n// Run command to find an instance.\n\nrun {} ", "permalink": "fondly-dodgy-resize-shabby", "time": "2024-11-18 17:27:54.332681", "cmd": 1} {"id": 23988, "parent": 23987, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// Constraint 1\n// fact AcademicYearRules {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\nfact DateRules {\n all d: Date | one d.day and one d.month and one d.year\n}\nfact Date2 {\n all d: Date | d.day > 0 and d.month > 0 and d.year > 2000\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester - Spring | \n// s1 != s2 implies \n// (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n// }\n\n// Run command to find an instance.\n\nrun {} ", "permalink": "credit-curse-siesta-credit", "time": "2024-11-18 17:28:20.556115", "cmd": 1} {"id": 23987, "parent": 23986, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// Constraint 1\n// fact AcademicYearRules {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\nfact DateRules {\n all d: Date | one d.day and one d.month and one d.year\n}\nfact Date2 {\n all d: Date | d.day > 0 and d.month > 0 and d.year > 2000\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester - Spring | \n// s1 != s2 implies \n// (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n// }\n\n// Run command to find an instance.\n\nrun {} ", "permalink": "hurray-sadly-garage-relive", "time": "2024-11-18 17:28:19.266783", "cmd": 1} {"id": 23989, "parent": 23988, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// Constraint 1\n// fact AcademicYearRules {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\nfact DateRules {\n all d: Date | one d.day and one d.month and one d.year\n}\nfact Date2 {\n all d: Date | d.day > 0 and d.month > 0 and d.year > 0\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester - Spring | \n// s1 != s2 implies \n// (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n// }\n\n// Run command to find an instance.\n\nrun {} ", "permalink": "thus-petite-header-gotten", "time": "2024-11-18 17:28:46.109728", "cmd": 1} {"id": 23991, "parent": 23990, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// Constraint 1\n// fact AcademicYearRules {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\nfact DateRules {\n all d: Date | one d.day and one d.month and one d.year\n}\nfact Date2 {\n all d: Date | d.day > 0 and d.month > 0 and d.year > 0\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester - Spring | \n// s1 != s2 implies \n// (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n// }\n\n// Run command to find an instance.\n\nrun {} ", "permalink": "path-sizing-oblong-naming", "time": "2024-11-18 17:28:59.952696", "cmd": 1} {"id": 23990, "parent": 23989, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// Constraint 1\n// fact AcademicYearRules {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\nfact DateRules {\n all d: Date | one d.day and one d.month and one d.year\n}\nfact Date2 {\n all d: Date | d.day > 0 and d.month > 0 and d.year > 0\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester - Spring | \n// s1 != s2 implies \n// (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n// }\n\n// Run command to find an instance.\n\nrun {} ", "permalink": "thigh-almost-antler-satin", "time": "2024-11-18 17:28:49.218757", "cmd": 1} {"id": 23992, "parent": 23991, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// Constraint 1\n// fact AcademicYearRules {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\nfact DateRules {\n all d: Date | one d.day and one d.month and one d.year\n}\nfact Date2 {\n all d: Date | d.day > 0 and d.month > 0 and d.year > 0\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester - Spring | \n// s1 != s2 implies \n// (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n// }\n\n// Run command to find an instance.\n\nrun {} ", "permalink": "tinker-rewind-paver-sample", "time": "2024-11-18 17:29:10.738196", "cmd": 1} {"id": 23993, "parent": 23992, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// Constraint 1\n// fact AcademicYearRules {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\nfact DateRules {\n all d: Date | d.day >= 1 and d.month >= 1 and d.year > 0\n}\nfact Date2 {\n \n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester - Spring | \n// s1 != s2 implies \n// (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n// }\n\n// Run command to find an instance.\n\nrun {} ", "permalink": "bonded-vegan-awry-gala", "time": "2024-11-18 17:31:09.232200", "cmd": 1} {"id": 23994, "parent": 23993, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// Constraint 1\n// fact AcademicYearRules {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\nfact DateRules {\n all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n}\nfact Date2 {\n \n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester - Spring | \n// s1 != s2 implies \n// (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n// }\n\n// Run command to find an instance.\n\nrun {} ", "permalink": "cake-chimp-agent-blank", "time": "2024-11-18 17:31:15.675307", "cmd": 1} {"id": 23995, "parent": 23994, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// Constraint 1\n// fact AcademicYearRules {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\nfact DateRules {\n all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n}\nfact DateRules1 {\n all d: Date | d.day <= 31 and d.month <= 12 \n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester - Spring | \n// s1 != s2 implies \n// (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n// }\n\n// Run command to find an instance.\n\nrun {} ", "permalink": "jolly-scurvy-colt-panic", "time": "2024-11-18 17:32:01.437164", "cmd": 1} {"id": 23997, "parent": 23996, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// Constraint 1\n// fact AcademicYearRules {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\nfact DateRules {\n all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester - Spring | \n// s1 != s2 implies \n// (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n// }\n\n// Run command to find an instance.\n\nrun {} ", "permalink": "sassy-purple-city-kilt", "time": "2024-11-18 17:33:49.662724", "cmd": 1} {"id": 23998, "parent": 23997, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// Constraint 1\n// fact AcademicYearRules {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\nfact DateRules {\n all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester - Spring | \n// s1 != s2 implies \n// (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n// }\n\n// Run command to find an instance.\n\nrun {} ", "permalink": "bright-trump-coerce-wok", "time": "2024-11-18 17:33:52.451759", "cmd": 1} {"id": 23996, "parent": 23995, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\nsig Date {\n day: Int,\n month: Int,\n year: Int\n}\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// Constraint 1\n// fact AcademicYearRules {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\nfact DateRules {\n all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester - Spring | \n// s1 != s2 implies \n// (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n// }\n\n// Run command to find an instance.\n\nrun {} ", "permalink": "canal-stack-duvet-gazing", "time": "2024-11-18 17:32:19.426311", "cmd": 1} {"id": 24001, "parent": 24000, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\nsig Date {\n day: one Int,\n month: one Int,\n year: one Int\n}\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// Constraint 1\n// fact AcademicYearRules {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\nfact DateRules {\n all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester - Spring | \n// s1 != s2 implies \n// (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n// }\n\n// Run command to find an instance.\n\nrun {} ", "permalink": "march-sank-boil-tray", "time": "2024-11-18 17:34:32.761000", "cmd": 1} {"id": 24000, "parent": 23999, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\nsig Date {\n day: one Int,\n month: one Int,\n year: one Int\n}\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// Constraint 1\n// fact AcademicYearRules {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\nfact DateRules {\n all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester - Spring | \n// s1 != s2 implies \n// (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n// }\n\n// Run command to find an instance.\n\nrun {} ", "permalink": "hatred-turban-bulb-olive", "time": "2024-11-18 17:34:24.967642", "cmd": 1} {"id": 23999, "parent": 23998, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\nsig Date {\n day: one Int,\n month: one Int,\n year: one Int\n}\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// Constraint 1\n// fact AcademicYearRules {\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\nfact DateRules {\n all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n}\n\n// Additional constraints to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester - Spring | \n// s1 != s2 implies \n// (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n// }\n\n// Run command to find an instance.\n\nrun {} ", "permalink": "silent-mom-septum-smog", "time": "2024-11-18 17:34:23.588479", "cmd": 1} {"id": 24002, "parent": 24001, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: one Int,\n month: one Int,\n year: one Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\n//Constraint 1\nfact AcademicYearRules {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n}\n\n//constraints to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester - Spring | \n s1 != s2 implies \n (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n}\n\nrun {} ", "permalink": "retake-basin-amends-liquid", "time": "2024-11-18 17:35:38.746966", "cmd": 1} {"id": 24003, "parent": 24002, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: one Int,\n month: one Int,\n year: one Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\n//Constraint 1\nfact AcademicYearRules {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n}\n\n//constraints to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1: Semester and s2: Semester | s1.startDate != s2.startDate\n // all 1, s2: Semester - Spring | \n // s1 != s2 implies \n // (s1.endDate.year < s2.startDate.year or (s1.endDate.year = s2.startDate.year and s1.endDate.month < s2.startDate.month))\n}\n\nrun {} ", "permalink": "echo-onset-tidy-banked", "time": "2024-11-18 17:38:24.563743", "cmd": 1} {"id": 24004, "parent": 24003, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: one Int,\n month: one Int,\n year: one Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\n//Constraint 1\nfact AcademicYearRules {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n}\n\n//constraints to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n}\n\nrun {} ", "permalink": "rubbed-borax-luxury-effort", "time": "2024-11-18 17:39:24.207654", "cmd": 1} {"id": 24005, "parent": 24004, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: one Int,\n month: one Int,\n year: one Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\n//Constraint 1\nfact AcademicYearRules {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 // Rule 4 + 1 (summer[optional] + Fall + spring)\n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n}\n\n//constraints to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate and s1.endDate != s2.endDate\n}\n\nrun {} ", "permalink": "cushy-chirpy-genre-exes", "time": "2024-11-18 17:40:00.856062", "cmd": 1} {"id": 24007, "parent": 24005, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: one Int,\n month: one Int,\n year: one Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\n//Constraint 1\nfact AcademicYearRules {\n // Rule 4 + 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n \n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n}\n//constraint to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n and s1.endDate != s2.endDate\n}\n\nrun {} ", "permalink": "blast-photo-cozy-thinly", "time": "2024-11-18 17:45:10.042356", "cmd": 1} {"id": 24010, "parent": 24007, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: one Int,\n month: one Int,\n year: one Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\n//Constraint 1\nfact AcademicYearRules {\n // Rule 4 + 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n all s: Summer | s.startDate.month = 6 and s.endDate.month = 7 // Rule 2 (special semester duration)\n all s: Spring | s.startDate.month = 1 or s.startDate.month = 2\n\n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n}\n//constraint to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n and s1.endDate != s2.endDate\n}\n\nrun {} ", "permalink": "bunt-erased-quarry-manly", "time": "2024-11-18 17:54:49.432713", "cmd": 1} {"id": 24012, "parent": 24011, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: one Int,\n month: one Int,\n year: one Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\n//Constraint 1\nfact AcademicYearRules {\n // Rule 4 + 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n all s: Summer | s.startDate.month = 6 and s.endDate.month = 7 // Rule 2 (special semester duration)\n all s: Spring | s.startDate.month = 1 or s.startDate.month = 2\n\n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n}\n//constraint to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n and s1.endDate != s2.endDate\n}\n\nrun {} ", "permalink": "juicy-absurd-concur-humvee", "time": "2024-11-18 17:55:28.622720", "cmd": 1} {"id": 24011, "parent": 24010, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: one Int,\n month: one Int,\n year: one Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\n//Constraint 1\nfact AcademicYearRules {\n // Rule 4 + 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n all s: Summer | s.startDate.month >= 6 and s.endDate.month = 7 // Rule 2 (special semester duration)\n all s: Spring | s.startDate.month = 1 or s.startDate.month = 2\n\n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n}\n//constraint to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n and s1.endDate != s2.endDate\n}\n\nrun {} ", "permalink": "bouncy-perish-panama-policy", "time": "2024-11-18 17:55:09.862856", "cmd": 1} {"id": 24017, "parent": 24016, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: one Int,\n month: one Int,\n year: one Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\n//Constraint 1\nfact AcademicYearRules {\n // Rule 4 + 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n all s: Summer | s.startDate.month = 6 and s.endDate.month = 7 // Rule 2 (special semester duration)\n all s: Spring | s.startDate.month = 1 or s.startDate.month = 2\n all s: Fall | s.startDate.month = 8 or s.startDate.month = 9\n\n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n}\n//constraint to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n and s1.endDate != s2.endDate\n}\n\nrun {} ", "permalink": "clerk-coerce-grape-dusk", "time": "2024-11-18 17:57:16.084719", "cmd": 1} {"id": 24016, "parent": 24015, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: one Int,\n month: one Int,\n year: one Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\n//Constraint 1\nfact AcademicYearRules {\n // Rule 4 + 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n all s: Summer | s.startDate.month = 6 and s.endDate.month = 7 // Rule 2 (special semester duration)\n all s: Spring | s.startDate.month = 1 or s.startDate.month = 2\n all s: Fall | s.startDate.month = 8 or s.startDate.month = 9\n\n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n}\n//constraint to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n and s1.endDate != s2.endDate\n}\n\nrun {} ", "permalink": "moody-french-vanity-hash", "time": "2024-11-18 17:57:11.839902", "cmd": 1} {"id": 24013, "parent": 24012, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: one Int,\n month: one Int,\n year: one Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\n//Constraint 1\nfact AcademicYearRules {\n // Rule 4 + 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n all s: Summer | s.startDate.month = 6 and s.endDate.month = 7 // Rule 2 (special semester duration)\n all s: Spring | s.startDate.month = 1 or s.startDate.month = 2\n all s: Fall | s.startDate.month = 8 or s.startDate.month = 9\n\n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n}\n//constraint to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n and s1.endDate != s2.endDate\n}\n\nrun {} ", "permalink": "rudder-shiny-shower-ouch", "time": "2024-11-18 17:56:16.335199", "cmd": 1} {"id": 24014, "parent": 24013, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: one Int,\n month: one Int,\n year: one Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\n//Constraint 1\nfact AcademicYearRules {\n // Rule 4 + 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n all s1: Summer | s.startDate.month = 6 and s.endDate.month = 7 // Rule 2 (special semester duration)\n all s2: Spring | s.startDate.month = 1 or s.startDate.month = 2\n all s3: Fall | s.startDate.month = 8 or s.startDate.month = 9\n\n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n}\n//constraint to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n and s1.endDate != s2.endDate\n}\n\nrun {} ", "permalink": "dimmer-sushi-bubbly-roamer", "time": "2024-11-18 17:56:36.277811", "cmd": 1} {"id": 24015, "parent": 24014, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: one Int,\n month: one Int,\n year: one Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\n//Constraint 1\nfact AcademicYearRules {\n // Rule 4 + 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n all s1: Summer | s1.startDate.month = 6 and s1.endDate.month = 7 // Rule 2 (special semester duration)\n all s2: Spring | s2.startDate.month = 1 or s2.startDate.month = 2\n all s3: Fall | s3.startDate.month = 8 or s3.startDate.month = 9\n\n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n}\n//constraint to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n and s1.endDate != s2.endDate\n}\n\nrun {} ", "permalink": "laptop-dollop-expose-aorta", "time": "2024-11-18 17:56:59.511201", "cmd": 1} {"id": 24019, "parent": 24018, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: one Int,\n month: one Int,\n year: one Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\n//Constraint 1\nfact AcademicYearRules {\n // Rule 4 + 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n all s: Summer | s.startDate.month = 6 and s.endDate.month = 7 // Rule 2 (special semester duration)\n all s: Spring | s.startDate.month = 1 or s.startDate.month = 2\n //all s: Fall | s.startDate.month = 8 or s.startDate.month = 9\n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n}\n//constraint to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n and s1.endDate != s2.endDate\n}\n\nrun {} ", "permalink": "raving-shank-marlin-urban", "time": "2024-11-18 17:57:27.168244", "cmd": 1} {"id": 24018, "parent": 24017, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: one Int,\n month: one Int,\n year: one Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\n//Constraint 1\nfact AcademicYearRules {\n // Rule 4 + 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n all s: Summer | s.startDate.month = 6 and s.endDate.month = 7 // Rule 2 (special semester duration)\n all s: Spring | s.startDate.month = 1 or s.startDate.month = 2\n //all s: Fall | s.startDate.month = 8 or s.startDate.month = 9\n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n}\n//constraint to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n and s1.endDate != s2.endDate\n}\n\nrun {} ", "permalink": "punk-snout-saloon-jurist", "time": "2024-11-18 17:57:25.250924", "cmd": 1} {"id": 24020, "parent": 24019, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: one Int,\n month: one Int,\n year: one Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\n//Constraint 1\nfact AcademicYearRules {\n // Rule 4 + 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n all s: Summer | s.startDate.month = 6 and s.endDate.month = 7 // Rule 2 (special semester duration)\n all s: Spring | s.startDate.month = 1 or s.startDate.month = 2\n all s: Fall | s.startDate.month = 8 or s.startDate.month = 9\n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n}\n//constraint to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n and s1.endDate != s2.endDate\n}\n\nrun {} ", "permalink": "sadly-jump-public-prayer", "time": "2024-11-18 17:57:53.143813", "cmd": 1} {"id": 24021, "parent": 24020, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: one Int,\n month: one Int,\n year: one Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\n//Constraint 1\nfact AcademicYearRules {\n // Rule 4 + 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Rule 2\n all s: Summer | s.startDate.month = 6 and s.endDate.month = 7 // Rule 2 (special semester duration)\n all s: Spring | s.startDate.month = 1 or s.startDate.month = 2\n // --> idk why everytime i added the lower constraint it wouldnt work\n // all s: Fall | s.startDate.month = 8 or s.startDate.month = 9\n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n}\n//constraint to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n and s1.endDate != s2.endDate\n}\n\nrun {} ", "permalink": "chaos-vixen-acting-veggie", "time": "2024-11-18 17:59:02.963111", "cmd": 1} {"id": 24022, "parent": 24021, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: one Int,\n month: one Int,\n year: one Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\n//Constraint 1\nfact AcademicYearRules {\n // Rule 4 + 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Rule 2 - (set months to set duration)\n all s: Summer | s.startDate.month = 6 and s.endDate.month = 7 \n all s: Spring | s.startDate.month = 1 or s.startDate.month = 2\n // --> idk why everytime i added the lower constraint it wouldnt work\n // all s: Fall | s.startDate.month = 8 or s.startDate.month = 9\n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n}\n//constraint to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n and s1.endDate != s2.endDate\n}\n\nrun {} ", "permalink": "herbs-thee-lend-brute", "time": "2024-11-18 17:59:31.702129", "cmd": 1} {"id": 24023, "parent": 24022, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: one Int,\n month: one Int,\n year: one Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\n//Constraint 1\nfact AcademicYearRules {\n // Rule 4 + 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Rule 2 - (set months to set duration)\n all s: Summer | s.startDate.month = 6 and s.endDate.month = 7 \n all s: Spring | s.startDate.month = 1 or s.endDate.month = 5\n // --> idk why everytime i added the lower constraint it wouldnt work\n // all s: Fall | s.startDate.month = 8 or s.startDate.month = 9\n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n}\n//constraint to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n and s1.endDate != s2.endDate\n}\n\nrun {} ", "permalink": "party-stony-boots-polar", "time": "2024-11-18 18:00:27.447527", "cmd": 1} {"id": 24024, "parent": 24023, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: one Int,\n month: one Int,\n year: one Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\n//Constraint 1\nfact AcademicYearRules {\n // Rule 4 + 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Rule 2 - (set months to set duration)\n all s: Summer | s.startDate.month = 6 and s.endDate.month = 7 \n all s: Spring | s.startDate.month = 1 and s.endDate.month = 5\n // --> idk why everytime i added the lower constraint it wouldnt work\n // all s: Fall | s.startDate.month = 8 or s.startDate.month = 9\n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n}\n//constraint to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n and s1.endDate != s2.endDate\n}\n\nrun {} ", "permalink": "essay-kabob-charm-rocker", "time": "2024-11-18 18:00:33.861432", "cmd": 1} {"id": 24025, "parent": 24024, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: one Int,\n month: one Int,\n year: one Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\n//Constraint 1\nfact AcademicYearRules {\n // Rule 4 + 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Rule 2 - (set months to set duration)\n all s: Summer | s.startDate.month = 6 and s.endDate.month = 7 \n all s: Spring | s.startDate.month = 1 and s.endDate.month = 5\n // --> idk why everytime i added the lower constraint it wouldnt work\n all s: Fall | s.startDate.month = 8 or s.endDate.month = 12\n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n}\n//constraint to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n and s1.endDate != s2.endDate\n}\n\nrun {} ", "permalink": "attic-unseen-washed-wool", "time": "2024-11-18 18:01:30.438459", "cmd": 1} {"id": 24026, "parent": 24025, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: one Int,\n month: one Int,\n year: one Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\n//Constraint 1\nfact AcademicYearRules {\n // Rule 4 + 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Rule 2 - (set months to set duration)\n all s: Summer | s.startDate.month = 6 and s.endDate.month = 7 \n all s: Spring | s.startDate.month = 1 and s.endDate.month = 5\n // --> idk why everytime i added the lower constraint it wouldnt work\n //all s: Fall | s.startDate.month = 8 or s.endDate.month = 12\n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n}\n//constraint to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n and s1.endDate != s2.endDate\n}\n\nrun {} ", "permalink": "flinch-theme-aged-deed", "time": "2024-11-18 18:01:35.379174", "cmd": 1} {"id": 24027, "parent": 24026, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: one Int,\n month: one Int,\n year: one Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\n//Constraint 1\nfact AcademicYearRules {\n // Rule 4 + 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Rule 2 - (set months to set duration)\n all s: Summer | s.startDate.month = 7 and s.endDate.month = 8 \n all s: Spring | s.startDate.month = 2 and s.endDate.month = 6\n // --> idk why everytime i added the lower constraint it wouldnt work\n //all s: Fall | s.startDate.month = 9 or s.endDate.month = 1\n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n}\n//constraint to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n and s1.endDate != s2.endDate\n}\n\nrun {} ", "permalink": "sweat-hence-venus-cover", "time": "2024-11-18 18:02:12.431508", "cmd": 1} {"id": 24030, "parent": 24027, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: one Int,\n month: one Int,\n year: one Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Rule 4 + 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Rule 2 & 3 - (set months to set duration)\n all s: Summer | s.startDate.month = 7 and s.endDate.month = 8 \n all s: Spring | s.startDate.month = 2 and s.endDate.month = 6\n // --> idk why everytime i added the lower constraint it wouldnt work\n //all s: Fall | s.startDate.month = 9 or s.endDate.month = 1\n // Rule 3\n all s: Summer | s.startDate.year = s.endDate.year \n all s: Spring | s.startDate.year = s.endDate.year\n all s: Fall | s.startDate.year = s.endDate.year-1 \n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n}\n//constraint to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n and s1.endDate != s2.endDate\n}\n\nrun {} ", "permalink": "yodel-zoning-visa-dental", "time": "2024-11-18 18:09:25.101778", "cmd": 1} {"id": 24033, "parent": 24030, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: one Int,\n month: one Int,\n year: one Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Rule 4 + 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Rule 2 & 3 - (set months to set duration)\n all s: Summer | s.startDate.month = 7 and s.endDate.month = 8 \n all s: Spring | s.startDate.month = 2 and s.endDate.month = 6\n // --> idk why everytime i added the lower constraint it wouldnt work\n //all s: Fall | s.startDate.month = 9 or s.endDate.month = 1\n // Rule 3\n all s: Summer | s.startDate.year = s.endDate.year \n all s: Spring | s.startDate.year = s.endDate.year\n all s: Fall | s.startDate.year > s.endDate.year \n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n}\n//constraint to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n and s1.endDate != s2.endDate\n}\n\nrun {} ", "permalink": "magma-gown-lily-revolt", "time": "2024-11-18 18:11:08.746677", "cmd": 1} {"id": 24034, "parent": 24033, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: one Int,\n month: one Int,\n year: one Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Rule 4 + 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Rule 2 & 3 - (set months to set duration)\n all s: Summer | s.startDate.month = 7 and s.endDate.month = 8 \n all s: Spring | s.startDate.month = 2 and s.endDate.month = 6\n // --> idk why everytime i added the lower constraint it wouldnt work\n //all s: Fall | s.startDate.month = 9 or s.endDate.month = 1\n // Rule 3\n all s: Summer | s.startDate.year = s.endDate.year \n all s: Spring | s.startDate.year = s.endDate.year\n all s: Fall | s.startDate.year >= s.endDate.year \n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n}\n//constraint to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n and s1.endDate != s2.endDate\n}\n\nrun {} ", "permalink": "gawk-item-recede-gaffe", "time": "2024-11-18 18:11:45.149461", "cmd": 1} {"id": 24035, "parent": 24034, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: one Int,\n month: one Int,\n year: one Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Rule 4 + 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Rule 2 & 3 - (set months to set duration)\n all s: Summer | s.startDate.month = 7 and s.endDate.month = 8 \n all s: Spring | s.startDate.month = 2 and s.endDate.month = 6\n // --> idk why everytime i added the lower constraint it wouldnt work\n //all s: Fall | s.startDate.month = 9 or s.endDate.month = 1\n // Rule 3\n all s: Summer | s.startDate.year = s.endDate.year \n all s: Spring | s.startDate.year = s.endDate.year\n all s: Fall | s.startDate.year <= s.endDate.year \n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n}\n//constraint to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n and s1.endDate != s2.endDate\n}\n\nrun {} ", "permalink": "viper-rental-cleft-clash", "time": "2024-11-18 18:12:55.599748", "cmd": 1} {"id": 24036, "parent": 24035, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: one Int,\n month: one Int,\n year: one Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Rule 4 + 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Rule 2 & 3 - (set months to set duration)\n all s: Summer | s.startDate.month = 7 and s.endDate.month = 8 \n all s: Spring | s.startDate.month = 2 and s.endDate.month = 6\n // --> idk why everytime i added the lower constraint it wouldnt work\n //all s: Fall | s.startDate.month = 9 or s.endDate.month = 1\n // Rule 3\n all s: Summer | s.startDate.year = s.endDate.year \n all s: Spring | s.startDate.year = s.endDate.year\n all s: Fall | s.startDate.year < s.endDate.year \n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n}\n//constraint to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n and s1.endDate != s2.endDate\n}\n\nrun {} ", "permalink": "whole-facial-uncut-shimmy", "time": "2024-11-18 18:14:21.649479", "cmd": 1} {"id": 24037, "parent": 24036, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: one Int,\n month: one Int,\n year: one Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Rule 4 + 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Rule 2 & 3 - (set months to set duration)\n all s: Summer | s.startDate.month = 7 and s.endDate.month = 8 \n all s: Spring | s.startDate.month = 2 and s.endDate.month = 6\n // --> idk why everytime i added the lower constraint it wouldnt work\n //all s: Fall | s.startDate.month = 9 or s.endDate.month = 1\n // Rule 3\n all s: Summer | s.startDate.year = s.endDate.year \n all s: Spring | s.startDate.year = s.endDate.year\n all s: Fall | s.startDate.year = s.endDate.year - 1 \n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n}\n//constraint to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n and s1.endDate != s2.endDate\n}\n\nrun {} ", "permalink": "scabby-value-zoom-expert", "time": "2024-11-18 18:16:33.808187", "cmd": 1} {"id": 24038, "parent": 24037, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: one Int,\n month: one Int,\n year: one Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Rule 4 + 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Rule 2 & 3 - (set months to set duration)\n all s: Summer | s.startDate.month = 7 and s.endDate.month = 8 \n all s: Spring | s.startDate.month = 2 and s.endDate.month = 6\n // --> idk why everytime i added the lower constraint it wouldnt work\n //all s: Fall | s.startDate.month = 9 or s.endDate.month = 1\n // Rule 3\n all s: Summer | s.startDate.year = s.endDate.year \n all s: Spring | s.startDate.year = s.endDate.year\n all s: Fall | s.startDate.year = (s.endDate.year - 1) \n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n}\n//constraint to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n and s1.endDate != s2.endDate\n}\n\nrun {} ", "permalink": "apply-reward-both-theft", "time": "2024-11-18 18:16:51.598008", "cmd": 1} {"id": 24039, "parent": 24038, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: one Int,\n month: one Int,\n year: one Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Rule 4 + 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Rule 2 & 3 - (set months to set duration)\n all s: Summer | s.startDate.month = 7 and s.endDate.month = 8 \n all s: Spring | s.startDate.month = 2 and s.endDate.month = 6\n // --> idk why everytime i added the lower constraint it wouldnt work\n //all s: Fall | s.startDate.month = 9 or s.endDate.month = 1\n // Rule 3\n all s: Summer | s.startDate.year = s.endDate.year \n all s: Spring | s.startDate.year = s.endDate.year\n all s: Fall | s.startDate.year <= s.endDate.year\n //all s: Fall | s.startDate.year = (s.endDate.year - 1) \n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n}\n//constraint to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n and s1.endDate != s2.endDate\n}\n\nrun {} ", "permalink": "ebay-strewn-proofs-curvy", "time": "2024-11-18 18:18:19.458980", "cmd": 1} {"id": 24041, "parent": 24040, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n// sig Date {\n// day: one Int,\n// month: one Int,\n// year: one Int\n// }\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nsig Student {\n rollNumber: one String\n}\n\nfact StudentRules {\n // Rule 5\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n}\n\n// fact AcademicYearRules {\n// // Rule 4 + 1 (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Rule 2 & 3 - (set months to set duration)\n// all s: Summer | s.startDate.month = 7 and s.endDate.month = 8 \n// all s: Spring | s.startDate.month = 2 and s.endDate.month = 6\n// // --> idk why everytime i added the lower constraint it wouldnt work\n// //all s: Fall | s.startDate.month = 9 or s.endDate.month = 1\n// // Rule 3\n// all s: Summer | s.startDate.year = s.endDate.year \n// all s: Spring | s.startDate.year = s.endDate.year\n// all s: Fall | s.startDate.year <= s.endDate.year\n// //all s: Fall | s.startDate.year = (s.endDate.year - 1) \n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// fact DateRules {\n// all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n// }\n// //constraint to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n// and s1.endDate != s2.endDate\n// }\n\nrun {} ", "permalink": "pope-masses-swoosh-bok", "time": "2024-11-18 18:25:36.945207", "cmd": 1} {"id": 24040, "parent": 24039, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n// sig Date {\n// day: one Int,\n// month: one Int,\n// year: one Int\n// }\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nsig Student {\n rollNumber: one String\n}\n\nfact StudentRules {\n // Rule 5\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n}\n\n// fact AcademicYearRules {\n// // Rule 4 + 1 (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Rule 2 & 3 - (set months to set duration)\n// all s: Summer | s.startDate.month = 7 and s.endDate.month = 8 \n// all s: Spring | s.startDate.month = 2 and s.endDate.month = 6\n// // --> idk why everytime i added the lower constraint it wouldnt work\n// //all s: Fall | s.startDate.month = 9 or s.endDate.month = 1\n// // Rule 3\n// all s: Summer | s.startDate.year = s.endDate.year \n// all s: Spring | s.startDate.year = s.endDate.year\n// all s: Fall | s.startDate.year <= s.endDate.year\n// //all s: Fall | s.startDate.year = (s.endDate.year - 1) \n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// fact DateRules {\n// all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n// }\n// //constraint to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n// and s1.endDate != s2.endDate\n// }\n\nrun {} ", "permalink": "undone-papaya-recite-bash", "time": "2024-11-18 18:25:13.843170", "cmd": 1} {"id": 24042, "parent": 24041, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n// sig Date {\n// day: one Int,\n// month: one Int,\n// year: one Int\n// }\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// sig Student {\n// rollNumber: one String\n// }\n\n// fact StudentRules {\n// // Rule 5\n// // Each student must have a unique roll number\n// all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n// }\n\n// fact AcademicYearRules {\n// // Rule 4 + 1 (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Rule 2 & 3 - (set months to set duration)\n// all s: Summer | s.startDate.month = 7 and s.endDate.month = 8 \n// all s: Spring | s.startDate.month = 2 and s.endDate.month = 6\n// // --> idk why everytime i added the lower constraint it wouldnt work\n// //all s: Fall | s.startDate.month = 9 or s.endDate.month = 1\n// // Rule 3\n// all s: Summer | s.startDate.year = s.endDate.year \n// all s: Spring | s.startDate.year = s.endDate.year\n// all s: Fall | s.startDate.year <= s.endDate.year\n// //all s: Fall | s.startDate.year = (s.endDate.year - 1) \n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// fact DateRules {\n// all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n// }\n// //constraint to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n// and s1.endDate != s2.endDate\n// }\n\n// Defining the Student signature with rollNumber of type String\nsig Student {\n rollNumber: one String\n}\n\n// Defining a set of possible strings for rollNumber\nsig RollNumberSet {\n numbers: set String\n}\n\n// Fact to ensure each student has a unique roll number\nfact StudentRules {\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber\n}\n\n// Defining some example string values for rollNumber\nfact RollNumberValues {\n some r1, r2, r3: RollNumberSet | r1 != r2 and r2 != r3 and r1 != r3\n}\n\n// Run command to find instances of students with roll numbers\nrun {} for 3 but 3 Student, 3 RollNumberSet, 3 String\n\n\n\n//run {} ", "permalink": "snowy-tag-cache-email", "time": "2024-11-18 18:29:03.812929", "cmd": 1} {"id": 24043, "parent": 24042, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n// sig Date {\n// day: one Int,\n// month: one Int,\n// year: one Int\n// }\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nsig Student {\n rollNumber: one Int\n}\n\nfact StudentRules {\n // Rule 5\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n}\n\n// fact AcademicYearRules {\n// // Rule 4 + 1 (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Rule 2 & 3 - (set months to set duration)\n// all s: Summer | s.startDate.month = 7 and s.endDate.month = 8 \n// all s: Spring | s.startDate.month = 2 and s.endDate.month = 6\n// // --> idk why everytime i added the lower constraint it wouldnt work\n// //all s: Fall | s.startDate.month = 9 or s.endDate.month = 1\n// // Rule 3\n// all s: Summer | s.startDate.year = s.endDate.year \n// all s: Spring | s.startDate.year = s.endDate.year\n// all s: Fall | s.startDate.year <= s.endDate.year\n// //all s: Fall | s.startDate.year = (s.endDate.year - 1) \n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// fact DateRules {\n// all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n// }\n// //constraint to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n// and s1.endDate != s2.endDate\n// }\n\nrun {} ", "permalink": "lash-happy-moody-veto", "time": "2024-11-18 18:29:45.884388", "cmd": 1} {"id": 24044, "parent": 24043, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nsig Date {\n day: one Int,\n month: one Int,\n year: one Int\n}\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n //courses: set Course\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\n// sig Student {\n// rollNumber: one Int\n// }\n\n// fact StudentRules {\n// // Rule 5\n// // Each student must have a unique roll number\n// all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n// }\n\nfact AcademicYearRules {\n // Rule 4 + 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Rule 2 & 3 - (set months to set duration)\n all s: Summer | s.startDate.month = 7 and s.endDate.month = 8 \n all s: Spring | s.startDate.month = 2 and s.endDate.month = 6\n // --> idk why everytime i added the lower constraint it wouldnt work\n //all s: Fall | s.startDate.month = 9 or s.endDate.month = 1\n // Rule 3\n all s: Summer | s.startDate.year = s.endDate.year \n all s: Spring | s.startDate.year = s.endDate.year\n all s: Fall | s.startDate.year <= s.endDate.year\n //all s: Fall | s.startDate.year = (s.endDate.year - 1) \n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\nfact DateRules {\n all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n all disj d1, d2: Date | d1 != d2\n}\n//constraint to ensure no overlap between semesters' dates.\nfact SemesterDateRules {\n all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n and s1.endDate != s2.endDate\n}\n\nrun {} ", "permalink": "essay-treat-embody-yo-yo", "time": "2024-11-18 18:33:30.505332", "cmd": 1} {"id": 24049, "parent": 24044, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n// sig Date {\n// day: one Int,\n// month: one Int,\n// year: one Int\n// }\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nsig Student {\n rollNumber: one Int,\n courses: set Course,\n canAppearInExam: one Boolean\n}\n\nsig Course {\n name: one String,\n //creditHours: one Int,\n //preReqs: set Course,\n //grade: one Int,\n attendance: one Int, // percentage\n}\n\n\nfact StudentRules {\n // Rule 5\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all s : Student | s.courses.attendance >= 80 implies s.canAppearInExam = true\n}\n\n// fact AcademicYearRules {\n// // Rule 4 + 1 (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Rule 2 & 3 - (set months to set duration)\n// all s: Summer | s.startDate.month = 7 and s.endDate.month = 8 \n// all s: Spring | s.startDate.month = 2 and s.endDate.month = 6\n// // --> idk why everytime i added the lower constraint it wouldnt work\n// //all s: Fall | s.startDate.month = 9 or s.endDate.month = 1\n// // Rule 3\n// all s: Summer | s.startDate.year = s.endDate.year \n// all s: Spring | s.startDate.year = s.endDate.year\n// all s: Fall | s.startDate.year <= s.endDate.year\n// //all s: Fall | s.startDate.year = (s.endDate.year - 1) \n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// fact DateRules {\n// all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n// all disj d1, d2: Date | d1 != d2\n// }\n// //constraint to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n// and s1.endDate != s2.endDate\n// }\n\nrun {} ", "permalink": "chemo-easter-pawing-linked", "time": "2024-11-18 18:42:24.328265", "cmd": 1} {"id": 24050, "parent": 24049, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n// sig Date {\n// day: one Int,\n// month: one Int,\n// year: one Int\n// }\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nsig Student {\n rollNumber: one Int,\n courses: set Course,\n canAppearInExam: one Bool\n}\n\nsig Course {\n name: one String,\n //creditHours: one Int,\n //preReqs: set Course,\n //grade: one Int,\n attendance: one Int, // percentage\n}\n\n\nfact StudentRules {\n // Rule 5\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all s : Student | s.courses.attendance >= 80 implies s.canAppearInExam = true\n}\n\n// fact AcademicYearRules {\n// // Rule 4 + 1 (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Rule 2 & 3 - (set months to set duration)\n// all s: Summer | s.startDate.month = 7 and s.endDate.month = 8 \n// all s: Spring | s.startDate.month = 2 and s.endDate.month = 6\n// // --> idk why everytime i added the lower constraint it wouldnt work\n// //all s: Fall | s.startDate.month = 9 or s.endDate.month = 1\n// // Rule 3\n// all s: Summer | s.startDate.year = s.endDate.year \n// all s: Spring | s.startDate.year = s.endDate.year\n// all s: Fall | s.startDate.year <= s.endDate.year\n// //all s: Fall | s.startDate.year = (s.endDate.year - 1) \n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// fact DateRules {\n// all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n// all disj d1, d2: Date | d1 != d2\n// }\n// //constraint to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n// and s1.endDate != s2.endDate\n// }\n\nrun {} ", "permalink": "fondly-flyer-tassel-nature", "time": "2024-11-18 18:42:31.714109", "cmd": 1} {"id": 24051, "parent": 24050, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n// sig Date {\n// day: one Int,\n// month: one Int,\n// year: one Int\n// }\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\nsig Student {\n rollNumber: one Int,\n courses: set Course,\n canAppearInExam: one Boolean\n}\n\nsig Course {\n name: one String,\n //creditHours: one Int,\n //preReqs: set Course,\n //grade: one Int,\n attendance: one Int, // percentage\n}\n\n\nfact StudentRules {\n // Rule 5\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all s : Student | s.courses.attendance >= 80 implies s.canAppearInExam = True\n}\n\n// fact AcademicYearRules {\n// // Rule 4 + 1 (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Rule 2 & 3 - (set months to set duration)\n// all s: Summer | s.startDate.month = 7 and s.endDate.month = 8 \n// all s: Spring | s.startDate.month = 2 and s.endDate.month = 6\n// // --> idk why everytime i added the lower constraint it wouldnt work\n// //all s: Fall | s.startDate.month = 9 or s.endDate.month = 1\n// // Rule 3\n// all s: Summer | s.startDate.year = s.endDate.year \n// all s: Spring | s.startDate.year = s.endDate.year\n// all s: Fall | s.startDate.year <= s.endDate.year\n// //all s: Fall | s.startDate.year = (s.endDate.year - 1) \n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// fact DateRules {\n// all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n// all disj d1, d2: Date | d1 != d2\n// }\n// //constraint to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n// and s1.endDate != s2.endDate\n// }\n\nrun {} ", "permalink": "pleat-bounce-banana-debate", "time": "2024-11-18 18:43:28.709662", "cmd": 1} {"id": 24054, "parent": 24051, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n// sig Date {\n// day: one Int,\n// month: one Int,\n// year: one Int\n// }\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\nsig Student {\n rollNumber: one Int,\n courses: set Course,\n canAppearInExam: one Boolean\n}\n\nsig Course {\n name: one String,\n //creditHours: one Int,\n //preReqs: set Course,\n //grade: one Int,\n attendance: one Int, // percentage\n}\n\n\nfact StudentRules {\n // Rule 5\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all s : Student | s.courses.attendance >= 80 implies s.canAppearInExam = True\n}\n\n// fact AcademicYearRules {\n// // Rule 4 + 1 (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Rule 2 & 3 - (set months to set duration)\n// all s: Summer | s.startDate.month = 7 and s.endDate.month = 8 \n// all s: Spring | s.startDate.month = 2 and s.endDate.month = 6\n// // --> idk why everytime i added the lower constraint it wouldnt work\n// //all s: Fall | s.startDate.month = 9 or s.endDate.month = 1\n// // Rule 3\n// all s: Summer | s.startDate.year = s.endDate.year \n// all s: Spring | s.startDate.year = s.endDate.year\n// all s: Fall | s.startDate.year <= s.endDate.year\n// //all s: Fall | s.startDate.year = (s.endDate.year - 1) \n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// fact DateRules {\n// all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n// all disj d1, d2: Date | d1 != d2\n// }\n// //constraint to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n// and s1.endDate != s2.endDate\n// }\n\nrun {} ", "permalink": "kennel-caress-tarmac-idiom", "time": "2024-11-18 18:44:05.275121", "cmd": 1} {"id": 24056, "parent": 24054, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n// sig Date {\n// day: one Int,\n// month: one Int,\n// year: one Int\n// }\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\nsig Student {\n rollNumber: one Int,\n courses: set Course,\n canAppearInExam: one Boolean\n}\n\nsig Course {\n name: one String,\n //creditHours: one Int,\n //preReqs: set Course,\n //grade: one Int,\n attendance: one Int, // percentage\n}\n\n\nfact StudentRules {\n // Rule 5\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all s : Student | s.courses.attendance >= 80 implies s.canAppearInExam = True\n}\n\n// fact AcademicYearRules {\n// // Rule 4 + 1 (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Rule 2 & 3 - (set months to set duration)\n// all s: Summer | s.startDate.month = 7 and s.endDate.month = 8 \n// all s: Spring | s.startDate.month = 2 and s.endDate.month = 6\n// // --> idk why everytime i added the lower constraint it wouldnt work\n// //all s: Fall | s.startDate.month = 9 or s.endDate.month = 1\n// // Rule 3\n// all s: Summer | s.startDate.year = s.endDate.year \n// all s: Spring | s.startDate.year = s.endDate.year\n// all s: Fall | s.startDate.year <= s.endDate.year\n// //all s: Fall | s.startDate.year = (s.endDate.year - 1) \n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// fact DateRules {\n// all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n// all disj d1, d2: Date | d1 != d2\n// }\n// //constraint to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n// and s1.endDate != s2.endDate\n// }\n\nrun {} for 4 but 2 Course", "permalink": "equity-gamma-gravy-eleven", "time": "2024-11-18 18:45:16.297583", "cmd": 1} {"id": 24057, "parent": 24056, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n// sig Date {\n// day: one Int,\n// month: one Int,\n// year: one Int\n// }\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\nsig Student {\n rollNumber: one Int,\n courses: set Course\n}\n\nsig Course {\n name: one String,\n canAppearInExam: one Boolean\n //creditHours: one Int,\n //preReqs: set Course,\n //grade: one Int,\n attendance: one Int, // percentage\n}\n\n\nfact StudentRules {\n // Rule 5\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all c : Course | c.attendance >= 80 implies c.canAppearInExam = True\n}\n\n// fact AcademicYearRules {\n// // Rule 4 + 1 (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Rule 2 & 3 - (set months to set duration)\n// all s: Summer | s.startDate.month = 7 and s.endDate.month = 8 \n// all s: Spring | s.startDate.month = 2 and s.endDate.month = 6\n// // --> idk why everytime i added the lower constraint it wouldnt work\n// //all s: Fall | s.startDate.month = 9 or s.endDate.month = 1\n// // Rule 3\n// all s: Summer | s.startDate.year = s.endDate.year \n// all s: Spring | s.startDate.year = s.endDate.year\n// all s: Fall | s.startDate.year <= s.endDate.year\n// //all s: Fall | s.startDate.year = (s.endDate.year - 1) \n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// fact DateRules {\n// all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n// all disj d1, d2: Date | d1 != d2\n// }\n// //constraint to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n// and s1.endDate != s2.endDate\n// }\n\nrun {} for 4 but 2 Course", "permalink": "wisdom-strobe-dugout-bulk", "time": "2024-11-18 18:47:56.767992", "cmd": 1} {"id": 24058, "parent": 24057, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n// sig Date {\n// day: one Int,\n// month: one Int,\n// year: one Int\n// }\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\nsig Student {\n rollNumber: one Int,\n courses: set Course\n}\n\nsig Course {\n name: one String,\n canAppearInExam: one Boolean,\n //creditHours: one Int,\n //preReqs: set Course,\n //grade: one Int,\n attendance: one Int, // percentage\n}\n\n\nfact StudentRules {\n // Rule 5\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all c : Course | c.attendance >= 80 implies c.canAppearInExam = True\n}\n\n// fact AcademicYearRules {\n// // Rule 4 + 1 (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Rule 2 & 3 - (set months to set duration)\n// all s: Summer | s.startDate.month = 7 and s.endDate.month = 8 \n// all s: Spring | s.startDate.month = 2 and s.endDate.month = 6\n// // --> idk why everytime i added the lower constraint it wouldnt work\n// //all s: Fall | s.startDate.month = 9 or s.endDate.month = 1\n// // Rule 3\n// all s: Summer | s.startDate.year = s.endDate.year \n// all s: Spring | s.startDate.year = s.endDate.year\n// all s: Fall | s.startDate.year <= s.endDate.year\n// //all s: Fall | s.startDate.year = (s.endDate.year - 1) \n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// fact DateRules {\n// all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n// all disj d1, d2: Date | d1 != d2\n// }\n// //constraint to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n// and s1.endDate != s2.endDate\n// }\n\nrun {} for 4 but 2 Course", "permalink": "elk-scouts-author-circle", "time": "2024-11-18 18:48:04.134761", "cmd": 1} {"id": 24059, "parent": 24058, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n// sig Date {\n// day: one Int,\n// month: one Int,\n// year: one Int\n// }\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\nsig Student {\n rollNumber: one Int,\n courses: one Course\n}\n\nsig Course {\n name: one String,\n canAppearInExam: one Boolean,\n //creditHours: one Int,\n //preReqs: set Course,\n //grade: one Int,\n attendance: one Int, // percentage\n}\n\n\nfact StudentRules {\n // Rule 5\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all c : Course | c.attendance >= 80 implies c.canAppearInExam = True\n}\n\n// fact AcademicYearRules {\n// // Rule 4 + 1 (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Rule 2 & 3 - (set months to set duration)\n// all s: Summer | s.startDate.month = 7 and s.endDate.month = 8 \n// all s: Spring | s.startDate.month = 2 and s.endDate.month = 6\n// // --> idk why everytime i added the lower constraint it wouldnt work\n// //all s: Fall | s.startDate.month = 9 or s.endDate.month = 1\n// // Rule 3\n// all s: Summer | s.startDate.year = s.endDate.year \n// all s: Spring | s.startDate.year = s.endDate.year\n// all s: Fall | s.startDate.year <= s.endDate.year\n// //all s: Fall | s.startDate.year = (s.endDate.year - 1) \n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// fact DateRules {\n// all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n// all disj d1, d2: Date | d1 != d2\n// }\n// //constraint to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n// and s1.endDate != s2.endDate\n// }\n\nrun {} for 4 but 2 Course", "permalink": "versus-rewind-choosy-copier", "time": "2024-11-18 18:48:23.301787", "cmd": 1} {"id": 24060, "parent": 24059, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n// sig Date {\n// day: one Int,\n// month: one Int,\n// year: one Int\n// }\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\nsig Course {\n name: one String,\n canAppearInExam: one Boolean,\n //creditHours: one Int,\n //preReqs: set Course,\n //grade: one Int,\n attendance: one Int, // percentage\n}\n\nsig Student {\n rollNumber: one Int,\n courses: one Course\n}\n\n\n\n\nfact StudentRules {\n // Rule 5\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all c : Course | c.attendance >= 80 implies c.canAppearInExam = True\n}\n\n// fact AcademicYearRules {\n// // Rule 4 + 1 (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Rule 2 & 3 - (set months to set duration)\n// all s: Summer | s.startDate.month = 7 and s.endDate.month = 8 \n// all s: Spring | s.startDate.month = 2 and s.endDate.month = 6\n// // --> idk why everytime i added the lower constraint it wouldnt work\n// //all s: Fall | s.startDate.month = 9 or s.endDate.month = 1\n// // Rule 3\n// all s: Summer | s.startDate.year = s.endDate.year \n// all s: Spring | s.startDate.year = s.endDate.year\n// all s: Fall | s.startDate.year <= s.endDate.year\n// //all s: Fall | s.startDate.year = (s.endDate.year - 1) \n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// fact DateRules {\n// all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n// all disj d1, d2: Date | d1 != d2\n// }\n// //constraint to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n// and s1.endDate != s2.endDate\n// }\n\nrun {} for 4 but 2 Course", "permalink": "brick-slurp-trench-ocean", "time": "2024-11-18 18:48:41.585188", "cmd": 1} {"id": 24061, "parent": 24060, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n// sig Date {\n// day: one Int,\n// month: one Int,\n// year: one Int\n// }\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\nsig Course {\n name: one String,\n canAppearInExam: one Boolean,\n //creditHours: one Int,\n //preReqs: set Course,\n //grade: one Int,\n attendance: one Int, // percentage\n}\n\nsig Student {\n rollNumber: one Int,\n courses: one Course\n}\n\nfact StudentRules {\n // Rule 5\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all c : Course | c.attendance >= 80 implies c.canAppearInExam = True\n}\n\n// fact AcademicYearRules {\n// // Rule 4 + 1 (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Rule 2 & 3 - (set months to set duration)\n// all s: Summer | s.startDate.month = 7 and s.endDate.month = 8 \n// all s: Spring | s.startDate.month = 2 and s.endDate.month = 6\n// // --> idk why everytime i added the lower constraint it wouldnt work\n// //all s: Fall | s.startDate.month = 9 or s.endDate.month = 1\n// // Rule 3\n// all s: Summer | s.startDate.year = s.endDate.year \n// all s: Spring | s.startDate.year = s.endDate.year\n// all s: Fall | s.startDate.year <= s.endDate.year\n// //all s: Fall | s.startDate.year = (s.endDate.year - 1) \n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// fact DateRules {\n// all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n// all disj d1, d2: Date | d1 != d2\n// }\n// //constraint to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n// and s1.endDate != s2.endDate\n// }\n\nrun {}", "permalink": "ovary-kitten-yoyo-rare", "time": "2024-11-18 18:49:06.169549", "cmd": 1} {"id": 24062, "parent": 24061, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n// sig Date {\n// day: one Int,\n// month: one Int,\n// year: one Int\n// }\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\nsig Course {\n name: one String,\n canAppearInExam: one Boolean,\n //creditHours: one Int,\n //preReqs: set Course,\n //grade: one Int,\n attendance: one Int, // percentage\n}\n\nsig Student {\n rollNumber: one Int,\n courses: one Course\n}\n\nfact StudentRules {\n // Rule 5\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all s: Student, c: Course | c in s.courses implies (c.attendance >= 80 implies c.canAppearInExam = True)\n}\n\n// fact AcademicYearRules {\n// // Rule 4 + 1 (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Rule 2 & 3 - (set months to set duration)\n// all s: Summer | s.startDate.month = 7 and s.endDate.month = 8 \n// all s: Spring | s.startDate.month = 2 and s.endDate.month = 6\n// // --> idk why everytime i added the lower constraint it wouldnt work\n// //all s: Fall | s.startDate.month = 9 or s.endDate.month = 1\n// // Rule 3\n// all s: Summer | s.startDate.year = s.endDate.year \n// all s: Spring | s.startDate.year = s.endDate.year\n// all s: Fall | s.startDate.year <= s.endDate.year\n// //all s: Fall | s.startDate.year = (s.endDate.year - 1) \n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// fact DateRules {\n// all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n// all disj d1, d2: Date | d1 != d2\n// }\n// //constraint to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n// and s1.endDate != s2.endDate\n// }\n\nrun {}", "permalink": "rework-county-feeble-anemia", "time": "2024-11-18 18:51:46.558413", "cmd": 1} {"id": 24063, "parent": 24062, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n// sig Date {\n// day: one Int,\n// month: one Int,\n// year: one Int\n// }\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\nsig Course {\n name: one String,\n canAppearInExam: one Boolean,\n //creditHours: one Int,\n //preReqs: set Course,\n //grade: one Int,\n attendance: one Int, // percentage\n}\n\nsig Student {\n rollNumber: one Int,\n courses: set Course\n}\n\nfact StudentRules {\n // Rule 5\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n // Rule 6\n all s: Student, c: Course | c in s.courses implies (c.attendance >= 80 implies c.canAppearInExam = True)\n}\n\n// fact AcademicYearRules {\n// // Rule 4 + 1 (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Rule 2 & 3 - (set months to set duration)\n// all s: Summer | s.startDate.month = 7 and s.endDate.month = 8 \n// all s: Spring | s.startDate.month = 2 and s.endDate.month = 6\n// // --> idk why everytime i added the lower constraint it wouldnt work\n// //all s: Fall | s.startDate.month = 9 or s.endDate.month = 1\n// // Rule 3\n// all s: Summer | s.startDate.year = s.endDate.year \n// all s: Spring | s.startDate.year = s.endDate.year\n// all s: Fall | s.startDate.year <= s.endDate.year\n// //all s: Fall | s.startDate.year = (s.endDate.year - 1) \n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// fact DateRules {\n// all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n// all disj d1, d2: Date | d1 != d2\n// }\n// //constraint to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n// and s1.endDate != s2.endDate\n// }\n\nrun {}", "permalink": "arrive-pectin-gains-cleat", "time": "2024-11-18 18:52:25.422317", "cmd": 1} {"id": 24064, "parent": 24063, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n// sig Date {\n// day: one Int,\n// month: one Int,\n// year: one Int\n// }\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\nsig Course {\n name: one Int, //strings dont work, temporaily naming them integers\n canAppearInExam: one Boolean,\n //creditHours: one Int,\n //preReqs: set Course,\n //grade: one Int,\n attendance: one Int, // percentage\n}\n\nsig Student {\n rollNumber: one Int,\n courses: set Course\n}\n\nfact StudentRules {\n // Rule 5\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n // Rule 6\n all s: Student, c: Course | c in s.courses implies (c.attendance >= 80 implies c.canAppearInExam = True)\n}\n\n// fact AcademicYearRules {\n// // Rule 4 + 1 (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Rule 2 & 3 - (set months to set duration)\n// all s: Summer | s.startDate.month = 7 and s.endDate.month = 8 \n// all s: Spring | s.startDate.month = 2 and s.endDate.month = 6\n// // --> idk why everytime i added the lower constraint it wouldnt work\n// //all s: Fall | s.startDate.month = 9 or s.endDate.month = 1\n// // Rule 3\n// all s: Summer | s.startDate.year = s.endDate.year \n// all s: Spring | s.startDate.year = s.endDate.year\n// all s: Fall | s.startDate.year <= s.endDate.year\n// //all s: Fall | s.startDate.year = (s.endDate.year - 1) \n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// fact DateRules {\n// all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n// all disj d1, d2: Date | d1 != d2\n// }\n// //constraint to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n// and s1.endDate != s2.endDate\n// }\n\nrun {}", "permalink": "sushi-cover-herbal-hug", "time": "2024-11-18 18:53:08.912006", "cmd": 1} {"id": 24065, "parent": 24064, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n// sig Date {\n// day: one Int,\n// month: one Int,\n// year: one Int\n// }\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\nsig Course {\n name: one Int, //strings dont work, temporaily naming them integers\n //creditHours: one Int,\n //preReqs: set Course,\n //grade: one Int,\n \n}\n\nsig Attendance{\n course: Course,\n attendance: one Int, //percentage \n canAppearInExam: one Boolean,\n}\n\nsig Student {\n rollNumber: one Int,\n courses: set Course,\n attendanceforCourses: set Attendance\n}\n\nfact StudentRules {\n // Rule 5\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n // Rule 6\n all a: Attendance | a.attendance >= 80 implies a.canAppearInExam = True)\n}\n\n// fact AcademicYearRules {\n// // Rule 4 + 1 (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Rule 2 & 3 - (set months to set duration)\n// all s: Summer | s.startDate.month = 7 and s.endDate.month = 8 \n// all s: Spring | s.startDate.month = 2 and s.endDate.month = 6\n// // --> idk why everytime i added the lower constraint it wouldnt work\n// //all s: Fall | s.startDate.month = 9 or s.endDate.month = 1\n// // Rule 3\n// all s: Summer | s.startDate.year = s.endDate.year \n// all s: Spring | s.startDate.year = s.endDate.year\n// all s: Fall | s.startDate.year <= s.endDate.year\n// //all s: Fall | s.startDate.year = (s.endDate.year - 1) \n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// fact DateRules {\n// all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n// all disj d1, d2: Date | d1 != d2\n// }\n// //constraint to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n// and s1.endDate != s2.endDate\n// }\n\nrun {}", "permalink": "recant-equal-panda-fever", "time": "2024-11-18 18:57:18.911947", "cmd": 1} {"id": 24066, "parent": 24065, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n// sig Date {\n// day: one Int,\n// month: one Int,\n// year: one Int\n// }\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\nsig Course {\n name: one Int, //strings dont work, temporaily naming them integers\n //creditHours: one Int,\n //preReqs: set Course,\n //grade: one Int,\n \n}\n\nsig Attendance{\n course: Course,\n attendance: one Int, //percentage \n canAppearInExam: one Boolean,\n}\n\nsig Student {\n rollNumber: one Int,\n courses: set Course,\n attendanceforCourses: set Attendance\n}\n\nfact StudentRules {\n // Rule 5\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n // Rule 6\n all a: Attendance | a.attendance >= 80 implies a.canAppearInExam = True\n}\n\n// fact AcademicYearRules {\n// // Rule 4 + 1 (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Rule 2 & 3 - (set months to set duration)\n// all s: Summer | s.startDate.month = 7 and s.endDate.month = 8 \n// all s: Spring | s.startDate.month = 2 and s.endDate.month = 6\n// // --> idk why everytime i added the lower constraint it wouldnt work\n// //all s: Fall | s.startDate.month = 9 or s.endDate.month = 1\n// // Rule 3\n// all s: Summer | s.startDate.year = s.endDate.year \n// all s: Spring | s.startDate.year = s.endDate.year\n// all s: Fall | s.startDate.year <= s.endDate.year\n// //all s: Fall | s.startDate.year = (s.endDate.year - 1) \n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// fact DateRules {\n// all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n// all disj d1, d2: Date | d1 != d2\n// }\n// //constraint to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n// and s1.endDate != s2.endDate\n// }\n\nrun {}", "permalink": "crib-avenge-glider-plod", "time": "2024-11-18 18:57:32.249536", "cmd": 1} {"id": 24067, "parent": 24066, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n// sig Date {\n// day: one Int,\n// month: one Int,\n// year: one Int\n// }\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\nsig Course {\n name: one Int, //strings dont work, temporaily naming them integers\n //creditHours: one Int,\n //preReqs: set Course,\n //grade: one Int,\n \n}\n\nsig Attendance{\n course: one Course,\n attendance: one Int, //percentage \n canAppearInExam: one Boolean,\n}\n\nsig Student {\n rollNumber: one Int,\n courses: set Course,\n attendanceforCourses: set Attendance\n}\n\nfact StudentRules {\n // Rule 5\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n // Rule 6\n all a: Attendance | a.attendance >= 80 implies a.canAppearInExam = True\n // If a student has attendance for a course, the course should be in their courses set\n all s: Student, a: Attendance | \n a in s.attendanceforCourses implies a.course in s.courses\n}\n\n// fact AcademicYearRules {\n// // Rule 4 + 1 (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Rule 2 & 3 - (set months to set duration)\n// all s: Summer | s.startDate.month = 7 and s.endDate.month = 8 \n// all s: Spring | s.startDate.month = 2 and s.endDate.month = 6\n// // --> idk why everytime i added the lower constraint it wouldnt work\n// //all s: Fall | s.startDate.month = 9 or s.endDate.month = 1\n// // Rule 3\n// all s: Summer | s.startDate.year = s.endDate.year \n// all s: Spring | s.startDate.year = s.endDate.year\n// all s: Fall | s.startDate.year <= s.endDate.year\n// //all s: Fall | s.startDate.year = (s.endDate.year - 1) \n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// fact DateRules {\n// all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n// all disj d1, d2: Date | d1 != d2\n// }\n// //constraint to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n// and s1.endDate != s2.endDate\n// }\n\nrun {}", "permalink": "revise-ladle-mascot-jackal", "time": "2024-11-18 18:59:47.107943", "cmd": 1} {"id": 24068, "parent": 24067, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n// sig Date {\n// day: one Int,\n// month: one Int,\n// year: one Int\n// }\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\nsig Course {\n name: one Int, //strings dont work, temporaily naming them integers\n //creditHours: one Int,\n //preReqs: set Course,\n //grade: one Int,\n \n}\n\nsig Attendance{\n course: one Course,\n attendance: one Int, //percentage \n canAppearInExam: one Boolean,\n}\n\nsig Student {\n rollNumber: one Int,\n courses: set Course,\n attendanceforCourses: set Attendance\n}\n\nfact StudentRules {\n // Rule 5\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n // Rule 6\n all a: Attendance | a.attendance >= 80 implies a.canAppearInExam = True\n // If a student has attendance for a course, the course should be in their courses set\n all s: Student, a: Attendance | a in s.attendanceforCourses implies a.course in s.courses\n all disj a1, a2: Assignment, s:Student | a1 in s.attendanceforCourses and a2 in attendanceforCourses implies a1 != a2 \n}\n\n// fact AcademicYearRules {\n// // Rule 4 + 1 (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Rule 2 & 3 - (set months to set duration)\n// all s: Summer | s.startDate.month = 7 and s.endDate.month = 8 \n// all s: Spring | s.startDate.month = 2 and s.endDate.month = 6\n// // --> idk why everytime i added the lower constraint it wouldnt work\n// //all s: Fall | s.startDate.month = 9 or s.endDate.month = 1\n// // Rule 3\n// all s: Summer | s.startDate.year = s.endDate.year \n// all s: Spring | s.startDate.year = s.endDate.year\n// all s: Fall | s.startDate.year <= s.endDate.year\n// //all s: Fall | s.startDate.year = (s.endDate.year - 1) \n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// fact DateRules {\n// all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n// all disj d1, d2: Date | d1 != d2\n// }\n// //constraint to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n// and s1.endDate != s2.endDate\n// }\n\nrun {}", "permalink": "human-raider-liver-parole", "time": "2024-11-18 19:02:12.423547", "cmd": 1} {"id": 24069, "parent": 24068, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n// sig Date {\n// day: one Int,\n// month: one Int,\n// year: one Int\n// }\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\nsig Course {\n name: one Int, //strings dont work, temporaily naming them integers\n //creditHours: one Int,\n //preReqs: set Course,\n //grade: one Int,\n \n}\n\nsig Attendance{\n course: one Course,\n attendance: one Int, //percentage \n canAppearInExam: one Boolean,\n}\n\nsig Student {\n rollNumber: one Int,\n courses: set Course,\n attendanceforCourses: set Attendance\n}\n\nfact StudentRules {\n // Rule 5\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n // Rule 6\n all a: Attendance | a.attendance >= 80 implies a.canAppearInExam = True\n // If a student has attendance for a course, the course should be in their courses set\n all s: Student, a: Attendance | a in s.attendanceforCourses implies a.course in s.courses\n all disj a1, a2: Attendance, s:Student | a1 in s.attendanceforCourses and a2 in attendanceforCourses implies a1 != a2 \n}\n\n// fact AcademicYearRules {\n// // Rule 4 + 1 (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Rule 2 & 3 - (set months to set duration)\n// all s: Summer | s.startDate.month = 7 and s.endDate.month = 8 \n// all s: Spring | s.startDate.month = 2 and s.endDate.month = 6\n// // --> idk why everytime i added the lower constraint it wouldnt work\n// //all s: Fall | s.startDate.month = 9 or s.endDate.month = 1\n// // Rule 3\n// all s: Summer | s.startDate.year = s.endDate.year \n// all s: Spring | s.startDate.year = s.endDate.year\n// all s: Fall | s.startDate.year <= s.endDate.year\n// //all s: Fall | s.startDate.year = (s.endDate.year - 1) \n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// fact DateRules {\n// all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n// all disj d1, d2: Date | d1 != d2\n// }\n// //constraint to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n// and s1.endDate != s2.endDate\n// }\n\nrun {}", "permalink": "saga-tartar-carded-fled", "time": "2024-11-18 19:02:22.499750", "cmd": 1} {"id": 24073, "parent": 24069, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n// sig Date {\n// day: one Int,\n// month: one Int,\n// year: one Int\n// }\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\nsig Course {\n name: one Int, //strings dont work, temporaily naming them integers\n //creditHours: one Int,\n //preReqs: set Course,\n //grade: one Int,\n \n}\n\nsig Attendance{\n course: one Course,\n attendance: one Int, //percentage \n canAppearInExam: one Boolean,\n}\n\nsig Student {\n rollNumber: one Int,\n courses: set Course,\n attendanceforCourses: set Attendance\n}\n\nfact StudentRules {\n // Rule 5\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n // Rule 6\n all a: Attendance | a.attendance >= 80 implies a.canAppearInExam = True\n // If a student has attendance for a course, the course should be in their courses set\n all s: Student, a: Attendance | a in s.attendanceforCourses implies a.course in s.courses\n // Rule: A student cannot have two distinct attendance records for the same course\n all disj s: Student, a1, a2: Attendance | a1 in s.attendanceforCourses and a2 in s.attendanceforCourses \n and a1.course = a2.course implies a1 = a2\n}\n\n// fact AcademicYearRules {\n// // Rule 4 + 1 (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Rule 2 & 3 - (set months to set duration)\n// all s: Summer | s.startDate.month = 7 and s.endDate.month = 8 \n// all s: Spring | s.startDate.month = 2 and s.endDate.month = 6\n// // --> idk why everytime i added the lower constraint it wouldnt work\n// //all s: Fall | s.startDate.month = 9 or s.endDate.month = 1\n// // Rule 3\n// all s: Summer | s.startDate.year = s.endDate.year \n// all s: Spring | s.startDate.year = s.endDate.year\n// all s: Fall | s.startDate.year <= s.endDate.year\n// //all s: Fall | s.startDate.year = (s.endDate.year - 1) \n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// fact DateRules {\n// all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n// all disj d1, d2: Date | d1 != d2\n// }\n// //constraint to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n// and s1.endDate != s2.endDate\n// }\n\nrun {}", "permalink": "animal-chunk-cyclic-silt", "time": "2024-11-18 19:03:41.379448", "cmd": 1} {"id": 24076, "parent": 24073, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n// sig Date {\n// day: one Int,\n// month: one Int,\n// year: one Int\n// }\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\nsig Course {\n name: one Int, //strings dont work, temporaily naming them integers\n //creditHours: one Int,\n //preReqs: set Course,\n //grade: one Int,\n \n}\n\nsig Attendance{\n course: one Course,\n attendance: one Int, //percentage \n canAppearInExam: one Boolean,\n}\n\nsig Student {\n rollNumber: one Int,\n courses: set Course,\n attendanceforCourses: set Attendance\n}\n\nfact StudentRules {\n // Rule 5\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n // Rule 6\n all a: Attendance | a.attendance >= 80 implies a.canAppearInExam = True\n // If a student has attendance for a course, the course should be in their courses set\n all s: Student, a: Attendance | a in s.attendanceforCourses implies a.course in s.courses\n // Rule: A student cannot have two distinct attendance records for the same course\n all disj s: Student, a1, a2: Attendance | a1 in s.attendanceforCourses and a2 in s.attendanceforCourses \n and a1.course = a2.course implies a1 = a2\n}\n\nassert attendance{\n all a: Attendance | a.attendance >= 80 implies a.canAppearInExam = True\n}\n\n// fact AcademicYearRules {\n// // Rule 4 + 1 (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Rule 2 & 3 - (set months to set duration)\n// all s: Summer | s.startDate.month = 7 and s.endDate.month = 8 \n// all s: Spring | s.startDate.month = 2 and s.endDate.month = 6\n// // --> idk why everytime i added the lower constraint it wouldnt work\n// //all s: Fall | s.startDate.month = 9 or s.endDate.month = 1\n// // Rule 3\n// all s: Summer | s.startDate.year = s.endDate.year \n// all s: Spring | s.startDate.year = s.endDate.year\n// all s: Fall | s.startDate.year <= s.endDate.year\n// //all s: Fall | s.startDate.year = (s.endDate.year - 1) \n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// fact DateRules {\n// all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n// all disj d1, d2: Date | d1 != d2\n// }\n// //constraint to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n// and s1.endDate != s2.endDate\n// }\n\nrun {}", "permalink": "rocker-buffer-slot-latch", "time": "2024-11-18 19:04:39.152360", "cmd": 1} {"id": 24077, "parent": 24076, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n// sig Date {\n// day: one Int,\n// month: one Int,\n// year: one Int\n// }\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\nsig Course {\n name: one Int, //strings dont work, temporaily naming them integers\n //creditHours: one Int,\n //preReqs: set Course,\n //grade: one Int,\n \n}\n\nsig Attendance{\n course: one Course,\n attendance: one Int, //percentage \n canAppearInExam: one Boolean,\n}\n\nsig Student {\n rollNumber: one Int,\n courses: set Course,\n attendanceforCourses: set Attendance\n}\n\nfact StudentRules {\n // Rule 5\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n // Rule 6\n all a: Attendance | a.attendance >= 80 implies a.canAppearInExam = True\n // If a student has attendance for a course, the course should be in their courses set\n all s: Student, a: Attendance | a in s.attendanceforCourses implies a.course in s.courses\n // Rule: A student cannot have two distinct attendance records for the same course\n all disj s: Student, a1, a2: Attendance | a1 in s.attendanceforCourses and a2 in s.attendanceforCourses \n and a1.course = a2.course implies a1 = a2\n}\n\nassert attendance{\n all a: Attendance | a.attendance >= 80 implies a.canAppearInExam = True\n all a: Attendance | a.attendance <= 80 implies a.canAppearInExam = False\n\n}\n\n// fact AcademicYearRules {\n// // Rule 4 + 1 (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Rule 2 & 3 - (set months to set duration)\n// all s: Summer | s.startDate.month = 7 and s.endDate.month = 8 \n// all s: Spring | s.startDate.month = 2 and s.endDate.month = 6\n// // --> idk why everytime i added the lower constraint it wouldnt work\n// //all s: Fall | s.startDate.month = 9 or s.endDate.month = 1\n// // Rule 3\n// all s: Summer | s.startDate.year = s.endDate.year \n// all s: Spring | s.startDate.year = s.endDate.year\n// all s: Fall | s.startDate.year <= s.endDate.year\n// //all s: Fall | s.startDate.year = (s.endDate.year - 1) \n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// fact DateRules {\n// all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n// all disj d1, d2: Date | d1 != d2\n// }\n// //constraint to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n// and s1.endDate != s2.endDate\n// }\n\nrun {}", "permalink": "blurt-fender-matter-avert", "time": "2024-11-18 19:05:10.400912", "cmd": 1} {"id": 24080, "parent": 24077, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n// sig Date {\n// day: one Int,\n// month: one Int,\n// year: one Int\n// }\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\nsig Course {\n name: one Int, //strings dont work, temporaily naming them integers\n //creditHours: one Int,\n //preReqs: set Course,\n //grade: one Int,\n \n}\n\nsig Attendance{\n course: one Course,\n attendance: one Int, //percentage \n canAppearInExam: one Boolean,\n}\n\nsig Student {\n rollNumber: one Int,\n courses: set Course,\n attendanceforCourses: set Attendance\n}\n\nfact StudentRules {\n // Rule 5\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n // Rule 6\n all a: Attendance | a.attendance >= 80 implies a.canAppearInExam = True\n // If a student has attendance for a course, the course should be in their courses set\n all s: Student, a: Attendance | a in s.attendanceforCourses implies a.course in s.courses\n // Rule: A student cannot have two distinct attendance records for the same course\n all disj s: Student, a1, a2: Attendance | a1 in s.attendanceforCourses and a2 in s.attendanceforCourses \n and a1.course = a2.course implies a1 = a2\n}\n\nassert attendance{\n all a: Attendance | a.attendance >= 80 implies a.canAppearInExam = True\n all a: Attendance | a.attendance <= 80 implies a.canAppearInExam = False\n\n}\n\n// fact AcademicYearRules {\n// // Rule 4 + 1 (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Rule 2 & 3 - (set months to set duration)\n// all s: Summer | s.startDate.month = 7 and s.endDate.month = 8 \n// all s: Spring | s.startDate.month = 2 and s.endDate.month = 6\n// // --> idk why everytime i added the lower constraint it wouldnt work\n// //all s: Fall | s.startDate.month = 9 or s.endDate.month = 1\n// // Rule 3\n// all s: Summer | s.startDate.year = s.endDate.year \n// all s: Spring | s.startDate.year = s.endDate.year\n// all s: Fall | s.startDate.year <= s.endDate.year\n// //all s: Fall | s.startDate.year = (s.endDate.year - 1) \n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// fact DateRules {\n// all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n// all disj d1, d2: Date | d1 != d2\n// }\n// //constraint to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n// and s1.endDate != s2.endDate\n// }\n\nrun {}", "permalink": "gong-slicer-echo-bonsai", "time": "2024-11-18 19:05:18.607595", "cmd": 1} {"id": 24081, "parent": 24080, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n// sig Date {\n// day: one Int,\n// month: one Int,\n// year: one Int\n// }\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\nsig Course {\n name: one Int, //strings dont work, temporaily naming them integers\n //creditHours: one Int,\n //preReqs: set Course,\n //grade: one Int,\n \n}\n\nsig Attendance{\n course: one Course,\n attendance: one Int, //percentage \n canAppearInExam: one Boolean,\n}\n\nsig Student {\n rollNumber: one Int,\n courses: set Course,\n attendanceforCourses: set Attendance\n}\n\nfact StudentRules {\n // Rule 5\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n // Rule 6\n all a: Attendance | a.attendance >= 80 implies a.canAppearInExam = True\n all a: Attendance | a.attendance <= 79 implies a.canAppearInExam = False\n // If a student has attendance for a course, the course should be in their courses set\n all s: Student, a: Attendance | a in s.attendanceforCourses implies a.course in s.courses\n // Rule: A student cannot have two distinct attendance records for the same course\n all disj s: Student, a1, a2: Attendance | a1 in s.attendanceforCourses and a2 in s.attendanceforCourses \n and a1.course = a2.course implies a1 = a2\n}\n\n\n// fact AcademicYearRules {\n// // Rule 4 + 1 (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Rule 2 & 3 - (set months to set duration)\n// all s: Summer | s.startDate.month = 7 and s.endDate.month = 8 \n// all s: Spring | s.startDate.month = 2 and s.endDate.month = 6\n// // --> idk why everytime i added the lower constraint it wouldnt work\n// //all s: Fall | s.startDate.month = 9 or s.endDate.month = 1\n// // Rule 3\n// all s: Summer | s.startDate.year = s.endDate.year \n// all s: Spring | s.startDate.year = s.endDate.year\n// all s: Fall | s.startDate.year <= s.endDate.year\n// //all s: Fall | s.startDate.year = (s.endDate.year - 1) \n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// fact DateRules {\n// all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n// all disj d1, d2: Date | d1 != d2\n// }\n// //constraint to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n// and s1.endDate != s2.endDate\n// }\n\nrun {}", "permalink": "alarm-gluten-shove-shout", "time": "2024-11-18 19:05:43.529912", "cmd": 1} {"id": 24085, "parent": 24081, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n// sig Date {\n// day: one Int,\n// month: one Int,\n// year: one Int\n// }\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\nsig Course {\n name: one Int, //strings dont work, temporaily naming them integers\n //creditHours: one Int,\n //preReqs: set Course,\n //grade: one Int,\n \n}\n\nsig Attendance{\n course: one Course,\n attendance: one Int, //percentage \n canAppearInExam: one Boolean,\n}\n\nsig Student {\n rollNumber: one Int,\n courses: set Course,\n attendanceforCourses: set Attendance\n}\n\nfact StudentRules {\n // Rule 5\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n // Rule 6\n all a: Attendance | a.attendance >= 8 implies a.canAppearInExam = True\n all a: Attendance | a.attendance <= 7 implies a.canAppearInExam = False\n // If a student has attendance for a course, the course should be in their courses set\n all s: Student, a: Attendance | a in s.attendanceforCourses implies a.course in s.courses\n // Rule: A student cannot have two distinct attendance records for the same course\n all disj s: Student, a1, a2: Attendance | a1 in s.attendanceforCourses and a2 in s.attendanceforCourses \n and a1.course = a2.course implies a1 = a2\n}\n\n\n// fact AcademicYearRules {\n// // Rule 4 + 1 (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Rule 2 & 3 - (set months to set duration)\n// all s: Summer | s.startDate.month = 7 and s.endDate.month = 8 \n// all s: Spring | s.startDate.month = 2 and s.endDate.month = 6\n// // --> idk why everytime i added the lower constraint it wouldnt work\n// //all s: Fall | s.startDate.month = 9 or s.endDate.month = 1\n// // Rule 3\n// all s: Summer | s.startDate.year = s.endDate.year \n// all s: Spring | s.startDate.year = s.endDate.year\n// all s: Fall | s.startDate.year <= s.endDate.year\n// //all s: Fall | s.startDate.year = (s.endDate.year - 1) \n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// fact DateRules {\n// all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n// all disj d1, d2: Date | d1 != d2\n// }\n// //constraint to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n// and s1.endDate != s2.endDate\n// }\n\nrun {}", "permalink": "name-purify-print-causal", "time": "2024-11-18 19:07:08.353740", "cmd": 1} {"id": 24087, "parent": 24085, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n// sig Date {\n// day: one Int,\n// month: one Int,\n// year: one Int\n// }\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\nsig Course {\n name: one Int, //strings dont work, temporaily naming them integers\n //creditHours: one Int,\n //preReqs: set Course,\n //grade: one Int,\n \n}\n\nsig Attendance{\n course: one Course,\n attendance: one Int, //percentage \n canAppearInExam: one Boolean,\n}\n\nsig Student {\n rollNumber: one Int,\n courses: set Course,\n attendanceforCourses: set Attendance\n}\n\nfact StudentRules {\n // Rule 5\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n // Rule 6\n all a: Attendance | a.attendance >= 8 implies a.canAppearInExam = True\n //all a: Attendance | a.attendance <= 7 implies a.canAppearInExam = False\n // If a student has attendance for a course, the course should be in their courses set\n all s: Student, a: Attendance | a in s.attendanceforCourses implies a.course in s.courses\n // Rule: A student cannot have two distinct attendance records for the same course\n all disj s: Student, a1, a2: Attendance | a1 in s.attendanceforCourses and a2 in s.attendanceforCourses \n and a1.course = a2.course implies a1 = a2\n}\n\n\n// fact AcademicYearRules {\n// // Rule 4 + 1 (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Rule 2 & 3 - (set months to set duration)\n// all s: Summer | s.startDate.month = 7 and s.endDate.month = 8 \n// all s: Spring | s.startDate.month = 2 and s.endDate.month = 6\n// // --> idk why everytime i added the lower constraint it wouldnt work\n// //all s: Fall | s.startDate.month = 9 or s.endDate.month = 1\n// // Rule 3\n// all s: Summer | s.startDate.year = s.endDate.year \n// all s: Spring | s.startDate.year = s.endDate.year\n// all s: Fall | s.startDate.year <= s.endDate.year\n// //all s: Fall | s.startDate.year = (s.endDate.year - 1) \n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// fact DateRules {\n// all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n// all disj d1, d2: Date | d1 != d2\n// }\n// //constraint to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n// and s1.endDate != s2.endDate\n// }\n\nrun {}", "permalink": "twice-spray-fool-relish", "time": "2024-11-18 19:07:38.575903", "cmd": 1} {"id": 24092, "parent": 24088, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n// sig Date {\n// day: one Int,\n// month: one Int,\n// year: one Int\n// }\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\nsig Course {\n name: one Int, //strings dont work, temporaily naming them integers\n //creditHours: one Int,\n //preReqs: set Course,\n //grade: one Int,\n \n}\n\nsig Attendance{\n course: one Course,\n attendance: one Int, //percentage \n canAppearInExam: one Boolean,\n}\n\nsig Student {\n rollNumber: one Int,\n courses: set Course,\n attendanceforCourses: set Attendance\n}\n\nfact StudentRules {\n // Rule 5\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n // Rule 6\n all a: Attendance | a.attendance >= 80 implies a.canAppearInExam = True\n //all a: Attendance | a.attendance <= 7 implies a.canAppearInExam = False\n // If a student has attendance for a course, the course should be in their courses set\n all s: Student, a: Attendance | a in s.attendanceforCourses implies a.course in s.courses\n // Rule: A student cannot have two distinct attendance records for the same course\n all disj s: Student, a1, a2: Attendance | a1 in s.attendanceforCourses and a2 in s.attendanceforCourses and a1.course = a2.course implies a1 = a2\n}\n\n\n// fact AcademicYearRules {\n// // Rule 4 + 1 (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Rule 2 & 3 - (set months to set duration)\n// all s: Summer | s.startDate.month = 7 and s.endDate.month = 8 \n// all s: Spring | s.startDate.month = 2 and s.endDate.month = 6\n// // --> idk why everytime i added the lower constraint it wouldnt work\n// //all s: Fall | s.startDate.month = 9 or s.endDate.month = 1\n// // Rule 3\n// all s: Summer | s.startDate.year = s.endDate.year \n// all s: Spring | s.startDate.year = s.endDate.year\n// all s: Fall | s.startDate.year <= s.endDate.year\n// //all s: Fall | s.startDate.year = (s.endDate.year - 1) \n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// fact DateRules {\n// all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n// all disj d1, d2: Date | d1 != d2\n// }\n// //constraint to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n// and s1.endDate != s2.endDate\n// }\n\nrun {}", "permalink": "candle-slogan-catsup-parka", "time": "2024-11-18 19:12:22.275929", "cmd": 1} {"id": 24088, "parent": 24087, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n// sig Date {\n// day: one Int,\n// month: one Int,\n// year: one Int\n// }\n// abstract sig Semester {\n// startDate: one Date,\n// endDate: one Date,\n// //courses: set Course\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\nsig Course {\n name: one Int, //strings dont work, temporaily naming them integers\n //creditHours: one Int,\n //preReqs: set Course,\n //grade: one Int,\n \n}\n\nsig Attendance{\n course: one Course,\n attendance: one Int, //percentage \n canAppearInExam: one Boolean,\n}\n\nsig Student {\n rollNumber: one Int,\n courses: set Course,\n attendanceforCourses: set Attendance\n}\n\nfact StudentRules {\n // Rule 5\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n // Rule 6\n all a: Attendance | a.attendance >= 80 implies a.canAppearInExam = True\n //all a: Attendance | a.attendance <= 7 implies a.canAppearInExam = False\n // If a student has attendance for a course, the course should be in their courses set\n all s: Student, a: Attendance | a in s.attendanceforCourses implies a.course in s.courses\n // Rule: A student cannot have two distinct attendance records for the same course\n all disj s: Student, a1, a2: Attendance | a1 in s.attendanceforCourses and a2 in s.attendanceforCourses and a1.course = a2.course implies a1 = a2\n}\n\n\n// fact AcademicYearRules {\n// // Rule 4 + 1 (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Rule 2 & 3 - (set months to set duration)\n// all s: Summer | s.startDate.month = 7 and s.endDate.month = 8 \n// all s: Spring | s.startDate.month = 2 and s.endDate.month = 6\n// // --> idk why everytime i added the lower constraint it wouldnt work\n// //all s: Fall | s.startDate.month = 9 or s.endDate.month = 1\n// // Rule 3\n// all s: Summer | s.startDate.year = s.endDate.year \n// all s: Spring | s.startDate.year = s.endDate.year\n// all s: Fall | s.startDate.year <= s.endDate.year\n// //all s: Fall | s.startDate.year = (s.endDate.year - 1) \n// }\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// fact DateRules {\n// all d: Date | d.day >= 1 and d.month >= 1 and d.year >= 1\n// all disj d1, d2: Date | d1 != d2\n// }\n// //constraint to ensure no overlap between semesters' dates.\n// fact SemesterDateRules {\n// all s1, s2: Semester | s1 != s2 implies s1.startDate != s2.startDate\n// and s1.endDate != s2.endDate\n// }\n\nrun {}", "permalink": "lasso-wispy-grope-upheld", "time": "2024-11-18 19:08:58.784715", "cmd": 1} {"id": 24169, "parent": 24107, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int { ({b: Book | b.borrowedBooks}) }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 6 Book, 6 Person\ncheck NoDuplicateBorrowing", "permalink": "prone-stock-tree-fame", "time": "2024-11-18 22:04:59.478467", "cmd": 1} {"id": 24171, "parent": 24169, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int { ({b: Book | one b.borrowedBooks}) }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 6 Book, 6 Person\ncheck NoDuplicateBorrowing", "permalink": "quill-knelt-reggae-blob", "time": "2024-11-18 22:05:15.111959", "cmd": 1} {"id": 24180, "parent": null, "code": "// Basic signatures for the academic system\nabstract sig Semester {\n startDate: one Time,\n endDate: one Time,\n courses: set Course\n}\n\nsig Spring, Fall extends Semester {}\nsig Summer extends Semester {}\n\nsig Time {}\n\nsig AcademicYear {\n semesters: set Semester\n}\n\nsig Course {\n creditHours: one Int,\n prerequisites: set Course,\n language: one Language,\n attendance: one Int\n}\n\nabstract sig Language {}\none sig English, Urdu extends Language {}\n\nsig Student {\n rollNumber: one Int,\n registeredCourses: set Course,\n attendanceRecord: Course -> one Int,\n scholarshipStatus: lone Scholarship,\n academicWarning: lone Bool,\n freezeStatus: lone FreezeSemester,\n feesStatus: one FeesStatus\n}\n\nsig Scholarship {}\nsig FreezeSemester {\n count: one Int\n}\n\nabstract sig FeesStatus {}\nsig Paid, Unpaid extends FeesStatus {}\n\n// Facts to enforce the rules\n\n// Rule 1 & 2: Semester duration\nfact SemesterDuration {\n all s: Spring + Fall | s.endDate.sub[s.startDate] = 17\n all s: Summer | s.endDate.sub[s.startDate] = 8\n}\n\n// Rule 3: Semester end date must be after start date\nfact ValidSemesterDates {\n all s: Semester | s.endDate > s.startDate\n}\n\n// Rule 4: Semester count per academic year\nfact SemesterCount {\n all ay: AcademicYear | {\n #ay.semesters >= 2\n #ay.semesters <= 3\n }\n}\n\n// Rule 5 & 10: Unique roll numbers\nfact UniqueRollNumbers {\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber\n}\n\n// Rule 6: Attendance requirement\nfact AttendanceRequirement {\n all s: Student, c: Course | {\n s.attendanceRecord[c] >= 80\n s.attendanceRecord[c] <= 100\n }\n}\n\n// Rule 8 & 18: Course load\nfact CourseLoad {\n all s: Student | {\n #s.registeredCourses >= 5\n sum c: s.registeredCourses | c.creditHours >= 15\n sum c: s.registeredCourses | c.creditHours <= 18\n }\n}\n\n// Rule 14: Freeze semester limit\nfact FreezeSemesterLimit {\n all s: Student | {\n s.freezeStatus.count <= 2\n }\n}\n\n// Rule 16: No concurrent degrees\nfact NoConcurrentDegrees {\n // This is implicitly handled by the model structure\n}\n\n// Rule 19: Summer semester rules\nfact SummerSemesterRules {\n all s: Summer | {\n #Course.prerequisites >= 10 // Minimum 10 students\n no c: s.courses | c not in Student.registeredCourses // Only previously registered courses\n #Student.registeredCourses <= 2 // Max two courses\n }\n}\n\n// Rule 20: Credit exemption\nfact CreditExemption {\n all c: Course | {\n c in Student.registeredCourses implies {\n all p: c.prerequisites | p in Student.registeredCourses\n }\n }\n}\n\n// Assertions to check the model\n\nassert NoInvalidSemesters {\n no s: Semester | s.endDate <= s.startDate\n}\n\nassert ValidCourseLoad {\n all s: Student | #s.registeredCourses >= 5\n}\n\nassert ValidFreezeSemesters {\n all s: Student | s.freezeStatus.count <= 2\n}\n\n// Run the model\npred show {}\nrun show for 5", "permalink": "native-postal-swoop-vowed", "time": "2024-11-19 05:20:55.947650", "cmd": 1} {"id": 24181, "parent": 24180, "code": "// Basic signatures for the academic system\nabstract sig Semester {\n startDate: one Time,\n endDate: one Time,\n courses: set Course\n}\n\nsig Spring, Fall extends Semester {}\nsig Summer extends Semester {}\n\nsig Time {}\n\nsig AcademicYear {\n semesters: set Semester\n}\n\nsig Course {\n creditHours: one Int,\n prerequisites: set Course,\n language: one Language,\n attendance: one Int\n}\n\nabstract sig Language {}\none sig English, Urdu extends Language {}\n\n// Define our own boolean type\nabstract sig Boolean {}\none sig True, False extends Boolean {}\n\nsig Student {\n rollNumber: one Int,\n registeredCourses: set Course,\n attendanceRecord: Course -> one Int,\n scholarshipStatus: lone Scholarship,\n academicWarning: lone Boolean,\n freezeStatus: lone FreezeSemester,\n feesStatus: one FeesStatus\n}\n\nsig Scholarship {}\nsig FreezeSemester {\n count: one Int\n}\n\nabstract sig FeesStatus {}\nsig Paid, Unpaid extends FeesStatus {}\n\n// Facts to enforce the rules\n\n// Rule 1 & 2: Semester duration\nfact SemesterDuration {\n all s: Spring + Fall | s.endDate.sub[s.startDate] = 17\n all s: Summer | s.endDate.sub[s.startDate] = 8\n}\n\n// Rule 3: Semester end date must be after start date\nfact ValidSemesterDates {\n all s: Semester | s.endDate > s.startDate\n}\n\n// Rule 4: Semester count per academic year\nfact SemesterCount {\n all ay: AcademicYear | {\n #ay.semesters >= 2\n #ay.semesters <= 3\n }\n}\n\n// Rule 5 & 10: Unique roll numbers\nfact UniqueRollNumbers {\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber\n}\n\n// Rule 6: Attendance requirement\nfact AttendanceRequirement {\n all s: Student, c: Course | {\n s.attendanceRecord[c] >= 80\n s.attendanceRecord[c] <= 100\n }\n}\n\n// Rule 8 & 18: Course load\nfact CourseLoad {\n all s: Student | {\n #s.registeredCourses >= 5\n sum c: s.registeredCourses | c.creditHours >= 15\n sum c: s.registeredCourses | c.creditHours <= 18\n }\n}\n\n// Rule 14: Freeze semester limit\nfact FreezeSemesterLimit {\n all s: Student | {\n s.freezeStatus.count <= 2\n }\n}\n\n// Rule 16: No concurrent degrees\nfact NoConcurrentDegrees {\n // This is implicitly handled by the model structure\n}\n\n// Rule 19: Summer semester rules\nfact SummerSemesterRules {\n all s: Summer | {\n #Course.prerequisites >= 10 // Minimum 10 students\n no c: s.courses | c not in Student.registeredCourses // Only previously registered courses\n #Student.registeredCourses <= 2 // Max two courses\n }\n}\n\n// Rule 20: Credit exemption\nfact CreditExemption {\n all c: Course | {\n c in Student.registeredCourses implies {\n all p: c.prerequisites | p in Student.registeredCourses\n }\n }\n}\n\n// Rule 11: Financial Aid cancellation on Academic Warning\nfact FinancialAidCancellation {\n all s: Student | {\n s.academicWarning = True implies no s.scholarshipStatus\n }\n}\n\n// Assertions to check the model\n\nassert NoInvalidSemesters {\n no s: Semester | s.endDate <= s.startDate\n}\n\nassert ValidCourseLoad {\n all s: Student | #s.registeredCourses >= 5\n}\n\nassert ValidFreezeSemesters {\n all s: Student | s.freezeStatus.count <= 2\n}\n\n// Run the model\npred show {}\nrun show for 5", "permalink": "ebay-wobbly-liquid-recast", "time": "2024-11-19 05:21:43.016852", "cmd": 1} {"id": 24182, "parent": 24181, "code": "// Basic signatures for the academic system\nabstract sig Semester {\n startWeek: one Int,\n endWeek: one Int,\n courses: set Course\n}\n\nsig Spring, Fall extends Semester {}\nsig Summer extends Semester {}\n\nsig AcademicYear {\n semesters: set Semester\n}\n\nsig Course {\n creditHours: one Int,\n prerequisites: set Course,\n language: one Language,\n attendance: one Int\n}\n\nabstract sig Language {}\none sig English, Urdu extends Language {}\n\n// Define our own boolean type\nabstract sig Boolean {}\none sig True, False extends Boolean {}\n\nsig Student {\n rollNumber: one Int,\n registeredCourses: set Course,\n attendanceRecord: Course -> one Int,\n scholarshipStatus: lone Scholarship,\n academicWarning: lone Boolean,\n freezeStatus: lone FreezeSemester,\n feesStatus: one FeesStatus\n}\n\nsig Scholarship {}\nsig FreezeSemester {\n count: one Int\n}\n\nabstract sig FeesStatus {}\nsig Paid, Unpaid extends FeesStatus {}\n\n// Facts to enforce the rules\n\n// Rule 1 & 2: Semester duration\nfact SemesterDuration {\n all s: Spring + Fall | s.endWeek.sub[s.startWeek] = 17\n all s: Summer | s.endWeek.sub[s.startWeek] = 8\n}\n\n// Rule 3: Semester end week must be after start week\nfact ValidSemesterDates {\n all s: Semester | s.endWeek > s.startWeek\n}\n\n// Rule 4: Semester count per academic year\nfact SemesterCount {\n all ay: AcademicYear | {\n #ay.semesters >= 2\n #ay.semesters <= 3\n }\n}\n\n// Rule 5 & 10: Unique roll numbers\nfact UniqueRollNumbers {\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber\n}\n\n// Rule 6: Attendance requirement\nfact AttendanceRequirement {\n all s: Student, c: Course | {\n s.attendanceRecord[c] >= 80\n s.attendanceRecord[c] <= 100\n }\n}\n\n// Rule 8 & 18: Course load\nfact CourseLoad {\n all s: Student | {\n #s.registeredCourses >= 5\n sum c: s.registeredCourses | c.creditHours >= 15\n sum c: s.registeredCourses | c.creditHours <= 18\n }\n}\n\n// Rule 14: Freeze semester limit\nfact FreezeSemesterLimit {\n all s: Student | {\n s.freezeStatus.count <= 2\n }\n}\n\n// Rule 16: No concurrent degrees\nfact NoConcurrentDegrees {\n // This is implicitly handled by the model structure\n}\n\n// Rule 19: Summer semester rules\nfact SummerSemesterRules {\n all s: Summer | {\n #Course.prerequisites >= 10 // Minimum 10 students\n no c: s.courses | c not in Student.registeredCourses // Only previously registered courses\n #Student.registeredCourses <= 2 // Max two courses\n }\n}\n\n// Rule 20: Credit exemption\nfact CreditExemption {\n all c: Course | {\n c in Student.registeredCourses implies {\n all p: c.prerequisites | p in Student.registeredCourses\n }\n }\n}\n\n// Rule 11: Financial Aid cancellation on Academic Warning\nfact FinancialAidCancellation {\n all s: Student | {\n s.academicWarning = True implies no s.scholarshipStatus\n }\n}\n\n// Additional constraints for valid weeks\nfact ValidWeeks {\n all s: Semester | {\n s.startWeek >= 1\n s.startWeek <= 52\n s.endWeek >= 1\n s.endWeek <= 52\n }\n}\n\n// Assertions to check the model\n\nassert NoInvalidSemesters {\n no s: Semester | s.endWeek <= s.startWeek\n}\n\nassert ValidCourseLoad {\n all s: Student | #s.registeredCourses >= 5\n}\n\nassert ValidFreezeSemesters {\n all s: Student | s.freezeStatus.count <= 2\n}\n\n// Run the model\npred show {}\nrun show for 5 but exactly 1 AcademicYear", "permalink": "gag-yogurt-ramble-pound", "time": "2024-11-19 05:22:31.461932", "cmd": 1} {"id": 24185, "parent": 24184, "code": "// Basic signatures for the academic system\nabstract sig Semester {\n startWeek: one Int,\n endWeek: one Int,\n courses: set Course\n}\n\nsig Spring, Fall extends Semester {}\nsig Summer extends Semester {}\n\nsig AcademicYear {\n semesters: set Semester\n}\n\nsig Course {\n creditHours: one Int,\n prerequisites: set Course,\n language: one Language,\n attendance: one Int\n}\n\nabstract sig Language {}\none sig English, Urdu extends Language {}\n\nsig Student {\n rollNumber: one Int,\n registeredCourses: set Course,\n attendanceRecord: Course -> one Int,\n scholarshipStatus: lone Scholarship,\n hasAcademicWarning: one Bool,\n freezeStatus: lone FreezeSemester,\n feesStatus: one FeesStatus\n}\n\n// Using enum for boolean values\nenum Bool { True, False }\n\nsig Scholarship {}\nsig FreezeSemester {\n count: one Int\n}\n\nabstract sig FeesStatus {}\nsig Paid, Unpaid extends FeesStatus {}\n\n// Facts to enforce the rules\n\n// Rule 1 & 2: Semester duration\nfact SemesterDuration {\n all s: Spring + Fall | s.endWeek.sub[s.startWeek] = 17\n all s: Summer | s.endWeek.sub[s.startWeek] = 8\n}\n\n// Rule 3: Semester end week must be after start week\nfact ValidSemesterDates {\n all s: Semester | s.endWeek > s.startWeek\n}\n\n// Rule 4: Semester count per academic year\nfact SemesterCount {\n all ay: AcademicYear | {\n #ay.semesters >= 2\n #ay.semesters <= 3\n }\n}\n\n// Rule 5 & 10: Unique roll numbers\nfact UniqueRollNumbers {\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber\n}\n\n// Rule 6: Attendance requirement\nfact AttendanceRequirement {\n all s: Student, c: Course | {\n s.attendanceRecord[c] >= 80\n s.attendanceRecord[c] <= 100\n }\n}\n\n// Rule 8 & 18: Course load\nfact CourseLoad {\n all s: Student | {\n #s.registeredCourses >= 5\n sum c: s.registeredCourses | c.creditHours >= 15\n sum c: s.registeredCourses | c.creditHours <= 18\n }\n}\n\n// Rule 14: Freeze semester limit\nfact FreezeSemesterLimit {\n all s: Student | {\n s.freezeStatus.count <= 2\n }\n}\n\n// Rule 16: No concurrent degrees\nfact NoConcurrentDegrees {\n // This is implicitly handled by the model structure\n}\n\n// Rule 19: Summer semester rules\nfact SummerSemesterRules {\n all s: Summer | {\n #Course.prerequisites >= 10 // Minimum 10 students\n no c: s.courses | c not in Student.registeredCourses // Only previously registered courses\n #Student.registeredCourses <= 2 // Max two courses\n }\n}\n\n// Rule 20: Credit exemption\nfact CreditExemption {\n all c: Course | {\n c in Student.registeredCourses implies {\n all p: c.prerequisites | p in Student.registeredCourses\n }\n }\n}\n\n// Rule 11: Financial Aid cancellation on Academic Warning\nfact FinancialAidCancellation {\n all s: Student | {\n s.hasAcademicWarning = True implies no s.scholarshipStatus\n }\n}\n\n// Additional constraints for valid weeks\nfact ValidWeeks {\n all s: Semester | {\n s.startWeek >= 1\n s.startWeek <= 52\n s.endWeek >= 1\n s.endWeek <= 52\n }\n}\n\n// Assertions to check the model\n\nassert NoInvalidSemesters {\n no s: Semester | s.endWeek <= s.startWeek\n}\n\nassert ValidCourseLoad {\n all s: Student | #s.registeredCourses >= 5\n}\n\nassert ValidFreezeSemesters {\n all s: Student | s.freezeStatus.count <= 2\n}\n\n// Run the model\npred show {}\nrun show for 5 but exactly 1 AcademicYear", "permalink": "study-duct-badass-spray", "time": "2024-11-19 05:24:01.034690", "cmd": 1} {"id": 24183, "parent": 24182, "code": "// Basic signatures for the academic system\nabstract sig Semester {\n startWeek: one Int,\n endWeek: one Int,\n courses: set Course\n}\n\nsig Spring, Fall extends Semester {}\nsig Summer extends Semester {}\n\nsig AcademicYear {\n semesters: set Semester\n}\n\nsig Course {\n creditHours: one Int,\n prerequisites: set Course,\n language: one Language,\n attendance: one Int\n}\n\nabstract sig Language {}\none sig English, Urdu extends Language {}\n\nsig Student {\n rollNumber: one Int,\n registeredCourses: set Course,\n attendanceRecord: Course -> one Int,\n scholarshipStatus: lone Scholarship,\n hasAcademicWarning: one Bool,\n freezeStatus: lone FreezeSemester,\n feesStatus: one FeesStatus\n}\n\n// Using enum for boolean values\nenum Bool { True, False }\n\nsig Scholarship {}\nsig FreezeSemester {\n count: one Int\n}\n\nabstract sig FeesStatus {}\nsig Paid, Unpaid extends FeesStatus {}\n\n// Facts to enforce the rules\n\n// Rule 1 & 2: Semester duration\nfact SemesterDuration {\n all s: Spring + Fall | s.endWeek.sub[s.startWeek] = 17\n all s: Summer | s.endWeek.sub[s.startWeek] = 8\n}\n\n// Rule 3: Semester end week must be after start week\nfact ValidSemesterDates {\n all s: Semester | s.endWeek > s.startWeek\n}\n\n// Rule 4: Semester count per academic year\nfact SemesterCount {\n all ay: AcademicYear | {\n #ay.semesters >= 2\n #ay.semesters <= 3\n }\n}\n\n// Rule 5 & 10: Unique roll numbers\nfact UniqueRollNumbers {\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber\n}\n\n// Rule 6: Attendance requirement\nfact AttendanceRequirement {\n all s: Student, c: Course | {\n s.attendanceRecord[c] >= 80\n s.attendanceRecord[c] <= 100\n }\n}\n\n// Rule 8 & 18: Course load\nfact CourseLoad {\n all s: Student | {\n #s.registeredCourses >= 5\n sum c: s.registeredCourses | c.creditHours >= 15\n sum c: s.registeredCourses | c.creditHours <= 18\n }\n}\n\n// Rule 14: Freeze semester limit\nfact FreezeSemesterLimit {\n all s: Student | {\n s.freezeStatus.count <= 2\n }\n}\n\n// Rule 16: No concurrent degrees\nfact NoConcurrentDegrees {\n // This is implicitly handled by the model structure\n}\n\n// Rule 19: Summer semester rules\nfact SummerSemesterRules {\n all s: Summer | {\n #Course.prerequisites >= 10 // Minimum 10 students\n no c: s.courses | c not in Student.registeredCourses // Only previously registered courses\n #Student.registeredCourses <= 2 // Max two courses\n }\n}\n\n// Rule 20: Credit exemption\nfact CreditExemption {\n all c: Course | {\n c in Student.registeredCourses implies {\n all p: c.prerequisites | p in Student.registeredCourses\n }\n }\n}\n\n// Rule 11: Financial Aid cancellation on Academic Warning\nfact FinancialAidCancellation {\n all s: Student | {\n s.hasAcademicWarning = True implies no s.scholarshipStatus\n }\n}\n\n// Additional constraints for valid weeks\nfact ValidWeeks {\n all s: Semester | {\n s.startWeek >= 1\n s.startWeek <= 52\n s.endWeek >= 1\n s.endWeek <= 52\n }\n}\n\n// Assertions to check the model\n\nassert NoInvalidSemesters {\n no s: Semester | s.endWeek <= s.startWeek\n}\n\nassert ValidCourseLoad {\n all s: Student | #s.registeredCourses >= 5\n}\n\nassert ValidFreezeSemesters {\n all s: Student | s.freezeStatus.count <= 2\n}\n\n// Run the model\npred show {}\nrun show for 5 but exactly 1 AcademicYear", "permalink": "unsaid-perish-strobe-buggy", "time": "2024-11-19 05:23:16.111203", "cmd": 1} {"id": 24184, "parent": 24183, "code": "// Basic signatures for the academic system\nabstract sig Semester {\n startWeek: one Int,\n endWeek: one Int,\n courses: set Course\n}\n\nsig Spring, Fall extends Semester {}\nsig Summer extends Semester {}\n\nsig AcademicYear {\n semesters: set Semester\n}\n\nsig Course {\n creditHours: one Int,\n prerequisites: set Course,\n language: one Language,\n attendance: one Int\n}\n\nabstract sig Language {}\none sig English, Urdu extends Language {}\n\nsig Student {\n rollNumber: one Int,\n registeredCourses: set Course,\n attendanceRecord: Course -> one Int,\n scholarshipStatus: lone Scholarship,\n hasAcademicWarning: one Int, // Changed to Int: 0 for false, 1 for true\n freezeStatus: lone FreezeSemester,\n feesStatus: one FeesStatus\n}\n\nsig Scholarship {}\nsig FreezeSemester {\n count: one Int\n}\n\nabstract sig FeesStatus {}\nsig Paid, Unpaid extends FeesStatus {}\n\n// Facts to enforce the rules\n\n// Rule 1 & 2: Semester duration\nfact SemesterDuration {\n all s: Spring + Fall | s.endWeek.sub[s.startWeek] = 17\n all s: Summer | s.endWeek.sub[s.startWeek] = 8\n}\n\n// Rule 3: Semester end week must be after start week\nfact ValidSemesterDates {\n all s: Semester | s.endWeek > s.startWeek\n}\n\n// Rule 4: Semester count per academic year\nfact SemesterCount {\n all ay: AcademicYear | {\n #ay.semesters >= 2\n #ay.semesters <= 3\n }\n}\n\n// Rule 5 & 10: Unique roll numbers\nfact UniqueRollNumbers {\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber\n}\n\n// Rule 6: Attendance requirement\nfact AttendanceRequirement {\n all s: Student, c: Course | {\n s.attendanceRecord[c] >= 80\n s.attendanceRecord[c] <= 100\n }\n}\n\n// Rule 8 & 18: Course load\nfact CourseLoad {\n all s: Student | {\n #s.registeredCourses >= 5\n sum c: s.registeredCourses | c.creditHours >= 15\n sum c: s.registeredCourses | c.creditHours <= 18\n }\n}\n\n// Rule 14: Freeze semester limit\nfact FreezeSemesterLimit {\n all s: Student | {\n s.freezeStatus.count <= 2\n }\n}\n\n// Rule 16: No concurrent degrees\nfact NoConcurrentDegrees {\n // This is implicitly handled by the model structure\n}\n\n// Rule 19: Summer semester rules\nfact SummerSemesterRules {\n all s: Summer | {\n #Course.prerequisites >= 10 // Minimum 10 students\n no c: s.courses | c not in Student.registeredCourses // Only previously registered courses\n #Student.registeredCourses <= 2 // Max two courses\n }\n}\n\n// Rule 20: Credit exemption\nfact CreditExemption {\n all c: Course | {\n c in Student.registeredCourses implies {\n all p: c.prerequisites | p in Student.registeredCourses\n }\n }\n}\n\n// Ensure academic warning is binary (0 or 1)\nfact ValidAcademicWarning {\n all s: Student | {\n s.hasAcademicWarning >= 0\n s.hasAcademicWarning <= 1\n }\n}\n\n// Rule 11: Financial Aid cancellation on Academic Warning\nfact FinancialAidCancellation {\n all s: Student | {\n s.hasAcademicWarning = 1 implies no s.scholarshipStatus\n }\n}\n\n// Additional constraints for valid weeks\nfact ValidWeeks {\n all s: Semester | {\n s.startWeek >= 1\n s.startWeek <= 52\n s.endWeek >= 1\n s.endWeek <= 52\n }\n}\n\n// Assertions to check the model\n\nassert NoInvalidSemesters {\n no s: Semester | s.endWeek <= s.startWeek\n}\n\nassert ValidCourseLoad {\n all s: Student | #s.registeredCourses >= 5\n}\n\nassert ValidFreezeSemesters {\n all s: Student | s.freezeStatus.count <= 2\n}\n\n// Run the model\npred show {}\nrun show for 5 but exactly 1 AcademicYear", "permalink": "poem-retake-update-entail", "time": "2024-11-19 05:23:54.819905", "cmd": 1} {"id": 24186, "parent": 24185, "code": "// Basic signatures for the academic system\nabstract sig Semester {\n startWeek: one Int,\n endWeek: one Int,\n courses: set Course\n}\n\nsig Spring, Fall extends Semester {}\nsig Summer extends Semester {}\n\nsig AcademicYear {\n semesters: set Semester\n}\n\nsig Course {\n creditHours: one Int,\n prerequisites: set Course,\n language: one Language,\n attendance: one Int\n}\n\nabstract sig Language {}\none sig English, Urdu extends Language {}\n\nsig Student {\n rollNumber: one Int,\n registeredCourses: set Course,\n attendanceRecord: Course -> one Int,\n scholarshipStatus: lone Scholarship,\n hasAcademicWarning: one Int, // Changed to Int: 0 for false, 1 for true\n freezeStatus: lone FreezeSemester,\n feesStatus: one FeesStatus\n}\n\nsig Scholarship {}\nsig FreezeSemester {\n count: one Int\n}\n\nabstract sig FeesStatus {}\nsig Paid, Unpaid extends FeesStatus {}\n\n// Facts to enforce the rules\n\n// Rule 1 & 2: Semester duration\nfact SemesterDuration {\n all s: Spring + Fall | s.endWeek.sub[s.startWeek] = 17\n all s: Summer | s.endWeek.sub[s.startWeek] = 8\n}\n\n// Rule 3: Semester end week must be after start week\nfact ValidSemesterDates {\n all s: Semester | s.endWeek > s.startWeek\n}\n\n// Rule 4: Semester count per academic year\nfact SemesterCount {\n all ay: AcademicYear | {\n #ay.semesters >= 2\n #ay.semesters <= 3\n }\n}\n\n// Rule 5 & 10: Unique roll numbers\nfact UniqueRollNumbers {\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber\n}\n\n// Rule 6: Attendance requirement\nfact AttendanceRequirement {\n all s: Student, c: Course | {\n s.attendanceRecord[c] >= 80\n s.attendanceRecord[c] <= 100\n }\n}\n\n// Rule 8 & 18: Course load\nfact CourseLoad {\n all s: Student | {\n #s.registeredCourses >= 5\n sum c: s.registeredCourses | c.creditHours >= 15\n sum c: s.registeredCourses | c.creditHours <= 18\n }\n}\n\n// Rule 14: Freeze semester limit\nfact FreezeSemesterLimit {\n all s: Student | {\n s.freezeStatus.count <= 2\n }\n}\n\n// Rule 16: No concurrent degrees\nfact NoConcurrentDegrees {\n // This is implicitly handled by the model structure\n}\n\n// Rule 19: Summer semester rules\nfact SummerSemesterRules {\n all s: Summer | {\n #Course.prerequisites >= 10 // Minimum 10 students\n no c: s.courses | c not in Student.registeredCourses // Only previously registered courses\n #Student.registeredCourses <= 2 // Max two courses\n }\n}\n\n// Rule 20: Credit exemption\nfact CreditExemption {\n all c: Course | {\n c in Student.registeredCourses implies {\n all p: c.prerequisites | p in Student.registeredCourses\n }\n }\n}\n\n// Ensure academic warning is binary (0 or 1)\nfact ValidAcademicWarning {\n all s: Student | {\n s.hasAcademicWarning >= 0\n s.hasAcademicWarning <= 1\n }\n}\n\n// Rule 11: Financial Aid cancellation on Academic Warning\nfact FinancialAidCancellation {\n all s: Student | {\n s.hasAcademicWarning = 1 implies no s.scholarshipStatus\n }\n}\n\n// Additional constraints for valid weeks\nfact ValidWeeks {\n all s: Semester | {\n s.startWeek >= 1\n s.startWeek <= 52\n s.endWeek >= 1\n s.endWeek <= 52\n }\n}\n\n// Assertions to check the model\n\nassert NoInvalidSemesters {\n no s: Semester | s.endWeek <= s.startWeek\n}\n\nassert ValidCourseLoad {\n all s: Student | #s.registeredCourses >= 5\n}\n\nassert ValidFreezeSemesters {\n all s: Student | s.freezeStatus.count <= 2\n}\n\n// Run the model\npred show {}\nrun show for 5 but exactly 1 AcademicYear", "permalink": "proofs-grew-caviar-fax", "time": "2024-11-19 05:24:04.516251", "cmd": 1} {"id": 24188, "parent": 24187, "code": "// Basic signatures for the academic system\nabstract sig Semester {\n startWeek: one Int,\n endWeek: one Int,\n courses: set Course\n}\n\nsig Spring, Fall extends Semester {}\nsig Summer extends Semester {}\n\nsig AcademicYear {\n semesters: set Semester,\n year: one Int\n}\n\nsig Course {\n creditHours: one Int,\n prerequisites: set Course,\n language: one Language,\n attendance: one Int\n}\n\nabstract sig Language {}\none sig English, Urdu extends Language {}\n\nsig Student {\n rollNumber: one Int,\n registeredCourses: set Course,\n attendanceRecord: Course -> one Int,\n scholarshipStatus: lone Scholarship,\n hasAcademicWarning: one Int, // 0 for false, 1 for true\n freezeStatus: lone FreezeSemester,\n feesStatus: one FeesStatus\n}\n\nsig Scholarship {}\nsig FreezeSemester {\n count: one Int\n}\n\nabstract sig FeesStatus {}\nsig Paid, Unpaid extends FeesStatus {}\n\n// Facts to enforce the rules\n\n// Rule 1 & 2: Semester duration\nfact SemesterDuration {\n all s: Spring + Fall | s.endWeek.sub[s.startWeek] = 17\n all s: Summer | s.endWeek.sub[s.startWeek] = 8\n}\n\n// Rule 3: Semester end week must be after start week\nfact ValidSemesterDates {\n all s: Semester | s.endWeek > s.startWeek\n}\n\n// Rule 4: Semester count per academic year\nfact SemesterCount {\n all ay: AcademicYear | {\n #ay.semesters >= 2\n #ay.semesters <= 3\n }\n}\n\n// Rule 5 & 10: Unique roll numbers\nfact UniqueRollNumbers {\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber\n}\n\n// Rule 6: Attendance requirement\nfact AttendanceRequirement {\n all s: Student, c: Course | {\n s.attendanceRecord[c] >= 80\n s.attendanceRecord[c] <= 100\n }\n}\n\n// Rule 8 & 18: Course load\nfact CourseLoad {\n all s: Student | {\n #s.registeredCourses >= 5\n sum c: s.registeredCourses | c.creditHours >= 15\n sum c: s.registeredCourses | c.creditHours <= 18\n }\n}\n\n// Rule 14: Freeze semester limit\nfact FreezeSemesterLimit {\n all s: Student | {\n s.freezeStatus.count <= 2\n }\n}\n\n// Rule 19: Summer semester rules\nfact SummerSemesterRules {\n all s: Summer | {\n #Course.prerequisites >= 10 // Minimum 10 students\n no c: s.courses | c not in Student.registeredCourses // Only previously registered courses\n #Student.registeredCourses <= 2 // Max two courses\n }\n}\n\n// Rule 20: Credit exemption\nfact CreditExemption {\n all c: Course | {\n c in Student.registeredCourses implies {\n all p: c.prerequisites | p in Student.registeredCourses\n }\n }\n}\n\n// Ensure academic warning is binary\nfact ValidAcademicWarning {\n all s: Student | {\n s.hasAcademicWarning >= 0\n s.hasAcademicWarning <= 1\n }\n}\n\n// Rule 11: Financial Aid cancellation on Academic Warning\nfact FinancialAidCancellation {\n all s: Student | \n (s.hasAcademicWarning = 1) => (no s.scholarshipStatus)\n}\n\n// Additional constraints for valid weeks\nfact ValidWeeks {\n all s: Semester | {\n s.startWeek >= 1\n s.startWeek <= 52\n s.endWeek >= 1\n s.endWeek <= 52\n }\n}\n\n// Assertions to check the model\n\nassert NoInvalidSemesters {\n no s: Semester | s.endWeek <= s.startWeek\n}\n\nassert ValidCourseLoad {\n all s: Student | #s.registeredCourses >= 5\n}\n\nassert ValidFreezeSemesters {\n all s: Student | s.freezeStatus.count <= 2\n}\n\n// Run the model\npred show {\n // Ensure we have at least one instance of each important signature\n some Student\n some Course\n some AcademicYear\n some Scholarship\n}\n\nrun show for 5 but exactly 1 AcademicYear", "permalink": "askew-lark-omit-riot", "time": "2024-11-19 05:24:59.167667", "cmd": 1} {"id": 24190, "parent": 24189, "code": "// Basic signatures for the academic system\nabstract sig Semester {\n startWeek: one Int,\n endWeek: one Int,\n courses: set Course\n}\n\nsig Spring, Fall extends Semester {}\nsig Summer extends Semester {}\n\nsig AcademicYear {\n semesters: set Semester,\n year: one Int\n}\n\nsig Course {\n creditHours: one Int,\n prerequisites: set Course,\n language: one Language,\n attendance: one Int\n}\n\nabstract sig Language {}\none sig English, Urdu extends Language {}\n\nsig Student {\n rollNumber: one Int,\n registeredCourses: set Course,\n attendanceRecord: Course -> one Int,\n scholarshipStatus: lone Scholarship,\n hasAcademicWarning: one Int, // 0 for false, 1 for true\n freezeStatus: lone FreezeSemester,\n feesStatus: one FeesStatus\n}\n\nsig Scholarship {}\nsig FreezeSemester {\n count: one Int\n}\n\nabstract sig FeesStatus {}\nsig Paid, Unpaid extends FeesStatus {}\n\n// Facts to enforce the rules\n\n// Rule 1 & 2: Semester duration\nfact SemesterDuration {\n all s: Spring + Fall | s.endWeek.sub[s.startWeek] = 17\n all s: Summer | s.endWeek.sub[s.startWeek] = 8\n}\n\n// Rule 3: Semester end week must be after start week\nfact ValidSemesterDates {\n all s: Semester | s.endWeek > s.startWeek\n}\n\n// Rule 4: Semester count per academic year\nfact SemesterCount {\n all ay: AcademicYear | {\n #ay.semesters >= 2\n #ay.semesters <= 3\n }\n}\n\n// Rule 5 & 10: Unique roll numbers\nfact UniqueRollNumbers {\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber\n}\n\n// Rule 6: Attendance requirement\nfact AttendanceRequirement {\n all s: Student, c: Course | {\n s.attendanceRecord[c] >= 80\n s.attendanceRecord[c] <= 100\n }\n}\n\n// Rule 8 & 18: Course load\nfact CourseLoad {\n all s: Student | {\n #s.registeredCourses >= 5\n sum c: s.registeredCourses | c.creditHours >= 15\n sum c: s.registeredCourses | c.creditHours <= 18\n }\n}\n\n// Rule 14: Freeze semester limit\nfact FreezeSemesterLimit {\n all s: Student | {\n s.freezeStatus.count <= 2\n }\n}\n\n// Rule 19: Summer semester rules\nfact SummerSemesterRules {\n all s: Summer | {\n #Course.prerequisites >= 10 // Minimum 10 students\n no c: s.courses | c not in Student.registeredCourses // Only previously registered courses\n #Student.registeredCourses <= 2 // Max two courses\n }\n}\n\n// Rule 20: Credit exemption\nfact CreditExemption {\n all c: Course | {\n c in Student.registeredCourses implies {\n all p: c.prerequisites | p in Student.registeredCourses\n }\n }\n}\n\n// Ensure academic warning is binary\nfact ValidAcademicWarning {\n all s: Student | {\n s.hasAcademicWarning >= 0\n s.hasAcademicWarning <= 1\n }\n}\n\n// Rule 11: Financial Aid cancellation on Academic Warning\nfact FinancialAidCancellation {\n all s: Student | \n (s.hasAcademicWarning = 1) => (no s.scholarshipStatus)\n}\n\n// Additional constraints for valid weeks\nfact ValidWeeks {\n all s: Semester | {\n s.startWeek >= 1\n s.startWeek <= 52\n s.endWeek >= 1\n s.endWeek <= 52\n }\n}\n\n// Assertions to check the model\n\nassert NoInvalidSemesters {\n no s: Semester | s.endWeek <= s.startWeek\n}\n\nassert ValidCourseLoad {\n all s: Student | #s.registeredCourses >= 5\n}\n\nassert ValidFreezeSemesters {\n all s: Student | s.freezeStatus.count <= 2\n}\n\n// Run the model\npred show {\n // Ensure we have at least one instance of each important signature\n some Student\n some Course\n some AcademicYear\n some Scholarship\n}\n\nrun show for 5 but exactly 1 AcademicYear", "permalink": "smoked-oops-tag-woozy", "time": "2024-11-19 05:25:23.189520", "cmd": 1} {"id": 24189, "parent": 24188, "code": "// Basic signatures for the academic system\nabstract sig Semester {\n startWeek: one Int,\n endWeek: one Int,\n courses: set Course\n}\n\nsig Spring, Fall extends Semester {}\nsig Summer extends Semester {}\n\nsig AcademicYear {\n semesters: set Semester,\n year: one Int\n}\n\nsig Course {\n creditHours: one Int,\n prerequisites: set Course,\n language: one Language,\n attendance: one Int\n}\n\nabstract sig Language {}\none sig English, Urdu extends Language {}\n\nsig Student {\n rollNumber: one Int,\n registeredCourses: set Course,\n attendanceRecord: Course -> one Int,\n scholarshipStatus: lone Scholarship,\n hasAcademicWarning: one Int, // 0 for false, 1 for true\n freezeStatus: lone FreezeSemester,\n feesStatus: one FeesStatus\n}\n\nsig Scholarship {}\nsig FreezeSemester {\n count: one Int\n}\n\nabstract sig FeesStatus {}\nsig Paid, Unpaid extends FeesStatus {}\n\n// Facts to enforce the rules\n\n// Rule 1 & 2: Semester duration\nfact SemesterDuration {\n all s: Spring + Fall | s.endWeek.sub[s.startWeek] = 17\n all s: Summer | s.endWeek.sub[s.startWeek] = 8\n}\n\n// Rule 3: Semester end week must be after start week\nfact ValidSemesterDates {\n all s: Semester | s.endWeek > s.startWeek\n}\n\n// Rule 4: Semester count per academic year\nfact SemesterCount {\n all ay: AcademicYear | {\n #ay.semesters >= 2\n #ay.semesters <= 3\n }\n}\n\n// Rule 5 & 10: Unique roll numbers\nfact UniqueRollNumbers {\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber\n}\n\n// Rule 6: Attendance requirement\nfact AttendanceRequirement {\n all s: Student, c: Course | {\n s.attendanceRecord[c] >= 80\n s.attendanceRecord[c] <= 100\n }\n}\n\n// Rule 8 & 18: Course load\nfact CourseLoad {\n all s: Student | {\n #s.registeredCourses >= 5\n sum c: s.registeredCourses | c.creditHours >= 15\n sum c: s.registeredCourses | c.creditHours <= 18\n }\n}\n\n// Rule 14: Freeze semester limit\nfact FreezeSemesterLimit {\n all s: Student | {\n s.freezeStatus.count <= 2\n }\n}\n\n// Rule 19: Summer semester rules\nfact SummerSemesterRules {\n all s: Summer | {\n #Course.prerequisites >= 10 // Minimum 10 students\n no c: s.courses | c not in Student.registeredCourses // Only previously registered courses\n #Student.registeredCourses <= 2 // Max two courses\n }\n}\n\n// Rule 20: Credit exemption\nfact CreditExemption {\n all c: Course | {\n c in Student.registeredCourses implies {\n all p: c.prerequisites | p in Student.registeredCourses\n }\n }\n}\n\n// Ensure academic warning is binary\nfact ValidAcademicWarning {\n all s: Student | {\n s.hasAcademicWarning >= 0\n s.hasAcademicWarning <= 1\n }\n}\n\n// Rule 11: Financial Aid cancellation on Academic Warning\nfact FinancialAidCancellation {\n all s: Student | \n (s.hasAcademicWarning = 1) => (no s.scholarshipStatus)\n}\n\n// Additional constraints for valid weeks\nfact ValidWeeks {\n all s: Semester | {\n s.startWeek >= 1\n s.startWeek <= 52\n s.endWeek >= 1\n s.endWeek <= 52\n }\n}\n\n// Assertions to check the model\n\nassert NoInvalidSemesters {\n no s: Semester | s.endWeek <= s.startWeek\n}\n\nassert ValidCourseLoad {\n all s: Student | #s.registeredCourses >= 5\n}\n\nassert ValidFreezeSemesters {\n all s: Student | s.freezeStatus.count <= 2\n}\n\n// Run the model\npred show {\n // Ensure we have at least one instance of each important signature\n some Student\n some Course\n some AcademicYear\n some Scholarship\n}\n\nrun show for 5 but exactly 1 AcademicYear", "permalink": "subtly-other-police-sermon", "time": "2024-11-19 05:25:19.395676", "cmd": 1} {"id": 24187, "parent": 24186, "code": "// Basic signatures for the academic system\nabstract sig Semester {\n startWeek: one Int,\n endWeek: one Int,\n courses: set Course\n}\n\nsig Spring, Fall extends Semester {}\nsig Summer extends Semester {}\n\nsig AcademicYear {\n semesters: set Semester,\n year: one Int\n}\n\nsig Course {\n creditHours: one Int,\n prerequisites: set Course,\n language: one Language,\n attendance: one Int\n}\n\nabstract sig Language {}\none sig English, Urdu extends Language {}\n\nsig Student {\n rollNumber: one Int,\n registeredCourses: set Course,\n attendanceRecord: Course -> one Int,\n scholarshipStatus: lone Scholarship,\n hasAcademicWarning: one Int, // 0 for false, 1 for true\n freezeStatus: lone FreezeSemester,\n feesStatus: one FeesStatus\n}\n\nsig Scholarship {}\nsig FreezeSemester {\n count: one Int\n}\n\nabstract sig FeesStatus {}\nsig Paid, Unpaid extends FeesStatus {}\n\n// Facts to enforce the rules\n\n// Rule 1 & 2: Semester duration\nfact SemesterDuration {\n all s: Spring + Fall | s.endWeek.sub[s.startWeek] = 17\n all s: Summer | s.endWeek.sub[s.startWeek] = 8\n}\n\n// Rule 3: Semester end week must be after start week\nfact ValidSemesterDates {\n all s: Semester | s.endWeek > s.startWeek\n}\n\n// Rule 4: Semester count per academic year\nfact SemesterCount {\n all ay: AcademicYear | {\n #ay.semesters >= 2\n #ay.semesters <= 3\n }\n}\n\n// Rule 5 & 10: Unique roll numbers\nfact UniqueRollNumbers {\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber\n}\n\n// Rule 6: Attendance requirement\nfact AttendanceRequirement {\n all s: Student, c: Course | {\n s.attendanceRecord[c] >= 80\n s.attendanceRecord[c] <= 100\n }\n}\n\n// Rule 8 & 18: Course load\nfact CourseLoad {\n all s: Student | {\n #s.registeredCourses >= 5\n sum c: s.registeredCourses | c.creditHours >= 15\n sum c: s.registeredCourses | c.creditHours <= 18\n }\n}\n\n// Rule 14: Freeze semester limit\nfact FreezeSemesterLimit {\n all s: Student | {\n s.freezeStatus.count <= 2\n }\n}\n\n// Rule 19: Summer semester rules\nfact SummerSemesterRules {\n all s: Summer | {\n #Course.prerequisites >= 10 // Minimum 10 students\n no c: s.courses | c not in Student.registeredCourses // Only previously registered courses\n #Student.registeredCourses <= 2 // Max two courses\n }\n}\n\n// Rule 20: Credit exemption\nfact CreditExemption {\n all c: Course | {\n c in Student.registeredCourses implies {\n all p: c.prerequisites | p in Student.registeredCourses\n }\n }\n}\n\n// Ensure academic warning is binary\nfact ValidAcademicWarning {\n all s: Student | {\n s.hasAcademicWarning >= 0\n s.hasAcademicWarning <= 1\n }\n}\n\n// Rule 11: Financial Aid cancellation on Academic Warning\nfact FinancialAidCancellation {\n all s: Student | \n (s.hasAcademicWarning = 1) => (no s.scholarshipStatus)\n}\n\n// Additional constraints for valid weeks\nfact ValidWeeks {\n all s: Semester | {\n s.startWeek >= 1\n s.startWeek <= 52\n s.endWeek >= 1\n s.endWeek <= 52\n }\n}\n\n// Assertions to check the model\n\nassert NoInvalidSemesters {\n no s: Semester | s.endWeek <= s.startWeek\n}\n\nassert ValidCourseLoad {\n all s: Student | #s.registeredCourses >= 5\n}\n\nassert ValidFreezeSemesters {\n all s: Student | s.freezeStatus.count <= 2\n}\n\n// Run the model\npred show {\n // Ensure we have at least one instance of each important signature\n some Student\n some Course\n some AcademicYear\n some Scholarship\n}\n\nrun show for 5 but exactly 1 AcademicYear", "permalink": "fried-dab-curler-java", "time": "2024-11-19 05:24:57.539935", "cmd": 1} {"id": 24192, "parent": 24191, "code": "// Basic signatures for the academic system\nabstract sig Semester {\n startWeek: one Int,\n endWeek: one Int,\n courses: set Course\n}\n\nsig Spring, Fall extends Semester {}\nsig Summer extends Semester {}\n\nsig AcademicYear {\n semesters: set Semester,\n year: one Int\n}\n\nsig Course {\n creditHours: one Int,\n prerequisites: set Course,\n language: one Language,\n attendance: one Int\n}\n\nabstract sig Language {}\none sig English, Urdu extends Language {}\n\nsig Student {\n rollNumber: one Int,\n registeredCourses: set Course,\n attendanceRecord: Course -> one Int,\n scholarshipStatus: lone Scholarship,\n freezeStatus: lone FreezeSemester,\n feesStatus: one FeesStatus\n}\n\nsig AcademicWarning {\n student: one Student\n}\n\nsig Scholarship {}\nsig FreezeSemester {\n count: one Int\n}\n\nabstract sig FeesStatus {}\nsig Paid, Unpaid extends FeesStatus {}\n\n// Facts to enforce the rules\n\n// Rule 1 & 2: Semester duration\nfact SemesterDuration {\n all s: Spring + Fall | s.endWeek.sub[s.startWeek] = 17\n all s: Summer | s.endWeek.sub[s.startWeek] = 8\n}\n\n// Rule 3: Semester end week must be after start week\nfact ValidSemesterDates {\n all s: Semester | s.endWeek > s.startWeek\n}\n\n// Rule 4: Semester count per academic year\nfact SemesterCount {\n all ay: AcademicYear | {\n #ay.semesters >= 2\n #ay.semesters <= 3\n }\n}\n\n// Rule 5 & 10: Unique roll numbers\nfact UniqueRollNumbers {\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber\n}\n\n// Rule 6: Attendance requirement\nfact AttendanceRequirement {\n all s: Student, c: Course | {\n s.attendanceRecord[c] >= 80\n s.attendanceRecord[c] <= 100\n }\n}\n\n// Rule 8 & 18: Course load\nfact CourseLoad {\n all s: Student | {\n #s.registeredCourses >= 5\n sum c: s.registeredCourses | c.creditHours >= 15\n sum c: s.registeredCourses | c.creditHours <= 18\n }\n}\n\n// Rule 14: Freeze semester limit\nfact FreezeSemesterLimit {\n all s: Student | {\n s.freezeStatus.count <= 2\n }\n}\n\n// Rule 19: Summer semester rules\nfact SummerSemesterRules {\n all s: Summer | {\n #Course.prerequisites >= 10 // Minimum 10 students\n no c: s.courses | c not in Student.registeredCourses // Only previously registered courses\n #Student.registeredCourses <= 2 // Max two courses\n }\n}\n\n// Rule 20: Credit exemption\nfact CreditExemption {\n all c: Course | {\n c in Student.registeredCourses implies {\n all p: c.prerequisites | p in Student.registeredCourses\n }\n }\n}\n\n// Rule 11: Financial Aid cancellation on Academic Warning\nfact FinancialAidCancellation {\n all w: AcademicWarning | no (w.student.scholarshipStatus)\n}\n\n// Additional constraints for valid weeks\nfact ValidWeeks {\n all s: Semester | {\n s.startWeek >= 1\n s.startWeek <= 52\n s.endWeek >= 1\n s.endWeek <= 52\n }\n}\n\n// Assertions to check the model\n\nassert NoInvalidSemesters {\n no s: Semester | s.endWeek <= s.startWeek\n}\n\nassert ValidCourseLoad {\n all s: Student | #s.registeredCourses >= 5\n}\n\nassert ValidFreezeSemesters {\n all s: Student | s.freezeStatus.count <= 2\n}\n\nassert NoScholarshipWithWarning {\n all s: Student | some w: AcademicWarning | w.student = s implies no s.scholarshipStatus\n}\n\n// Run the model\npred show {\n // Ensure we have at least one instance of each important signature\n some Student\n some Course\n some AcademicYear\n some Scholarship\n some AcademicWarning\n}\n\nrun show for 5 but exactly 1 AcademicYear", "permalink": "cannon-ended-froth-mooing", "time": "2024-11-19 05:26:04.736593", "cmd": 1} {"id": 24191, "parent": 24190, "code": "// Basic signatures for the academic system\nabstract sig Semester {\n startWeek: one Int,\n endWeek: one Int,\n courses: set Course\n}\n\nsig Spring, Fall extends Semester {}\nsig Summer extends Semester {}\n\nsig AcademicYear {\n semesters: set Semester,\n year: one Int\n}\n\nsig Course {\n creditHours: one Int,\n prerequisites: set Course,\n language: one Language,\n attendance: one Int\n}\n\nabstract sig Language {}\none sig English, Urdu extends Language {}\n\nsig Student {\n rollNumber: one Int,\n registeredCourses: set Course,\n attendanceRecord: Course -> one Int,\n scholarshipStatus: lone Scholarship,\n freezeStatus: lone FreezeSemester,\n feesStatus: one FeesStatus\n}\n\nsig AcademicWarning {\n student: one Student\n}\n\nsig Scholarship {}\nsig FreezeSemester {\n count: one Int\n}\n\nabstract sig FeesStatus {}\nsig Paid, Unpaid extends FeesStatus {}\n\n// Facts to enforce the rules\n\n// Rule 1 & 2: Semester duration\nfact SemesterDuration {\n all s: Spring + Fall | s.endWeek.sub[s.startWeek] = 17\n all s: Summer | s.endWeek.sub[s.startWeek] = 8\n}\n\n// Rule 3: Semester end week must be after start week\nfact ValidSemesterDates {\n all s: Semester | s.endWeek > s.startWeek\n}\n\n// Rule 4: Semester count per academic year\nfact SemesterCount {\n all ay: AcademicYear | {\n #ay.semesters >= 2\n #ay.semesters <= 3\n }\n}\n\n// Rule 5 & 10: Unique roll numbers\nfact UniqueRollNumbers {\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber\n}\n\n// Rule 6: Attendance requirement\nfact AttendanceRequirement {\n all s: Student, c: Course | {\n s.attendanceRecord[c] >= 80\n s.attendanceRecord[c] <= 100\n }\n}\n\n// Rule 8 & 18: Course load\nfact CourseLoad {\n all s: Student | {\n #s.registeredCourses >= 5\n sum c: s.registeredCourses | c.creditHours >= 15\n sum c: s.registeredCourses | c.creditHours <= 18\n }\n}\n\n// Rule 14: Freeze semester limit\nfact FreezeSemesterLimit {\n all s: Student | {\n s.freezeStatus.count <= 2\n }\n}\n\n// Rule 19: Summer semester rules\nfact SummerSemesterRules {\n all s: Summer | {\n #Course.prerequisites >= 10 // Minimum 10 students\n no c: s.courses | c not in Student.registeredCourses // Only previously registered courses\n #Student.registeredCourses <= 2 // Max two courses\n }\n}\n\n// Rule 20: Credit exemption\nfact CreditExemption {\n all c: Course | {\n c in Student.registeredCourses implies {\n all p: c.prerequisites | p in Student.registeredCourses\n }\n }\n}\n\n// Rule 11: Financial Aid cancellation on Academic Warning\nfact FinancialAidCancellation {\n all w: AcademicWarning | no (w.student.scholarshipStatus)\n}\n\n// Additional constraints for valid weeks\nfact ValidWeeks {\n all s: Semester | {\n s.startWeek >= 1\n s.startWeek <= 52\n s.endWeek >= 1\n s.endWeek <= 52\n }\n}\n\n// Assertions to check the model\n\nassert NoInvalidSemesters {\n no s: Semester | s.endWeek <= s.startWeek\n}\n\nassert ValidCourseLoad {\n all s: Student | #s.registeredCourses >= 5\n}\n\nassert ValidFreezeSemesters {\n all s: Student | s.freezeStatus.count <= 2\n}\n\nassert NoScholarshipWithWarning {\n all s: Student | some w: AcademicWarning | w.student = s implies no s.scholarshipStatus\n}\n\n// Run the model\npred show {\n // Ensure we have at least one instance of each important signature\n some Student\n some Course\n some AcademicYear\n some Scholarship\n some AcademicWarning\n}\n\nrun show for 5 but exactly 1 AcademicYear", "permalink": "darn-speak-lining-gap", "time": "2024-11-19 05:25:39.564159", "cmd": 1} {"id": 24194, "parent": 24193, "code": "// Basic signatures for the academic system\nabstract sig Semester {\n startWeek: one Int,\n endWeek: one Int,\n courses: set Course\n}\n\nsig Spring, Fall extends Semester {}\nsig Summer extends Semester {}\n\nsig AcademicYear {\n semesters: set Semester,\n year: one Int\n}\n\nsig Course {\n creditHours: one Int,\n prerequisites: set Course,\n language: one Language,\n attendance: one Int\n}\n\nabstract sig Language {}\none sig English, Urdu extends Language {}\n\nsig AcademicWarning {}\nsig Scholarship {}\n\nsig Student {\n rollNumber: one Int,\n registeredCourses: set Course,\n attendanceRecord: Course -> one Int,\n scholarships: set Scholarship,\n warnings: set AcademicWarning,\n freezeStatus: lone FreezeSemester,\n feesStatus: one FeesStatus\n}\n\nsig FreezeSemester {\n count: one Int\n}\n\nabstract sig FeesStatus {}\nsig Paid, Unpaid extends FeesStatus {}\n\n// Facts to enforce the rules\n\n// Rule 1 & 2: Semester duration\nfact SemesterDuration {\n all s: Spring + Fall | s.endWeek.sub[s.startWeek] = 17\n all s: Summer | s.endWeek.sub[s.startWeek] = 8\n}\n\n// Rule 3: Semester end week must be after start week\nfact ValidSemesterDates {\n all s: Semester | s.endWeek > s.startWeek\n}\n\n// Rule 4: Semester count per academic year\nfact SemesterCount {\n all ay: AcademicYear | {\n #ay.semesters >= 2\n #ay.semesters <= 3\n }\n}\n\n// Rule 5 & 10: Unique roll numbers\nfact UniqueRollNumbers {\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber\n}\n\n// Rule 6: Attendance requirement\nfact AttendanceRequirement {\n all s: Student, c: Course | {\n s.attendanceRecord[c] >= 80\n s.attendanceRecord[c] <= 100\n }\n}\n\n// Rule 8 & 18: Course load\nfact CourseLoad {\n all s: Student | {\n #s.registeredCourses >= 5\n sum c: s.registeredCourses | c.creditHours >= 15\n sum c: s.registeredCourses | c.creditHours <= 18\n }\n}\n\n// Rule 14: Freeze semester limit\nfact FreezeSemesterLimit {\n all s: Student | {\n s.freezeStatus.count <= 2\n }\n}\n\n// Rule 19: Summer semester rules\nfact SummerSemesterRules {\n all s: Summer | {\n #Course.prerequisites >= 10 // Minimum 10 students\n no c: s.courses | c not in Student.registeredCourses // Only previously registered courses\n #Student.registeredCourses <= 2 // Max two courses\n }\n}\n\n// Rule 20: Credit exemption\nfact CreditExemption {\n all c: Course | {\n c in Student.registeredCourses implies {\n all p: c.prerequisites | p in Student.registeredCourses\n }\n }\n}\n\n// Rule 11: Financial Aid cancellation on Academic Warning\nfact FinancialAidCancellation {\n all s: Student | some s.warnings implies no s.scholarships\n}\n\n// Additional constraints for valid weeks\nfact ValidWeeks {\n all s: Semester | {\n s.startWeek >= 1\n s.startWeek <= 52\n s.endWeek >= 1\n s.endWeek <= 52\n }\n}\n\n// Assertions to check the model\n\nassert NoInvalidSemesters {\n no s: Semester | s.endWeek <= s.startWeek\n}\n\nassert ValidCourseLoad {\n all s: Student | #s.registeredCourses >= 5\n}\n\nassert ValidFreezeSemesters {\n all s: Student | s.freezeStatus.count <= 2\n}\n\nassert NoScholarshipWithWarning {\n all s: Student | some s.warnings implies no s.scholarships\n}\n\n// Run the model\npred show {\n // Ensure we have at least one instance of each important signature\n some Student\n some Course\n some AcademicYear\n some s: Student | some s.scholarships\n some s: Student | some s.warnings\n}\n\nrun show for 5 but exactly 1 AcademicYear", "permalink": "gong-each-flier-faucet", "time": "2024-11-19 05:28:30.864056", "cmd": 1} {"id": 24193, "parent": 24192, "code": "// Basic signatures for the academic system\nabstract sig Semester {\n startWeek: one Int,\n endWeek: one Int,\n courses: set Course\n}\n\nsig Spring, Fall extends Semester {}\nsig Summer extends Semester {}\n\nsig AcademicYear {\n semesters: set Semester,\n year: one Int\n}\n\nsig Course {\n creditHours: one Int,\n prerequisites: set Course,\n language: one Language,\n attendance: one Int\n}\n\nabstract sig Language {}\none sig English, Urdu extends Language {}\n\nsig AcademicWarning {}\nsig Scholarship {}\n\nsig Student {\n rollNumber: one Int,\n registeredCourses: set Course,\n attendanceRecord: Course -> one Int,\n scholarships: set Scholarship,\n warnings: set AcademicWarning,\n freezeStatus: lone FreezeSemester,\n feesStatus: one FeesStatus\n}\n\nsig FreezeSemester {\n count: one Int\n}\n\nabstract sig FeesStatus {}\nsig Paid, Unpaid extends FeesStatus {}\n\n// Facts to enforce the rules\n\n// Rule 1 & 2: Semester duration\nfact SemesterDuration {\n all s: Spring + Fall | s.endWeek.sub[s.startWeek] = 17\n all s: Summer | s.endWeek.sub[s.startWeek] = 8\n}\n\n// Rule 3: Semester end week must be after start week\nfact ValidSemesterDates {\n all s: Semester | s.endWeek > s.startWeek\n}\n\n// Rule 4: Semester count per academic year\nfact SemesterCount {\n all ay: AcademicYear | {\n #ay.semesters >= 2\n #ay.semesters <= 3\n }\n}\n\n// Rule 5 & 10: Unique roll numbers\nfact UniqueRollNumbers {\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber\n}\n\n// Rule 6: Attendance requirement\nfact AttendanceRequirement {\n all s: Student, c: Course | {\n s.attendanceRecord[c] >= 80\n s.attendanceRecord[c] <= 100\n }\n}\n\n// Rule 8 & 18: Course load\nfact CourseLoad {\n all s: Student | {\n #s.registeredCourses >= 5\n sum c: s.registeredCourses | c.creditHours >= 15\n sum c: s.registeredCourses | c.creditHours <= 18\n }\n}\n\n// Rule 14: Freeze semester limit\nfact FreezeSemesterLimit {\n all s: Student | {\n s.freezeStatus.count <= 2\n }\n}\n\n// Rule 19: Summer semester rules\nfact SummerSemesterRules {\n all s: Summer | {\n #Course.prerequisites >= 10 // Minimum 10 students\n no c: s.courses | c not in Student.registeredCourses // Only previously registered courses\n #Student.registeredCourses <= 2 // Max two courses\n }\n}\n\n// Rule 20: Credit exemption\nfact CreditExemption {\n all c: Course | {\n c in Student.registeredCourses implies {\n all p: c.prerequisites | p in Student.registeredCourses\n }\n }\n}\n\n// Rule 11: Financial Aid cancellation on Academic Warning\nfact FinancialAidCancellation {\n all s: Student | some s.warnings implies no s.scholarships\n}\n\n// Additional constraints for valid weeks\nfact ValidWeeks {\n all s: Semester | {\n s.startWeek >= 1\n s.startWeek <= 52\n s.endWeek >= 1\n s.endWeek <= 52\n }\n}\n\n// Assertions to check the model\n\nassert NoInvalidSemesters {\n no s: Semester | s.endWeek <= s.startWeek\n}\n\nassert ValidCourseLoad {\n all s: Student | #s.registeredCourses >= 5\n}\n\nassert ValidFreezeSemesters {\n all s: Student | s.freezeStatus.count <= 2\n}\n\nassert NoScholarshipWithWarning {\n all s: Student | some s.warnings implies no s.scholarships\n}\n\n// Run the model\npred show {\n // Ensure we have at least one instance of each important signature\n some Student\n some Course\n some AcademicYear\n some s: Student | some s.scholarships\n some s: Student | some s.warnings\n}\n\nrun show for 5 but exactly 1 AcademicYear", "permalink": "batch-smog-pound-hyphen", "time": "2024-11-19 05:26:50.364651", "cmd": 1} {"id": 24195, "parent": 24194, "code": "// Signatures for main entities\nabstract sig Semester {\n startDate: one Time,\n endDate: one Time,\n courses: set Course,\n students: set Student\n}\n\nsig Spring, Fall extends Semester {}\nsig Summer extends Semester {}\n\nsig AcademicYear {\n semesters: set Semester,\n year: one Int\n}\n\nsig Student {\n rollNumber: one Int,\n attendance: set CourseAttendance,\n registeredCourses: set Course,\n scholarshipStatus: lone Scholarship,\n academicWarnings: set AcademicWarning,\n freezeHistory: set Semester,\n feesStatus: one FeesStatus,\n program: one Program\n}\n\nsig Course {\n creditHours: one Int,\n prerequisites: set Course,\n language: one Language,\n instructor: one Faculty\n}\n\nsig CourseAttendance {\n course: one Course,\n percentage: one Int\n}\n\nabstract sig Language {}\none sig English, Urdu extends Language {}\n\nabstract sig Faculty {}\nsig RegularFaculty, VisitingFaculty extends Faculty {}\n\nsig Scholarship {}\nsig AcademicWarning {}\n\nsig FeesStatus {\n isPaid: one Bool\n}\n\nsig Program {}\n\nsig Time {}\n\n// Facts defining core constraints\n\n// Semester duration and ordering\nfact SemesterDuration {\n all s: Semester | {\n s.endDate != s.startDate\n s.endDate > s.startDate\n all sp: Spring | #weeks[sp.startDate, sp.endDate] = 17\n all f: Fall | #weeks[f.startDate, f.endDate] = 17\n all su: Summer | #weeks[su.startDate, su.endDate] = 8\n }\n}\n\n// Academic Year constraints\nfact AcademicYearRules {\n all ay: AcademicYear | {\n #ay.semesters >= 2\n #ay.semesters <= 3\n one s: Spring | s in ay.semesters\n one f: Fall | f in ay.semesters\n lone su: Summer | su in ay.semesters\n }\n}\n\n// Student constraints\nfact StudentRules {\n // Unique roll numbers\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber\n \n // Course registration rules\n all s: Student | {\n // Normal course load\n #s.registeredCourses >= 5 implies sum[c: s.registeredCourses | c.creditHours] >= 15\n sum[c: s.registeredCourses | c.creditHours] <= 18\n \n // Prerequisites must be completed\n all c: s.registeredCourses | all p: c.prerequisites | p in s.registeredCourses\n }\n \n // Attendance rules\n all ca: CourseAttendance | {\n ca.percentage <= 100\n ca.percentage >= 80 // Minimum 80% attendance required\n }\n \n // Freeze semester rules\n all s: Student | #s.freezeHistory <= 2\n}\n\n// Summer semester specific rules\nfact SummerRules {\n all su: Summer | {\n // Max two courses with labs\n all s: Student | #(s.registeredCourses & su.courses) <= 2\n \n // Minimum 10 students per course\n all c: su.courses | #(su.students & c.registeredCourses.Student) >= 10\n \n // No visiting faculty in summer\n no c: su.courses | c.instructor in VisitingFaculty\n }\n}\n\n// Scholarship rules\nfact ScholarshipRules {\n all s: Student | {\n s.scholarshipStatus != none implies {\n // Full course load required\n #s.registeredCourses = 5\n // Cancel scholarship on academic warning\n some s.academicWarnings implies no s.scholarshipStatus\n }\n }\n}\n\n// Program enrollment rule\nfact SingleProgramRule {\n all s: Student | one s.program\n}\n\n// Course language rules\nfact LanguageRules {\n all c: Course | {\n c.language = English or \n (c.name = \"Religious and Islamic Studies\" implies \n (c.language = English or c.language = Urdu))\n }\n}\n\n// Fees rules\nfact FeesRules {\n all s: Student | {\n // Must clear previous fees before registration\n s.feesStatus.isPaid = True implies s in Semester.students\n \n // Freezing fee\n all sem: s.freezeHistory | some fs: FeesStatus | \n fs.amount = 11000 and fs.isPaid = True\n }\n}\n\n// Credit exemption rules\npred canExemptCredits[s: Student, c: Course, grade: Int] {\n // For Bachelor programs\n (s.program in BachelorProgram and grade >= 2) or // Assuming C = 2.0\n // For Master programs\n (s.program in MasterProgram and grade >= 3) // Assuming B- = 3.0\n}\n\n// Assertions to verify key properties\nassert UniqueRollNumbers {\n no disj s1, s2: Student | s1.rollNumber = s2.rollNumber\n}\n\nassert ValidSemesterDates {\n all s: Semester | s.endDate > s.startDate\n}\n\nassert ValidCourseLoad {\n all s: Student | \n #s.registeredCourses >= 5 implies\n sum[c: s.registeredCourses | c.creditHours] >= 15 and\n sum[c: s.registeredCourses | c.creditHours] <= 18\n}\n\n// Run checks\ncheck UniqueRollNumbers\ncheck ValidSemesterDates\ncheck ValidCourseLoad", "permalink": "scenic-booted-foyer-angler", "time": "2024-11-19 05:29:50.494766", "cmd": 1} {"id": 24196, "parent": 24195, "code": "// Signatures for main entities\nabstract sig Semester {\n startDate: one Time,\n endDate: one Time,\n courses: set Course,\n students: set Student\n}\n\nsig Spring, Fall extends Semester {}\nsig Summer extends Semester {}\n\nsig AcademicYear {\n semesters: set Semester,\n year: one Int\n}\n\nsig Student {\n rollNumber: one Int,\n attendance: set CourseAttendance,\n registeredCourses: set Course,\n scholarshipStatus: lone Scholarship,\n academicWarnings: set AcademicWarning,\n freezeHistory: set Semester,\n feesStatus: one FeesStatus\n}\n\nsig Course {\n creditHours: one Int,\n prerequisites: set Course,\n language: one Language,\n instructor: one Faculty,\n name: one String\n}\n\nsig CourseAttendance {\n course: one Course,\n percentage: one Int\n}\n\nabstract sig Language {}\none sig English, Urdu extends Language {}\n\nabstract sig Faculty {}\nsig RegularFaculty, VisitingFaculty extends Faculty {}\n\nsig Scholarship {}\nsig AcademicWarning {}\n\nsig FeesStatus {\n isPaid: one Bool,\n amount: one Int\n}\n\nsig Program {}\nabstract sig BachelorProgram, MasterProgram extends Program {}\n\nsig Time {}\n\n// Facts defining core constraints\n\n// Semester duration and ordering\nfact SemesterDuration {\n all s: Semester | {\n s.endDate != s.startDate\n gt[s.endDate, s.startDate]\n all sp: Spring | difference[sp.endDate, sp.startDate] = 17\n all f: Fall | difference[f.endDate, f.startDate] = 17\n all su: Summer | difference[su.endDate, su.startDate] = 8\n }\n}\n\n// Academic Year constraints\nfact AcademicYearRules {\n all ay: AcademicYear | {\n #ay.semesters >= 2\n #ay.semesters <= 3\n one s: Spring | s in ay.semesters\n one f: Fall | f in ay.semesters\n lone su: Summer | su in ay.semesters\n }\n}\n\n// Student constraints\nfact StudentRules {\n // Unique roll numbers\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber\n \n // Course registration rules\n all s: Student | {\n // Normal course load\n #s.registeredCourses >= 5 implies (sum c: s.registeredCourses | c.creditHours) >= 15\n (sum c: s.registeredCourses | c.creditHours) <= 18\n \n // Prerequisites must be completed\n all c: s.registeredCourses | all p: c.prerequisites | p in s.registeredCourses\n }\n \n // Attendance rules\n all ca: CourseAttendance | {\n ca.percentage <= 100\n ca.percentage >= 80 // Minimum 80% attendance required\n }\n \n // Freeze semester rules\n all s: Student | #s.freezeHistory <= 2\n}\n\n// Summer semester specific rules\nfact SummerRules {\n all su: Summer | {\n // Max two courses with labs\n all s: Student | #(s.registeredCourses & su.courses) <= 2\n \n // Minimum 10 students per course\n all c: su.courses | #(su.students & c.~registeredCourses) >= 10\n \n // No visiting faculty in summer\n no c: su.courses | c.instructor in VisitingFaculty\n }\n}\n\n// Scholarship rules\nfact ScholarshipRules {\n all s: Student | {\n s.scholarshipStatus != none implies {\n // Full course load required\n #s.registeredCourses = 5\n // Cancel scholarship on academic warning\n some s.academicWarnings implies no s.scholarshipStatus\n }\n }\n}\n\n// Course language rules\nfact LanguageRules {\n all c: Course | {\n c.language = English or \n (c.name = \"Religious and Islamic Studies\" implies \n (c.language = English or c.language = Urdu))\n }\n}\n\n// Fees rules\nfact FeesRules {\n all s: Student | {\n // Must clear previous fees before registration\n s.feesStatus.isPaid = True implies s in Semester.students\n \n // Freezing fee\n all sem: s.freezeHistory | some fs: FeesStatus | \n fs.amount = 11000 and fs.isPaid = True\n }\n}\n\n// Credit exemption rules\npred canExemptCredits[s: Student, c: Course, grade: Int] {\n // For Bachelor programs\n (s.program in BachelorProgram and grade >= 2) or // Assuming C = 2.0\n // For Master programs\n (s.program in MasterProgram and grade >= 3) // Assuming B- = 3.0\n}\n\n// Helper predicate for time comparison\npred gt[t1: Time, t2: Time] {\n t1 != t2\n t2 not in t1.^prev\n}\n\n// Helper function to calculate difference between times\nfun difference[t1: Time, t2: Time]: Int {\n // This is a simplified version - in real implementation would need more complex logic\n #{t: Time | gt[t, t2] and gt[t1, t]}\n}\n\n// Assertions to verify key properties\nassert UniqueRollNumbers {\n no disj s1, s2: Student | s1.rollNumber = s2.rollNumber\n}\n\nassert ValidSemesterDates {\n all s: Semester | gt[s.endDate, s.startDate]\n}\n\nassert ValidCourseLoad {\n all s: Student | \n #s.registeredCourses >= 5 implies\n (sum c: s.registeredCourses | c.creditHours) >= 15 and\n (sum c: s.registeredCourses | c.creditHours) <= 18\n}\n\n// Run some example\nrun {} for 5\n\n// Check assertions\ncheck UniqueRollNumbers for 5\ncheck ValidSemesterDates for 5\ncheck ValidCourseLoad for 5", "permalink": "coping-herbal-stylus-sepia", "time": "2024-11-19 05:30:55.404871", "cmd": 1} {"id": 24197, "parent": 24196, "code": "// Signatures for main entities\nabstract sig Semester {\n startDate: one Time,\n endDate: one Time,\n courses: set Course,\n students: set Student\n}\n\nsig Spring, Fall extends Semester {}\nsig Summer extends Semester {}\n\nsig AcademicYear {\n semesters: set Semester,\n year: one Int\n}\n\nsig Student {\n rollNumber: one Int,\n attendance: set CourseAttendance,\n registeredCourses: set Course,\n scholarshipStatus: lone Scholarship,\n academicWarnings: set AcademicWarning,\n freezeHistory: set Semester,\n feesStatus: one FeesStatus,\n program: one Program\n}\n\nsig Course {\n creditHours: one Int,\n prerequisites: set Course,\n language: one Language,\n instructor: one Faculty,\n name: one String\n}\n\nsig CourseAttendance {\n course: one Course,\n percentage: one Int\n}\n\nabstract sig Language {}\none sig English, Urdu extends Language {}\n\nabstract sig Faculty {}\nsig RegularFaculty, VisitingFaculty extends Faculty {}\n\nsig Scholarship {}\nsig AcademicWarning {}\n\nsig FeesStatus {\n isPaid: one Int, // Using 0 for false, 1 for true\n amount: one Int\n}\n\nsig Program {}\nabstract sig BachelorProgram, MasterProgram extends Program {}\n\nsig Time {}\n\n// Facts defining core constraints\n\n// Semester duration and ordering\nfact SemesterDuration {\n all s: Semester | {\n s.endDate != s.startDate\n gt[s.endDate, s.startDate]\n all sp: Spring | difference[sp.endDate, sp.startDate] = 17\n all f: Fall | difference[f.endDate, f.startDate] = 17\n all su: Summer | difference[su.endDate, su.startDate] = 8\n }\n}\n\n// Academic Year constraints\nfact AcademicYearRules {\n all ay: AcademicYear | {\n #ay.semesters >= 2\n #ay.semesters <= 3\n one s: Spring | s in ay.semesters\n one f: Fall | f in ay.semesters\n lone su: Summer | su in ay.semesters\n }\n}\n\n// Student constraints\nfact StudentRules {\n // Unique roll numbers\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber\n \n // Course registration rules\n all s: Student | {\n // Normal course load\n #s.registeredCourses >= 5 implies (sum c: s.registeredCourses | c.creditHours) >= 15\n (sum c: s.registeredCourses | c.creditHours) <= 18\n \n // Prerequisites must be completed\n all c: s.registeredCourses | all p: c.prerequisites | p in s.registeredCourses\n }\n \n // Attendance rules\n all ca: CourseAttendance | {\n ca.percentage <= 100\n ca.percentage >= 80 // Minimum 80% attendance required\n }\n \n // Freeze semester rules\n all s: Student | #s.freezeHistory <= 2\n}\n\n// Summer semester specific rules\nfact SummerRules {\n all su: Summer | {\n // Max two courses with labs\n all s: Student | #(s.registeredCourses & su.courses) <= 2\n \n // Minimum 10 students per course\n all c: su.courses | #(su.students & c.~registeredCourses) >= 10\n \n // No visiting faculty in summer\n no c: su.courses | c.instructor in VisitingFaculty\n }\n}\n\n// Scholarship rules\nfact ScholarshipRules {\n all s: Student | {\n s.scholarshipStatus != none implies {\n // Full course load required\n #s.registeredCourses = 5\n // Cancel scholarship on academic warning\n some s.academicWarnings implies no s.scholarshipStatus\n }\n }\n}\n\n// Course language rules\nfact LanguageRules {\n all c: Course | {\n c.language = English or \n (c.name = \"Religious and Islamic Studies\" implies \n (c.language = English or c.language = Urdu))\n }\n}\n\n// Fees rules\nfact FeesRules {\n all s: Student | {\n // Must clear previous fees before registration\n s.feesStatus.isPaid = 1 implies s in Semester.students\n \n // Freezing fee\n all sem: s.freezeHistory | some fs: FeesStatus | \n fs.amount = 11000 and fs.isPaid = 1\n }\n}\n\n// Credit exemption rules\npred canExemptCredits[s: Student, c: Course, grade: Int] {\n // For Bachelor programs\n (s.program in BachelorProgram and grade >= 2) or // Assuming C = 2.0\n // For Master programs\n (s.program in MasterProgram and grade >= 3) // Assuming B- = 3.0\n}\n\n// Helper predicate for time comparison\npred gt[t1: Time, t2: Time] {\n t1 != t2\n t2 not in t1.^prev\n}\n\n// Helper function to calculate difference between times\nfun difference[t1: Time, t2: Time]: Int {\n // This is a simplified version - in real implementation would need more complex logic\n #{t: Time | gt[t, t2] and gt[t1, t]}\n}\n\n// Assertions to verify key properties\nassert UniqueRollNumbers {\n no disj s1, s2: Student | s1.rollNumber = s2.rollNumber\n}\n\nassert ValidSemesterDates {\n all s: Semester | gt[s.endDate, s.startDate]\n}\n\nassert ValidCourseLoad {\n all s: Student | \n #s.registeredCourses >= 5 implies\n (sum c: s.registeredCourses | c.creditHours) >= 15 and\n (sum c: s.registeredCourses | c.creditHours) <= 18\n}\n\n// Run some example\nrun {} for 5\n\n// Check assertions\ncheck UniqueRollNumbers for 5\ncheck ValidSemesterDates for 5\ncheck ValidCourseLoad for 5", "permalink": "status-whacky-stoop-blazer", "time": "2024-11-19 05:31:34.697998", "cmd": 1} {"id": 24198, "parent": 24197, "code": "// Signatures for main entities\nabstract sig Semester {\n startDate: one Time,\n endDate: one Time,\n courses: set Course,\n students: set Student\n}\n\nsig Spring, Fall extends Semester {}\nsig Summer extends Semester {}\n\nsig AcademicYear {\n semesters: set Semester,\n year: one Int\n}\n\nsig Student {\n rollNumber: one Int,\n attendance: set CourseAttendance,\n registeredCourses: set Course,\n scholarshipStatus: lone Scholarship,\n academicWarnings: set AcademicWarning,\n freezeHistory: set Semester,\n feesStatus: one FeesStatus,\n program: one Program\n}\n\nsig Course {\n creditHours: one Int,\n prerequisites: set Course,\n language: one Language,\n instructor: one Faculty,\n name: one String\n}\n\nsig CourseAttendance {\n course: one Course,\n percentage: one Int\n}\n\nabstract sig Language {}\none sig English, Urdu extends Language {}\n\nabstract sig Faculty {}\nsig RegularFaculty, VisitingFaculty extends Faculty {}\n\nsig Scholarship {}\nsig AcademicWarning {}\n\nsig FeesStatus {\n isPaid: one Int, // Using 0 for false, 1 for true\n amount: one Int\n}\n\nsig Program {}\nabstract sig BachelorProgram, MasterProgram extends Program {}\n\nsig Time {}\n\n// Facts defining core constraints\n\n// Semester duration and ordering\nfact SemesterDuration {\n all s: Semester | {\n s.endDate != s.startDate\n gt[s.endDate, s.startDate]\n all sp: Spring | difference[sp.endDate, sp.startDate] = 17\n all f: Fall | difference[f.endDate, f.startDate] = 17\n all su: Summer | difference[su.endDate, su.startDate] = 8\n }\n}\n\n// Academic Year constraints\nfact AcademicYearRules {\n all ay: AcademicYear | {\n #ay.semesters >= 2\n #ay.semesters <= 3\n one s: Spring | s in ay.semesters\n one f: Fall | f in ay.semesters\n lone su: Summer | su in ay.semesters\n }\n}\n\n// Student constraints\nfact StudentRules {\n // Unique roll numbers\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber\n \n // Course registration rules\n all s: Student | {\n // Normal course load\n #s.registeredCourses >= 5 implies (sum c: s.registeredCourses | c.creditHours) >= 15\n (sum c: s.registeredCourses | c.creditHours) <= 18\n \n // Prerequisites must be completed\n all c: s.registeredCourses | all p: c.prerequisites | p in s.registeredCourses\n }\n \n // Attendance rules\n all ca: CourseAttendance | {\n ca.percentage <= 100\n ca.percentage >= 80 // Minimum 80% attendance required\n }\n \n // Freeze semester rules\n all s: Student | #s.freezeHistory <= 2\n}\n\n// Summer semester specific rules\nfact SummerRules {\n all su: Summer | {\n // Max two courses with labs\n all s: Student | #(s.registeredCourses & su.courses) <= 2\n \n // Minimum 10 students per course\n all c: su.courses | #(su.students & c.~registeredCourses) >= 10\n \n // No visiting faculty in summer\n no c: su.courses | c.instructor in VisitingFaculty\n }\n}\n\n// Scholarship rules\nfact ScholarshipRules {\n all s: Student | {\n s.scholarshipStatus != none implies {\n // Full course load required\n #s.registeredCourses = 5\n // Cancel scholarship on academic warning\n some s.academicWarnings implies no s.scholarshipStatus\n }\n }\n}\n\n// Course language rules\nfact LanguageRules {\n all c: Course | {\n c.language = English or \n (c.name = \"Religious and Islamic Studies\" implies \n (c.language = English or c.language = Urdu))\n }\n}\n\n// Fees rules\nfact FeesRules {\n all s: Student | {\n // Must clear previous fees before registration\n s.feesStatus.isPaid = 1 implies s in Semester.students\n \n // Freezing fee\n all sem: s.freezeHistory | some fs: FeesStatus | \n fs.amount = 11000 and fs.isPaid = 1\n }\n}\n\n// Credit exemption rules\npred canExemptCredits[s: Student, c: Course, grade: Int] {\n // For Bachelor programs\n (s.program in BachelorProgram and grade >= 2) or // Assuming C = 2.0\n // For Master programs\n (s.program in MasterProgram and grade >= 3) // Assuming B- = 3.0\n}\n\n// Helper predicate for time comparison\npred gt[t1: Time, t2: Time] {\n t1 != t2\n t2 not in t1.^prev\n}\n\n// Helper function to calculate difference between times\nfun difference[t1: Time, t2: Time]: Int {\n // This is a simplified version - in real implementation would need more complex logic\n #{t: Time | gt[t, t2] and gt[t1, t]}\n}\n\n// Assertions to verify key properties\nassert UniqueRollNumbers {\n no disj s1, s2: Student | s1.rollNumber = s2.rollNumber\n}\n\nassert ValidSemesterDates {\n all s: Semester | gt[s.endDate, s.startDate]\n}\n\nassert ValidCourseLoad {\n all s: Student | \n #s.registeredCourses >= 5 implies\n (sum c: s.registeredCourses | c.creditHours) >= 15 and\n (sum c: s.registeredCourses | c.creditHours) <= 18\n}\n\n// Rule 16: No concurrent programs\nfact NoConcurrentPrograms {\n all s: Student | one s.program\n}\n\n// Rule 17: Course addition timeframe\nsig CourseAddRequest {\n student: one Student,\n course: one Course,\n requestWeek: one Int\n}\n\nfact CourseAdditionRules {\n all car: CourseAddRequest | {\n car.requestWeek <= 2\n car.requestWeek > 0\n all p: car.course.prerequisites | p in car.student.registeredCourses\n }\n}\n\n// Rule 18: Incomplete grade handling\nabstract sig Grade {}\none sig Incomplete extends Grade {}\n\nsig CourseGrade {\n course: one Course,\n grade: one Grade\n}\n\n// Additional Summer Rules\nfact AdditionalSummerRules {\n all su: Summer, s: Student, c: Course | {\n c in s.registeredCourses and c in su.courses implies \n c in s.registeredCourses.~courses\n // Above ensures courses were previously registered\n }\n}\n\n// Run some example\nrun {} for 5\n\n// Check assertions\ncheck UniqueRollNumbers for 5\ncheck ValidSemesterDates for 5\ncheck ValidCourseLoad for 5", "permalink": "slum-unwed-sage-aroma", "time": "2024-11-19 05:34:41.999210", "cmd": 1} {"id": 26905, "parent": 24199, "code": "// Signatures for main entities\nabstract sig Semester {\n startDate: one Time,\n endDate: one Time,\n courses: set Course,\n students: set Student\n}\n\nsig Spring, Fall extends Semester {}\nsig Summer extends Semester {}\n\nsig AcademicYear {\n semesters: set Semester,\n year: one Int\n}\n\nsig Student {\n rollNumber: one Int,\n attendance: set CourseAttendance,\n registeredCourses: set Course,\n scholarshipStatus: lone Scholarship,\n academicWarnings: set AcademicWarning,\n freezeHistory: set Semester,\n feesStatus: one FeesStatus,\n program: one Program\n}\n\nsig Course {\n creditHours: one Int,\n prerequisites: set Course,\n language: one Language,\n instructor: one Faculty,\n name: one String\n}\n\nsig CourseAttendance {\n course: one Course,\n percentage: one Int\n}\n\nabstract sig Language {}\none sig English, Urdu extends Language {}\n\nabstract sig Faculty {}\nsig RegularFaculty, VisitingFaculty extends Faculty {}\n\nsig Scholarship {}\nsig AcademicWarning {}\n\nsig FeesStatus {\n isPaid: one Int, // Using 0 for false, 1 for true\n amount: one Int\n}\n\nsig Program {}\nabstract sig BachelorProgram, MasterProgram extends Program {}\n\nsig Time {}\n\n// Facts defining core constraints\n\n// Semester duration and ordering\nfact SemesterDuration {\n all s: Semester | {\n s.endDate != s.startDate\n gt[s.endDate, s.startDate]\n all sp: Spring | difference[sp.endDate, sp.startDate] = 17\n all f: Fall | difference[f.endDate, f.startDate] = 17\n all su: Summer | difference[su.endDate, su.startDate] = 8\n }\n}\n\n// Academic Year constraints\nfact AcademicYearRules {\n all ay: AcademicYear | {\n #ay.semesters >= 2\n #ay.semesters <= 3\n one s: Spring | s in ay.semesters\n one f: Fall | f in ay.semesters\n lone su: Summer | su in ay.semesters\n }\n}\n\n// Student constraints\nfact StudentRules {\n // Unique roll numbers\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber\n \n // Course registration rules\n all s: Student | {\n // Normal course load\n #s.registeredCourses >= 5 implies (sum c: s.registeredCourses | c.creditHours) >= 15\n (sum c: s.registeredCourses | c.creditHours) <= 18\n \n // Prerequisites must be completed\n all c: s.registeredCourses | all p: c.prerequisites | p in s.registeredCourses\n }\n \n // Attendance rules\n all ca: CourseAttendance | {\n ca.percentage <= 100\n ca.percentage >= 80 // Minimum 80% attendance required\n }\n \n // Freeze semester rules\n all s: Student | #s.freezeHistory <= 2\n}\n\n// Summer semester specific rules\nfact SummerRules {\n all su: Summer | {\n // Max two courses with labs\n all s: Student | #(s.registeredCourses & su.courses) <= 2\n \n // Minimum 10 students per course\n all c: su.courses | #(su.students & c.~registeredCourses) >= 10\n \n // No visiting faculty in summer\n no c: su.courses | c.instructor in VisitingFaculty\n }\n}\n\n// Scholarship rules\nfact ScholarshipRules {\n all s: Student | {\n s.scholarshipStatus != none implies {\n // Full course load required\n #s.registeredCourses = 5\n // Cancel scholarship on academic warning\n some s.academicWarnings implies no s.scholarshipStatus\n }\n }\n}\n\n// Course language rules\nfact LanguageRules {\n all c: Course | {\n c.language = English or \n (c.name = \"Religious and Islamic Studies\" implies \n (c.language = English or c.language = Urdu))\n }\n}\n\n// Fees rules\nfact FeesRules {\n all s: Student | {\n // Must clear previous fees before registration\n s.feesStatus.isPaid = 1 implies s in Semester.students\n \n // Freezing fee\n all sem: s.freezeHistory | some fs: FeesStatus | \n fs.amount = 11000 and fs.isPaid = 1\n }\n}\n\n// Credit exemption rules\npred canExemptCredits[s: Student, c: Course, grade: Int] {\n // For Bachelor programs\n (s.program in BachelorProgram and grade >= 2) or // Assuming C = 2.0\n // For Master programs\n (s.program in MasterProgram and grade >= 3) // Assuming B- = 3.0\n}\n\n// Helper predicate for time comparison\npred gt[t1: Time, t2: Time] {\n t1 != t2\n t2 not in t1.^prev\n}\n\n// Helper function to calculate difference between times\nfun difference[t1: Time, t2: Time]: Int {\n // This is a simplified version - in real implementation would need more complex logic\n #{t: Time | gt[t, t2] and gt[t1, t]}\n}\n\n// Assertions to verify key properties\nassert UniqueRollNumbers {\n no disj s1, s2: Student | s1.rollNumber = s2.rollNumber\n}\n\nassert ValidSemesterDates {\n all s: Semester | gt[s.endDate, s.startDate]\n}\n\nassert ValidCourseLoad {\n all s: Student | \n #s.registeredCourses >= 5 implies\n (sum c: s.registeredCourses | c.creditHours) >= 15 and\n (sum c: s.registeredCourses | c.creditHours) <= 18\n}\n\n// Rule 16: No concurrent programs\nfact NoConcurrentPrograms {\n all s: Student | one s.program\n}\n\n// Rule 17: Course addition timeframe\nsig CourseAddRequest {\n student: one Student,\n course: one Course,\n requestWeek: one Int\n}\n\nfact CourseAdditionRules {\n all car: CourseAddRequest | {\n car.requestWeek <= 2\n car.requestWeek > 0\n all p: car.course.prerequisites | p in car.student.registeredCourses\n }\n}\n\n// Rule 18: Incomplete grade handling\nabstract sig Grade {}\none sig Incomplete extends Grade {}\n\nsig CourseGrade {\n course: one Course,\n grade: one Grade\n}\n\n// Additional Summer Rules\nfact AdditionalSummerRules {\n all su: Summer, s: Student, c: Course | {\n c in s.registeredCourses and c in su.courses implies \n c in s.registeredCourses.~courses\n // Above ensures courses were previously registered\n }\n}\n\n// Add to Summer rules\nfact SummerCourseRestrictions {\n all su: Summer, c: Course |\n c in su.courses implies c in (Spring + Fall).courses\n}\n\n// For MS student requirements\nsig MSStudent in Student {\n isNonFastian: one Int // 0 or 1\n}\n\nfact MSStudentRules {\n all s: MSStudent |\n s.isNonFastian = 1 implies\n some c: s.registeredCourses |\n c.name = \"Applied Programming\"\n}\n\n// Run some example\nrun {} for 5\n\n// Check assertions\ncheck UniqueRollNumbers for 5\ncheck ValidSemesterDates for 5\ncheck ValidCourseLoad for 5", "permalink": "breath-ignore-vacant-cash", "time": "2024-11-26 06:57:05.456561", "cmd": 1} {"id": 26970, "parent": 26964, "code": "// Signatures for main entities\nabstract sig Semester {\n startDate: one Time,\n endDate: one Time,\n courses: set Course,\n students: set Student\n}\n\nsig Spring, Fall extends Semester {}\nsig Summer extends Semester {}\n\nsig AcademicYear {\n semesters: set Semester,\n year: one Int\n}\n\nsig Student {\n rollNumber: one Int,\n attendance: set CourseAttendance,\n registeredCourses: set Course,\n scholarshipStatus: lone Scholarship,\n academicWarnings: set AcademicWarning,\n freezeHistory: set Semester,\n feesStatus: one FeesStatus,\n program: one Program\n}\n\nsig Course {\n creditHours: one Int,\n prerequisites: set Course,\n language: one Language,\n instructor: one Faculty,\n name: one String\n}\n\nsig CourseAttendance {\n course: one Course,\n percentage: one Int\n}\n\nabstract sig Language {}\none sig English, Urdu extends Language {}\n\nabstract sig Faculty {}\nsig RegularFaculty, VisitingFaculty extends Faculty {}\n\nsig Scholarship {}\nsig AcademicWarning {}\n\nsig FeesStatus {\n isPaid: one Int, // Using 0 for false, 1 for true\n amount: one Int\n}\n\nsig Program {}\nabstract sig BachelorProgram, MasterProgram extends Program {}\n\nsig Time {}\n\n// Facts defining core constraints\n\n// Semester duration and ordering\nfact SemesterDuration {\n all s: Semester | {\n s.endDate != s.startDate\n gt[s.endDate, s.startDate]\n all sp: Spring | difference[sp.endDate, sp.startDate] = 17\n all f: Fall | difference[f.endDate, f.startDate] = 17\n all su: Summer | difference[su.endDate, su.startDate] = 8\n }\n}\n\n// Academic Year constraints\nfact AcademicYearRules {\n all ay: AcademicYear | {\n #ay.semesters >= 2\n #ay.semesters <= 3\n one s: Spring | s in ay.semesters\n one f: Fall | f in ay.semesters\n lone su: Summer | su in ay.semesters\n }\n}\n\n// Student constraints\nfact StudentRules {\n // Unique roll numbers\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber\n \n // Course registration rules\n all s: Student | {\n // Normal course load\n #s.registeredCourses >= 5 implies (sum c: s.registeredCourses | c.creditHours) >= 15\n (sum c: s.registeredCourses | c.creditHours) <= 18\n \n // Prerequisites must be completed\n all c: s.registeredCourses | all p: c.prerequisites | p in s.registeredCourses\n }\n \n // Attendance rules\n all ca: CourseAttendance | {\n ca.percentage <= 100\n ca.percentage >= 80 // Minimum 80% attendance required\n }\n \n // Freeze semester rules\n all s: Student | #s.freezeHistory <= 2\n}\n\n// Summer semester specific rules\nfact SummerRules {\n all su: Summer | {\n // Max two courses with labs\n all s: Student | #(s.registeredCourses & su.courses) <= 2\n \n // Minimum 10 students per course\n all c: su.courses | #(su.students & c.~registeredCourses) >= 10\n \n // No visiting faculty in summer\n no c: su.courses | c.instructor in VisitingFaculty\n }\n}\n\n// Scholarship rules\nfact ScholarshipRules {\n all s: Student | {\n s.scholarshipStatus != none implies {\n // Full course load required\n #s.registeredCourses = 5\n // Cancel scholarship on academic warning\n some s.academicWarnings implies no s.scholarshipStatus\n }\n }\n}\n\n// Course language rules\nfact LanguageRules {\n all c: Course | {\n c.language = English or \n (c.name = \"Religious and Islamic Studies\" implies \n (c.language = English or c.language = Urdu))\n }\n}\n\n// Fees rules\nfact FeesRules {\n all s: Student | {\n // Must clear previous fees before registration\n s.feesStatus.isPaid = 1 implies s in Semester.students\n \n // Freezing fee\n all sem: s.freezeHistory | some fs: FeesStatus | \n fs.amount = 11000 and fs.isPaid = 1\n }\n}\n\n// Credit exemption rules\npred canExemptCredits[s: Student, c: Course, grade: Int] {\n // For Bachelor programs\n (s.program in BachelorProgram and grade >= 2) or // Assuming C = 2.0\n // For Master programs\n (s.program in MasterProgram and grade >= 3) // Assuming B- = 3.0\n}\n\n// Helper predicate for time comparison\npred gt[t1: Time, t2: Time] {\n t1 != t2\n t2 not in t1.^prev\n}\n\n// Helper function to calculate difference between times\nfun difference[t1: Time, t2: Time]: Int {\n // This is a simplified version - in real implementation would need more complex logic\n #{t: Time | gt[t, t2] and gt[t1, t]}\n}\n\n// Assertions to verify key properties\nassert UniqueRollNumbers {\n no disj s1, s2: Student | s1.rollNumber = s2.rollNumber\n}\n\nassert ValidSemesterDates {\n all s: Semester | gt[s.endDate, s.startDate]\n}\n\nassert ValidCourseLoad {\n all s: Student | \n #s.registeredCourses >= 5 implies\n (sum c: s.registeredCourses | c.creditHours) >= 15 and\n (sum c: s.registeredCourses | c.creditHours) <= 18\n}\n\n// Rule 16: No concurrent programs\nfact NoConcurrentPrograms {\n all s: Student | one s.program\n}\n\n// Rule 17: Course addition timeframe\nsig CourseAddRequest {\n student: one Student,\n course: one Course,\n requestWeek: one Int\n}\n\nfact CourseAdditionRules {\n all car: CourseAddRequest | {\n car.requestWeek <= 2\n car.requestWeek > 0\n all p: car.course.prerequisites | p in car.student.registeredCourses\n }\n}\n\n// Rule 18: Incomplete grade handling\nabstract sig Grade {}\none sig Incomplete extends Grade {}\n\nsig CourseGrade {\n course: one Course,\n grade: one Grade\n}\n\n// Additional Summer Rules\nfact AdditionalSummerRules {\n all su: Summer, s: Student, c: Course | {\n c in s.registeredCourses and c in su.courses implies \n c in s.registeredCourses.~courses\n // Above ensures courses were previously registered\n }\n}\n\n// Add to Summer rules\nfact SummerCourseRestrictions {\n all su: Summer, c: Course |\n c in su.courses implies c in (Spring + Fall).courses\n}\n\n// For MS student requirements\nsig MSStudent in Student {\n isNonFastian: one Int // 0 or 1\n}\n\nfact MSStudentRules {\n all s: MSStudent |\n s.isNonFastian = 1 implies\n some c: s.registeredCourses |\n c.name = \"Applied Programming\"\n}\n\n// Run some example\nrun {} for 5\n\n// Check assertions\ncheck UniqueRollNumbers for 5\ncheck ValidSemesterDates for 5\ncheck ValidCourseLoad for 5", "permalink": "chatty-saline-resume-drool", "time": "2024-11-26 07:01:28.257359", "cmd": 1} {"id": 26973, "parent": 26970, "code": "// Signatures for main entities\nabstract sig Semester {\n startDate: one Time,\n endDate: one Time,\n courses: set Course,\n students: set Student\n}\n\nsig Spring, Fall extends Semester {}\nsig Summer extends Semester {}\n\nsig AcademicYear {\n semesters: set Semester,\n year: one Int\n}\n\nsig Student {\n rollNumber: one Int,\n attendance: set CourseAttendance,\n registeredCourses: set Course,\n scholarshipStatus: lone Scholarship,\n academicWarnings: set AcademicWarning,\n freezeHistory: set Semester,\n feesStatus: one FeesStatus,\n program: one Program\n}\n\nsig Course {\n creditHours: one Int,\n prerequisites: set Course,\n language: one Language,\n instructor: one Faculty,\n name: one String\n}\n\nsig CourseAttendance {\n course: one Course,\n percentage: one Int\n}\n\nabstract sig Language {}\none sig English, Urdu extends Language {}\n\nabstract sig Faculty {}\nsig RegularFaculty, VisitingFaculty extends Faculty {}\n\nsig Scholarship {}\nsig AcademicWarning {}\n\nsig FeesStatus {\n isPaid: one Int, // Using 0 for false, 1 for true\n amount: one Int\n}\n\nsig Program {}\nabstract sig BachelorProgram, MasterProgram extends Program {}\n\nsig Time {}\n\n// Facts defining core constraints\n\n// Semester duration and ordering\nfact SemesterDuration {\n all s: Semester | {\n s.endDate != s.startDate\n gt[s.endDate, s.startDate]\n all sp: Spring | difference[sp.endDate, sp.startDate] = 17\n all f: Fall | difference[f.endDate, f.startDate] = 17\n all su: Summer | difference[su.endDate, su.startDate] = 8\n }\n}\n\n// Academic Year constraints\nfact AcademicYearRules {\n all ay: AcademicYear | {\n #ay.semesters >= 2\n #ay.semesters <= 3\n one s: Spring | s in ay.semesters\n one f: Fall | f in ay.semesters\n lone su: Summer | su in ay.semesters\n }\n}\n\n// Student constraints\nfact StudentRules {\n // Unique roll numbers\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber\n \n // Course registration rules\n all s: Student | {\n // Normal course load\n #s.registeredCourses >= 5 implies (sum c: s.registeredCourses | c.creditHours) >= 15\n (sum c: s.registeredCourses | c.creditHours) <= 18\n \n // Prerequisites must be completed\n all c: s.registeredCourses | all p: c.prerequisites | p in s.registeredCourses\n }\n \n // Attendance rules\n all ca: CourseAttendance | {\n ca.percentage <= 100\n ca.percentage >= 80 // Minimum 80% attendance required\n }\n \n // Freeze semester rules\n all s: Student | #s.freezeHistory <= 2\n}\n\n// Summer semester specific rules\nfact SummerRules {\n all su: Summer | {\n // Max two courses with labs\n all s: Student | #(s.registeredCourses & su.courses) <= 2\n \n // Minimum 10 students per course\n all c: su.courses | #(su.students & c.~registeredCourses) >= 10\n \n // No visiting faculty in summer\n no c: su.courses | c.instructor in VisitingFaculty\n }\n}\n\n// Scholarship rules\nfact ScholarshipRules {\n all s: Student | {\n s.scholarshipStatus != none implies {\n // Full course load required\n #s.registeredCourses = 5\n // Cancel scholarship on academic warning\n some s.academicWarnings implies no s.scholarshipStatus\n }\n }\n}\n\n// Course language rules\nfact LanguageRules {\n all c: Course | {\n c.language = English or \n (c.name = \"Religious and Islamic Studies\" implies \n (c.language = English or c.language = Urdu))\n }\n}\n\n// Fees rules\nfact FeesRules {\n all s: Student | {\n // Must clear previous fees before registration\n s.feesStatus.isPaid = 1 implies s in Semester.students\n \n // Freezing fee\n all sem: s.freezeHistory | some fs: FeesStatus | \n fs.amount = 11000 and fs.isPaid = 1\n }\n}\n\n// Credit exemption rules\npred canExemptCredits[s: Student, c: Course, grade: Int] {\n // For Bachelor programs\n (s.program in BachelorProgram and grade >= 2) or // Assuming C = 2.0\n // For Master programs\n (s.program in MasterProgram and grade >= 3) // Assuming B- = 3.0\n}\n\n// Helper predicate for time comparison\npred gt[t1: Time, t2: Time] {\n t1 != t2\n t2 not in t1.^prev\n}\n\n// Helper function to calculate difference between times\nfun difference[t1: Time, t2: Time]: Int {\n // This is a simplified version - in real implementation would need more complex logic\n #{t: Time | gt[t, t2] and gt[t1, t]}\n}\n\n// Assertions to verify key properties\nassert UniqueRollNumbers {\n no disj s1, s2: Student | s1.rollNumber = s2.rollNumber\n}\n\nassert ValidSemesterDates {\n all s: Semester | gt[s.endDate, s.startDate]\n}\n\nassert ValidCourseLoad {\n all s: Student | \n #s.registeredCourses >= 5 implies\n (sum c: s.registeredCourses | c.creditHours) >= 15 and\n (sum c: s.registeredCourses | c.creditHours) <= 18\n}\n\n// Rule 16: No concurrent programs\nfact NoConcurrentPrograms {\n all s: Student | one s.program\n}\n\n// Rule 17: Course addition timeframe\nsig CourseAddRequest {\n student: one Student,\n course: one Course,\n requestWeek: one Int\n}\n\nfact CourseAdditionRules {\n all car: CourseAddRequest | {\n car.requestWeek <= 2\n car.requestWeek > 0\n all p: car.course.prerequisites | p in car.student.registeredCourses\n }\n}\n\n// Rule 18: Incomplete grade handling\nabstract sig Grade {}\none sig Incomplete extends Grade {}\n\nsig CourseGrade {\n course: one Course,\n grade: one Grade\n}\n\n// Additional Summer Rules\nfact AdditionalSummerRules {\n all su: Summer, s: Student, c: Course | {\n c in s.registeredCourses and c in su.courses implies \n c in s.registeredCourses.~courses\n // Above ensures courses were previously registered\n }\n}\n\n// Add to Summer rules\nfact SummerCourseRestrictions {\n all su: Summer, c: Course |\n c in su.courses implies c in (Spring + Fall).courses\n}\n\n// For MS student requirements\nsig MSStudent in Student {\n isNonFastian: one Int // 0 or 1\n}\n\nfact MSStudentRules {\n all s: MSStudent |\n s.isNonFastian = 1 implies\n some c: s.registeredCourses |\n c.name = \"Applied Programming\"\n}\n\n// Run some example\nrun {} for 5\n\n// Check assertions\ncheck UniqueRollNumbers for 5\ncheck ValidSemesterDates for 5\ncheck ValidCourseLoad for 5", "permalink": "spring-revert-stoic-ranger", "time": "2024-11-26 07:01:30.403701", "cmd": 1} {"id": 25761, "parent": 25609, "code": "// Signatures for main entities\nabstract sig Semester {\n startDate: one Time,\n endDate: one Time,\n courses: set Course,\n students: set Student\n}\n\nsig Spring, Fall extends Semester {}\nsig Summer extends Semester {}\n\nsig AcademicYear {\n semesters: set Semester,\n year: one Int\n}\n\nsig Student {\n rollNumber: one Int,\n attendance: set CourseAttendance,\n registeredCourses: set Course,\n scholarshipStatus: lone Scholarship,\n academicWarnings: set AcademicWarning,\n freezeHistory: set Semester,\n feesStatus: one FeesStatus,\n program: one Program\n}\n\nsig Course {\n creditHours: one Int,\n prerequisites: set Course,\n language: one Language,\n instructor: one Faculty,\n name: one String\n}\n\nsig CourseAttendance {\n course: one Course,\n percentage: one Int\n}\n\nabstract sig Language {}\none sig English, Urdu extends Language {}\n\nabstract sig Faculty {}\nsig RegularFaculty, VisitingFaculty extends Faculty {}\n\nsig Scholarship {}\nsig AcademicWarning {}\n\nsig FeesStatus {\n isPaid: one Int, // Using 0 for false, 1 for true\n amount: one Int\n}\n\nsig Program {}\nabstract sig BachelorProgram, MasterProgram extends Program {}\n\nsig Time {}\n\n// Facts defining core constraints\n\n// Semester duration and ordering\nfact SemesterDuration {\n all s: Semester | {\n s.endDate != s.startDate\n gt[s.endDate, s.startDate]\n all sp: Spring | difference[sp.endDate, sp.startDate] = 17\n all f: Fall | difference[f.endDate, f.startDate] = 17\n all su: Summer | difference[su.endDate, su.startDate] = 8\n }\n}\n\n// Academic Year constraints\nfact AcademicYearRules {\n all ay: AcademicYear | {\n #ay.semesters >= 2\n #ay.semesters <= 3\n one s: Spring | s in ay.semesters\n one f: Fall | f in ay.semesters\n lone su: Summer | su in ay.semesters\n }\n}\n\n// Student constraints\nfact StudentRules {\n // Unique roll numbers\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber\n \n // Course registration rules\n all s: Student | {\n // Normal course load\n #s.registeredCourses >= 5 implies (sum c: s.registeredCourses | c.creditHours) >= 15\n (sum c: s.registeredCourses | c.creditHours) <= 18\n \n // Prerequisites must be completed\n all c: s.registeredCourses | all p: c.prerequisites | p in s.registeredCourses\n }\n \n // Attendance rules\n all ca: CourseAttendance | {\n ca.percentage <= 100\n ca.percentage >= 80 // Minimum 80% attendance required\n }\n \n // Freeze semester rules\n all s: Student | #s.freezeHistory <= 2\n}\n\n// Summer semester specific rules\nfact SummerRules {\n all su: Summer | {\n // Max two courses with labs\n all s: Student | #(s.registeredCourses & su.courses) <= 2\n \n // Minimum 10 students per course\n all c: su.courses | #(su.students & c.~registeredCourses) >= 10\n \n // No visiting faculty in summer\n no c: su.courses | c.instructor in VisitingFaculty\n }\n}\n\n// Scholarship rules\nfact ScholarshipRules {\n all s: Student | {\n s.scholarshipStatus != none implies {\n // Full course load required\n #s.registeredCourses = 5\n // Cancel scholarship on academic warning\n some s.academicWarnings implies no s.scholarshipStatus\n }\n }\n}\n\n// Course language rules\nfact LanguageRules {\n all c: Course | {\n c.language = English or \n (c.name = \"Religious and Islamic Studies\" implies \n (c.language = English or c.language = Urdu))\n }\n}\n\n// Fees rules\nfact FeesRules {\n all s: Student | {\n // Must clear previous fees before registration\n s.feesStatus.isPaid = 1 implies s in Semester.students\n \n // Freezing fee\n all sem: s.freezeHistory | some fs: FeesStatus | \n fs.amount = 11000 and fs.isPaid = 1\n }\n}\n\n// Credit exemption rules\npred canExemptCredits[s: Student, c: Course, grade: Int] {\n // For Bachelor programs\n (s.program in BachelorProgram and grade >= 2) or // Assuming C = 2.0\n // For Master programs\n (s.program in MasterProgram and grade >= 3) // Assuming B- = 3.0\n}\n\n// Helper predicate for time comparison\npred gt[t1: Time, t2: Time] {\n t1 != t2\n t2 not in t1.^prev\n}\n\n// Helper function to calculate difference between times\nfun difference[t1: Time, t2: Time]: Int {\n // This is a simplified version - in real implementation would need more complex logic\n #{t: Time | gt[t, t2] and gt[t1, t]}\n}\n\n// Assertions to verify key properties\nassert UniqueRollNumbers {\n no disj s1, s2: Student | s1.rollNumber = s2.rollNumber\n}\n\nassert ValidSemesterDates {\n all s: Semester | gt[s.endDate, s.startDate]\n}\n\nassert ValidCourseLoad {\n all s: Student | \n #s.registeredCourses >= 5 implies\n (sum c: s.registeredCourses | c.creditHours) >= 15 and\n (sum c: s.registeredCourses | c.creditHours) <= 18\n}\n\n// Rule 16: No concurrent programs\nfact NoConcurrentPrograms {\n all s: Student | one s.program\n}\n\n// Rule 17: Course addition timeframe\nsig CourseAddRequest {\n student: one Student,\n course: one Course,\n requestWeek: one Int\n}\n\nfact CourseAdditionRules {\n all car: CourseAddRequest | {\n car.requestWeek <= 2\n car.requestWeek > 0\n all p: car.course.prerequisites | p in car.student.registeredCourses\n }\n}\n\n// Rule 18: Incomplete grade handling\nabstract sig Grade {}\none sig Incomplete extends Grade {}\n\nsig CourseGrade {\n course: one Course,\n grade: one Grade\n}\n\n// Additional Summer Rules\nfact AdditionalSummerRules {\n all su: Summer, s: Student, c: Course | {\n c in s.registeredCourses and c in su.courses implies \n c in s.registeredCourses.~courses\n // Above ensures courses were previously registered\n }\n}\n\n// Add to Summer rules\nfact SummerCourseRestrictions {\n all su: Summer, c: Course |\n c in su.courses implies c in (Spring + Fall).courses\n}\n\n// For MS student requirements\nsig MSStudent in Student {\n isNonFastian: one Int // 0 or 1\n}\n\nfact MSStudentRules {\n all s: MSStudent |\n s.isNonFastian = 1 implies\n some c: s.registeredCourses |\n c.name = \"Applied Programming\"\n}\n\n// Run some example\nrun {} for 5\n\n// Check assertions\ncheck UniqueRollNumbers for 5\ncheck ValidSemesterDates for 5\ncheck ValidCourseLoad for 5", "permalink": "clasp-coma-nectar-outbid", "time": "2024-11-25 21:04:04.487500", "cmd": 1} {"id": 24199, "parent": 24198, "code": "// Signatures for main entities\nabstract sig Semester {\n startDate: one Time,\n endDate: one Time,\n courses: set Course,\n students: set Student\n}\n\nsig Spring, Fall extends Semester {}\nsig Summer extends Semester {}\n\nsig AcademicYear {\n semesters: set Semester,\n year: one Int\n}\n\nsig Student {\n rollNumber: one Int,\n attendance: set CourseAttendance,\n registeredCourses: set Course,\n scholarshipStatus: lone Scholarship,\n academicWarnings: set AcademicWarning,\n freezeHistory: set Semester,\n feesStatus: one FeesStatus,\n program: one Program\n}\n\nsig Course {\n creditHours: one Int,\n prerequisites: set Course,\n language: one Language,\n instructor: one Faculty,\n name: one String\n}\n\nsig CourseAttendance {\n course: one Course,\n percentage: one Int\n}\n\nabstract sig Language {}\none sig English, Urdu extends Language {}\n\nabstract sig Faculty {}\nsig RegularFaculty, VisitingFaculty extends Faculty {}\n\nsig Scholarship {}\nsig AcademicWarning {}\n\nsig FeesStatus {\n isPaid: one Int, // Using 0 for false, 1 for true\n amount: one Int\n}\n\nsig Program {}\nabstract sig BachelorProgram, MasterProgram extends Program {}\n\nsig Time {}\n\n// Facts defining core constraints\n\n// Semester duration and ordering\nfact SemesterDuration {\n all s: Semester | {\n s.endDate != s.startDate\n gt[s.endDate, s.startDate]\n all sp: Spring | difference[sp.endDate, sp.startDate] = 17\n all f: Fall | difference[f.endDate, f.startDate] = 17\n all su: Summer | difference[su.endDate, su.startDate] = 8\n }\n}\n\n// Academic Year constraints\nfact AcademicYearRules {\n all ay: AcademicYear | {\n #ay.semesters >= 2\n #ay.semesters <= 3\n one s: Spring | s in ay.semesters\n one f: Fall | f in ay.semesters\n lone su: Summer | su in ay.semesters\n }\n}\n\n// Student constraints\nfact StudentRules {\n // Unique roll numbers\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber\n \n // Course registration rules\n all s: Student | {\n // Normal course load\n #s.registeredCourses >= 5 implies (sum c: s.registeredCourses | c.creditHours) >= 15\n (sum c: s.registeredCourses | c.creditHours) <= 18\n \n // Prerequisites must be completed\n all c: s.registeredCourses | all p: c.prerequisites | p in s.registeredCourses\n }\n \n // Attendance rules\n all ca: CourseAttendance | {\n ca.percentage <= 100\n ca.percentage >= 80 // Minimum 80% attendance required\n }\n \n // Freeze semester rules\n all s: Student | #s.freezeHistory <= 2\n}\n\n// Summer semester specific rules\nfact SummerRules {\n all su: Summer | {\n // Max two courses with labs\n all s: Student | #(s.registeredCourses & su.courses) <= 2\n \n // Minimum 10 students per course\n all c: su.courses | #(su.students & c.~registeredCourses) >= 10\n \n // No visiting faculty in summer\n no c: su.courses | c.instructor in VisitingFaculty\n }\n}\n\n// Scholarship rules\nfact ScholarshipRules {\n all s: Student | {\n s.scholarshipStatus != none implies {\n // Full course load required\n #s.registeredCourses = 5\n // Cancel scholarship on academic warning\n some s.academicWarnings implies no s.scholarshipStatus\n }\n }\n}\n\n// Course language rules\nfact LanguageRules {\n all c: Course | {\n c.language = English or \n (c.name = \"Religious and Islamic Studies\" implies \n (c.language = English or c.language = Urdu))\n }\n}\n\n// Fees rules\nfact FeesRules {\n all s: Student | {\n // Must clear previous fees before registration\n s.feesStatus.isPaid = 1 implies s in Semester.students\n \n // Freezing fee\n all sem: s.freezeHistory | some fs: FeesStatus | \n fs.amount = 11000 and fs.isPaid = 1\n }\n}\n\n// Credit exemption rules\npred canExemptCredits[s: Student, c: Course, grade: Int] {\n // For Bachelor programs\n (s.program in BachelorProgram and grade >= 2) or // Assuming C = 2.0\n // For Master programs\n (s.program in MasterProgram and grade >= 3) // Assuming B- = 3.0\n}\n\n// Helper predicate for time comparison\npred gt[t1: Time, t2: Time] {\n t1 != t2\n t2 not in t1.^prev\n}\n\n// Helper function to calculate difference between times\nfun difference[t1: Time, t2: Time]: Int {\n // This is a simplified version - in real implementation would need more complex logic\n #{t: Time | gt[t, t2] and gt[t1, t]}\n}\n\n// Assertions to verify key properties\nassert UniqueRollNumbers {\n no disj s1, s2: Student | s1.rollNumber = s2.rollNumber\n}\n\nassert ValidSemesterDates {\n all s: Semester | gt[s.endDate, s.startDate]\n}\n\nassert ValidCourseLoad {\n all s: Student | \n #s.registeredCourses >= 5 implies\n (sum c: s.registeredCourses | c.creditHours) >= 15 and\n (sum c: s.registeredCourses | c.creditHours) <= 18\n}\n\n// Rule 16: No concurrent programs\nfact NoConcurrentPrograms {\n all s: Student | one s.program\n}\n\n// Rule 17: Course addition timeframe\nsig CourseAddRequest {\n student: one Student,\n course: one Course,\n requestWeek: one Int\n}\n\nfact CourseAdditionRules {\n all car: CourseAddRequest | {\n car.requestWeek <= 2\n car.requestWeek > 0\n all p: car.course.prerequisites | p in car.student.registeredCourses\n }\n}\n\n// Rule 18: Incomplete grade handling\nabstract sig Grade {}\none sig Incomplete extends Grade {}\n\nsig CourseGrade {\n course: one Course,\n grade: one Grade\n}\n\n// Additional Summer Rules\nfact AdditionalSummerRules {\n all su: Summer, s: Student, c: Course | {\n c in s.registeredCourses and c in su.courses implies \n c in s.registeredCourses.~courses\n // Above ensures courses were previously registered\n }\n}\n\n// Add to Summer rules\nfact SummerCourseRestrictions {\n all su: Summer, c: Course |\n c in su.courses implies c in (Spring + Fall).courses\n}\n\n// For MS student requirements\nsig MSStudent in Student {\n isNonFastian: one Int // 0 or 1\n}\n\nfact MSStudentRules {\n all s: MSStudent |\n s.isNonFastian = 1 implies\n some c: s.registeredCourses |\n c.name = \"Applied Programming\"\n}\n\n// Run some example\nrun {} for 5\n\n// Check assertions\ncheck UniqueRollNumbers for 5\ncheck ValidSemesterDates for 5\ncheck ValidCourseLoad for 5", "permalink": "alone-happy-tackle-ridden", "time": "2024-11-19 05:35:48.365768", "cmd": 1} {"id": 25692, "parent": 25691, "code": "// Signatures for main entities\nabstract sig Semester {\n startDate: one Time,\n endDate: one Time,\n courses: set Course,\n students: set Student\n}\n\nsig Spring, Fall extends Semester {}\nsig Summer extends Semester {}\n\nsig AcademicYear {\n semesters: set Semester,\n year: one Int\n}\n\nsig Student {\n rollNumber: one Int,\n attendance: set CourseAttendance,\n registeredCourses: set Course,\n scholarshipStatus: lone Scholarship,\n academicWarnings: set AcademicWarning,\n freezeHistory: set Semester,\n feesStatus: one FeesStatus,\n program: one Program\n}\n\nsig Course {\n creditHours: one Int,\n prerequisites: set Course,\n language: one Language,\n instructor: one Faculty,\n name: one String\n}\n\nsig CourseAttendance {\n course: one Course,\n percentage: one Int\n}\n\nabstract sig Language {}\none sig English, Urdu extends Language {}\n\nabstract sig Faculty {}\nsig RegularFaculty, VisitingFaculty extends Faculty {}\n\nsig Scholarship {}\nsig AcademicWarning {}\n\nsig FeesStatus {\n isPaid: one Int, // Using 0 for false, 1 for true\n amount: one Int\n}\n\nsig Program {}\nabstract sig BachelorProgram, MasterProgram extends Program {}\n\nsig Time {}\n\n// Facts defining core constraints\n\n// Semester duration and ordering\nfact SemesterDuration {\n all s: Semester | {\n s.endDate != s.startDate\n gt[s.endDate, s.startDate]\n all sp: Spring | difference[sp.endDate, sp.startDate] = 17\n all f: Fall | difference[f.endDate, f.startDate] = 17\n all su: Summer | difference[su.endDate, su.startDate] = 8\n }\n}\n\n// Academic Year constraints\nfact AcademicYearRules {\n all ay: AcademicYear | {\n #ay.semesters >= 2\n #ay.semesters <= 3\n one s: Spring | s in ay.semesters\n one f: Fall | f in ay.semesters\n lone su: Summer | su in ay.semesters\n }\n}\n\n// Student constraints\nfact StudentRules {\n // Unique roll numbers\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber\n \n // Course registration rules\n all s: Student | {\n // Normal course load\n #s.registeredCourses >= 5 implies (sum c: s.registeredCourses | c.creditHours) >= 15\n (sum c: s.registeredCourses | c.creditHours) <= 18\n \n // Prerequisites must be completed\n all c: s.registeredCourses | all p: c.prerequisites | p in s.registeredCourses\n }\n \n // Attendance rules\n all ca: CourseAttendance | {\n ca.percentage <= 100\n ca.percentage >= 80 // Minimum 80% attendance required\n }\n \n // Freeze semester rules\n all s: Student | #s.freezeHistory <= 2\n}\n\n// Summer semester specific rules\nfact SummerRules {\n all su: Summer | {\n // Max two courses with labs\n all s: Student | #(s.registeredCourses & su.courses) <= 2\n \n // Minimum 10 students per course\n all c: su.courses | #(su.students & c.~registeredCourses) >= 10\n \n // No visiting faculty in summer\n no c: su.courses | c.instructor in VisitingFaculty\n }\n}\n\n// Scholarship rules\nfact ScholarshipRules {\n all s: Student | {\n s.scholarshipStatus != none implies {\n // Full course load required\n #s.registeredCourses = 5\n // Cancel scholarship on academic warning\n some s.academicWarnings implies no s.scholarshipStatus\n }\n }\n}\n\n// Course language rules\nfact LanguageRules {\n all c: Course | {\n c.language = English or \n (c.name = \"Religious and Islamic Studies\" implies \n (c.language = English or c.language = Urdu))\n }\n}\n\n// Fees rules\nfact FeesRules {\n all s: Student | {\n // Must clear previous fees before registration\n s.feesStatus.isPaid = 1 implies s in Semester.students\n \n // Freezing fee\n all sem: s.freezeHistory | some fs: FeesStatus | \n fs.amount = 11000 and fs.isPaid = 1\n }\n}\n\n// Credit exemption rules\npred canExemptCredits[s: Student, c: Course, grade: Int] {\n // For Bachelor programs\n (s.program in BachelorProgram and grade >= 2) or // Assuming C = 2.0\n // For Master programs\n (s.program in MasterProgram and grade >= 3) // Assuming B- = 3.0\n}\n\n// Helper predicate for time comparison\npred gt[t1: Time, t2: Time] {\n t1 != t2\n t2 not in t1.^prev\n}\n\n// Helper function to calculate difference between times\nfun difference[t1: Time, t2: Time]: Int {\n // This is a simplified version - in real implementation would need more complex logic\n #{t: Time | gt[t, t2] and gt[t1, t]}\n}\n\n// Assertions to verify key properties\nassert UniqueRollNumbers {\n no disj s1, s2: Student | s1.rollNumber = s2.rollNumber\n}\n\nassert ValidSemesterDates {\n all s: Semester | gt[s.endDate, s.startDate]\n}\n\nassert ValidCourseLoad {\n all s: Student | \n #s.registeredCourses >= 5 implies\n (sum c: s.registeredCourses | c.creditHours) >= 15 and\n (sum c: s.registeredCourses | c.creditHours) <= 18\n}\n\n// Rule 16: No concurrent programs\nfact NoConcurrentPrograms {\n all s: Student | one s.program\n}\n\n// Rule 17: Course addition timeframe\nsig CourseAddRequest {\n student: one Student,\n course: one Course,\n requestWeek: one Int\n}\n\nfact CourseAdditionRules {\n all car: CourseAddRequest | {\n car.requestWeek <= 2\n car.requestWeek > 0\n all p: car.course.prerequisites | p in car.student.registeredCourses\n }\n}\n\n// Rule 18: Incomplete grade handling\nabstract sig Grade {}\none sig Incomplete extends Grade {}\n\nsig CourseGrade {\n course: one Course,\n grade: one Grade\n}\n\n// Additional Summer Rules\nfact AdditionalSummerRules {\n all su: Summer, s: Student, c: Course | {\n c in s.registeredCourses and c in su.courses implies \n c in s.registeredCourses.~courses\n // Above ensures courses were previously registered\n }\n}\n\n// Add to Summer rules\nfact SummerCourseRestrictions {\n all su: Summer, c: Course |\n c in su.courses implies c in (Spring + Fall).courses\n}\n\n// For MS student requirements\nsig MSStudent in Student {\n isNonFastian: one Int // 0 or 1\n}\n\nfact MSStudentRules {\n all s: MSStudent |\n s.isNonFastian = 1 implies\n some c: s.registeredCourses |\n c.name = \"Applied Programming\"\n}\n\n// Run some example\nrun {} for 5\n\n// Check assertions\ncheck UniqueRollNumbers for 5\ncheck ValidSemesterDates for 5\ncheck ValidCourseLoad for 5", "permalink": "buffer-ground-petite-penpal", "time": "2024-11-25 19:40:05.557061", "cmd": 1} {"id": 24273, "parent": null, "code": "// Signatures for main entities\nabstract sig Semester {\n startDate: one Time,\n endDate: one Time,\n courses: set Course,\n students: set Student\n}\n\nsig Spring, Fall extends Semester {}\nsig Summer extends Semester {}\n\nsig AcademicYear {\n semesters: set Semester,\n year: one Int\n}\n\nsig Student {\n rollNumber: one Int,\n attendance: set CourseAttendance,\n registeredCourses: set Course,\n scholarshipStatus: lone Scholarship,\n academicWarnings: set AcademicWarning,\n freezeHistory: set Semester,\n feesStatus: one FeesStatus,\n program: one Program\n}\n\nsig Course {\n creditHours: one Int,\n prerequisites: set Course,\n language: one Language,\n instructor: one Faculty,\n name: one String\n}\n\nsig CourseAttendance {\n course: one Course,\n percentage: one Int\n}\n\nabstract sig Language {}\none sig English, Urdu extends Language {}\n\nabstract sig Faculty {}\nsig RegularFaculty, VisitingFaculty extends Faculty {}\n\nsig Scholarship {}\nsig AcademicWarning {}\n\nsig FeesStatus {\n isPaid: one Int, // Using 0 for false, 1 for true\n amount: one Int\n}\n\nsig Program {}\nabstract sig BachelorProgram, MasterProgram extends Program {}\n\nsig Time {}\n\n// Facts defining core constraints\n\n// Semester duration and ordering\nfact SemesterDuration {\n all s: Semester | {\n s.endDate != s.startDate\n gt[s.endDate, s.startDate]\n all sp: Spring | difference[sp.endDate, sp.startDate] = 17\n all f: Fall | difference[f.endDate, f.startDate] = 17\n all su: Summer | difference[su.endDate, su.startDate] = 8\n }\n}\n\n// Academic Year constraints\nfact AcademicYearRules {\n all ay: AcademicYear | {\n #ay.semesters >= 2\n #ay.semesters <= 3\n one s: Spring | s in ay.semesters\n one f: Fall | f in ay.semesters\n lone su: Summer | su in ay.semesters\n }\n}\n\n// Student constraints\nfact StudentRules {\n // Unique roll numbers\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber\n \n // Course registration rules\n all s: Student | {\n // Normal course load\n #s.registeredCourses >= 5 implies (sum c: s.registeredCourses | c.creditHours) >= 15\n (sum c: s.registeredCourses | c.creditHours) <= 18\n \n // Prerequisites must be completed\n all c: s.registeredCourses | all p: c.prerequisites | p in s.registeredCourses\n }\n \n // Attendance rules\n all ca: CourseAttendance | {\n ca.percentage <= 100\n ca.percentage >= 80 // Minimum 80% attendance required\n }\n \n // Freeze semester rules\n all s: Student | #s.freezeHistory <= 2\n}\n\n// Summer semester specific rules\nfact SummerRules {\n all su: Summer | {\n // Max two courses with labs\n all s: Student | #(s.registeredCourses & su.courses) <= 2\n \n // Minimum 10 students per course\n all c: su.courses | #(su.students & c.~registeredCourses) >= 10\n \n // No visiting faculty in summer\n no c: su.courses | c.instructor in VisitingFaculty\n }\n}\n\n// Scholarship rules\nfact ScholarshipRules {\n all s: Student | {\n s.scholarshipStatus != none implies {\n // Full course load required\n #s.registeredCourses = 5\n // Cancel scholarship on academic warning\n some s.academicWarnings implies no s.scholarshipStatus\n }\n }\n}\n\n// Course language rules\nfact LanguageRules {\n all c: Course | {\n c.language = English or \n (c.name = \"Religious and Islamic Studies\" implies \n (c.language = English or c.language = Urdu))\n }\n}\n\n// Fees rules\nfact FeesRules {\n all s: Student | {\n // Must clear previous fees before registration\n s.feesStatus.isPaid = 1 implies s in Semester.students\n \n // Freezing fee\n all sem: s.freezeHistory | some fs: FeesStatus | \n fs.amount = 11000 and fs.isPaid = 1\n }\n}\n\n// Credit exemption rules\npred canExemptCredits[s: Student, c: Course, grade: Int] {\n // For Bachelor programs\n (s.program in BachelorProgram and grade >= 2) or // Assuming C = 2.0\n // For Master programs\n (s.program in MasterProgram and grade >= 3) // Assuming B- = 3.0\n}\n\n// Helper predicate for time comparison\npred gt[t1: Time, t2: Time] {\n t1 != t2\n t2 not in t1.^prev\n}\n\n// Helper function to calculate difference between times\nfun difference[t1: Time, t2: Time]: Int {\n // This is a simplified version - in real implementation would need more complex logic\n #{t: Time | gt[t, t2] and gt[t1, t]}\n}\n\n// Assertions to verify key properties\nassert UniqueRollNumbers {\n no disj s1, s2: Student | s1.rollNumber = s2.rollNumber\n}\n\nassert ValidSemesterDates {\n all s: Semester | gt[s.endDate, s.startDate]\n}\n\nassert ValidCourseLoad {\n all s: Student | \n #s.registeredCourses >= 5 implies\n (sum c: s.registeredCourses | c.creditHours) >= 15 and\n (sum c: s.registeredCourses | c.creditHours) <= 18\n}\n\n// Rule 16: No concurrent programs\nfact NoConcurrentPrograms {\n all s: Student | one s.program\n}\n\n// Rule 17: Course addition timeframe\nsig CourseAddRequest {\n student: one Student,\n course: one Course,\n requestWeek: one Int\n}\n\nfact CourseAdditionRules {\n all car: CourseAddRequest | {\n car.requestWeek <= 2\n car.requestWeek > 0\n all p: car.course.prerequisites | p in car.student.registeredCourses\n }\n}\n\n// Rule 18: Incomplete grade handling\nabstract sig Grade {}\none sig Incomplete extends Grade {}\n\nsig CourseGrade {\n course: one Course,\n grade: one Grade\n}\n\n// Additional Summer Rules\nfact AdditionalSummerRules {\n all su: Summer, s: Student, c: Course | {\n c in s.registeredCourses and c in su.courses implies \n c in s.registeredCourses.~courses\n // Above ensures courses were previously registered\n }\n}\n\n// Add to Summer rules\nfact SummerCourseRestrictions {\n all su: Summer, c: Course |\n c in su.courses implies c in (Spring + Fall).courses\n}\n\n// For MS student requirements\nsig MSStudent in Student {\n isNonFastian: one Int // 0 or 1\n}\n\nfact MSStudentRules {\n all s: MSStudent |\n s.isNonFastian = 1 implies\n some c: s.registeredCourses |\n c.name = \"Applied Programming\"\n}\n\n// Run some example\nrun {} for 5\n\n// Check assertions\ncheck UniqueRollNumbers for 5\ncheck ValidSemesterDates for 5\ncheck ValidCourseLoad for 5", "permalink": "dude-suds-trophy-saved", "time": "2024-11-19 09:44:01.679842", "cmd": 1} {"id": 24200, "parent": 24171, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nfun totalBooksBorrowed: Int { #Book & Person.borrowedBooks} \nrun { some p: Person, b: Book | b in p.borrowedBooks } for 6 Book, 6 Person\ncheck NoDuplicateBorrowing", "permalink": "shrimp-purge-snide-pucker", "time": "2024-11-19 05:52:22.981656", "cmd": 1} {"id": 24209, "parent": 24208, "code": "// Basic Time abstraction\nabstract sig Date {}\none sig JunDate, JulyDate extends Date {}\n\n// Academic structure signatures\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n courses: some Course\n}\nsig Spring, Fall extends Semester {}\nsig Summer extends Semester {}\n\nsig AcademicYear {\n semesters: some Semester\n}\n\n// Course related signatures\nabstract sig Course {\n creditHours: one Int,\n prerequisites: set Course,\n instructionLanguage: one Language\n}\n\nabstract sig Language {}\none sig English, Urdu extends Language {}\n\nsig ReligiousStudies extends Course {}\nsig AppliedProgramming extends Course {}\n\n// Student related signatures\nsig Student {\n rollNumber: one Int,\n registeredCourses: set Course,\n attendance: Course -> one Int,\n scholarshipStatus: lone Scholarship,\n academicWarning: lone AcademicWarning,\n freezeStatus: lone FreezeSemester\n}\n\nsig Scholarship {}\nsig AcademicWarning {}\nsig FreezeSemester {\n freezingFee: one Int\n}\n\n// Facts for basic constraints\n\n// Fact 1: Semester duration constraints\nfact SemesterDuration {\n all s: Semester | {\n s.endDate in s.startDate.^next // end date must be after start date\n s in Spring + Fall => #(s.startDate.^next & s.endDate.*prev) = 17 // 17 weeks for Spring/Fall\n s in Summer => #(s.startDate.^next & s.endDate.*prev) = 8 // 8 weeks for Summer\n }\n}\n\n// Fact 2: Academic year constraints\nfact AcademicYearRules {\n all ay: AcademicYear | {\n #ay.semesters >= 2 and #ay.semesters <= 3 // 2-3 semesters per year\n one s: ay.semesters & Spring | some s\n one s: ay.semesters & Fall | some s\n lone s: ay.semesters & Summer | some s // at most one summer semester\n }\n}\n\n// Fact 3: Student roll number uniqueness\nfact UniqueRollNumbers {\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber\n}\n\n// Fact 4: Attendance requirements\nfact AttendanceRules {\n all s: Student, c: Course | {\n s.attendance[c] >= 80 // minimum 80% attendance required\n s.attendance[c] <= 100 // maximum 100% attendance\n }\n}\n\n// Fact 5: Course registration rules\nfact CourseRegistrationRules {\n all s: Student | {\n // Normal course load\n #s.registeredCourses >= 5 and sum(s.registeredCourses.creditHours) >= 15 and \n sum(s.registeredCourses.creditHours) <= 18\n \n // Prerequisites must be satisfied\n all c: s.registeredCourses | c.prerequisites in s.registeredCourses\n \n // Non-FAST MS students must take Applied Programming\n s.scholarshipStatus = none => AppliedProgramming in s.registeredCourses\n }\n}\n\n// Fact 6: Summer semester specific rules\nfact SummerSemesterRules {\n all sem: Summer | {\n #sem.courses <= 2 // maximum two courses\n all c: sem.courses | some s: Student | c in s.registeredCourses // courses must have been previously offered\n #(Student <: registeredCourses.sem.courses) >= 10 // minimum 10 students\n }\n}\n\n// Fact 7: Freezing semester rules\nfact FreezingSemesterRules {\n all s: Student | {\n lone s.freezeStatus // at most one freeze status at a time\n all fs: s.freezeStatus | fs.freezingFee = 11000 // freezing fee amount\n #(Student <: freezeStatus) <= 2 // maximum 2 semesters can be frozen\n }\n}\n\n// Fact 8: Scholarship and Academic Warning\nfact ScholarshipRules {\n all s: Student | {\n s.academicWarning != none => s.scholarshipStatus = none // scholarship cancelled on academic warning\n }\n}\n\n// Assertions for verification\nassert NoConcurrentDegrees {\n all s: Student | #s.registeredCourses <= 6 // maximum courses per semester\n}\n\nassert ValidAttendance {\n all s: Student, c: Course | s.attendance[c] >= 0 and s.attendance[c] <= 100\n}\n\nassert PrerequisitesSatisfied {\n all s: Student, c: s.registeredCourses | c.prerequisites in s.registeredCourses\n}\n\n// Run checks\ncheck NoConcurrentDegrees for 5\ncheck ValidAttendance for 5\ncheck PrerequisitesSatisfied for 5", "permalink": "author-twig-twerp-exile", "time": "2024-11-19 06:09:13.435204", "cmd": 3} {"id": 24207, "parent": null, "code": "// Basic Time abstraction\nabstract sig Date {}\none sig JunDate, JulyDate extends Date {}\n\n// Academic structure signatures\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n courses: some Course\n}\nsig Spring, Fall extends Semester {}\nsig Summer extends Semester {}\n\nsig AcademicYear {\n semesters: some Semester\n}\n\n// Course related signatures\nabstract sig Course {\n creditHours: one Int,\n prerequisites: set Course,\n instructionLanguage: one Language\n}\n\nabstract sig Language {}\none sig English, Urdu extends Language {}\n\nsig ReligiousStudies extends Course {}\nsig AppliedProgramming extends Course {}\n\n// Student related signatures\nsig Student {\n rollNumber: one Int,\n registeredCourses: set Course,\n attendance: Course -> one Int,\n scholarshipStatus: lone Scholarship,\n academicWarning: lone AcademicWarning,\n freezeStatus: lone FreezeSemester\n}\n\nsig Scholarship {}\nsig AcademicWarning {}\nsig FreezeSemester {\n freezingFee: one Int\n}\n\n// Facts for basic constraints\n\n// Fact 1: Semester duration constraints\nfact SemesterDuration {\n all s: Semester | {\n s.endDate in s.startDate.^next // end date must be after start date\n s in Spring + Fall => #(s.startDate.^next & s.endDate.*prev) = 17 // 17 weeks for Spring/Fall\n s in Summer => #(s.startDate.^next & s.endDate.*prev) = 8 // 8 weeks for Summer\n }\n}\n\n// Fact 2: Academic year constraints\nfact AcademicYearRules {\n all ay: AcademicYear | {\n #ay.semesters >= 2 and #ay.semesters <= 3 // 2-3 semesters per year\n one s: ay.semesters & Spring | some s\n one s: ay.semesters & Fall | some s\n lone s: ay.semesters & Summer | some s // at most one summer semester\n }\n}\n\n// Fact 3: Student roll number uniqueness\nfact UniqueRollNumbers {\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber\n}\n\n// Fact 4: Attendance requirements\nfact AttendanceRules {\n all s: Student, c: Course | {\n s.attendance[c] >= 80 // minimum 80% attendance required\n s.attendance[c] <= 100 // maximum 100% attendance\n }\n}\n\n// Fact 5: Course registration rules\nfact CourseRegistrationRules {\n all s: Student | {\n // Normal course load\n #s.registeredCourses >= 5 and sum(s.registeredCourses.creditHours) >= 15 and \n sum(s.registeredCourses.creditHours) <= 18\n \n // Prerequisites must be satisfied\n all c: s.registeredCourses | c.prerequisites in s.registeredCourses\n \n // Non-FAST MS students must take Applied Programming\n s.scholarshipStatus = none => AppliedProgramming in s.registeredCourses\n }\n}\n\n// Fact 6: Summer semester specific rules\nfact SummerSemesterRules {\n all sem: Summer | {\n #sem.courses <= 2 // maximum two courses\n all c: sem.courses | some s: Student | c in s.registeredCourses // courses must have been previously offered\n #(Student <: registeredCourses.sem.courses) >= 10 // minimum 10 students\n }\n}\n\n// Fact 7: Freezing semester rules\nfact FreezingSemesterRules {\n all s: Student | {\n lone s.freezeStatus // at most one freeze status at a time\n all fs: s.freezeStatus | fs.freezingFee = 11000 // freezing fee amount\n #(Student <: freezeStatus) <= 2 // maximum 2 semesters can be frozen\n }\n}\n\n// Fact 8: Scholarship and Academic Warning\nfact ScholarshipRules {\n all s: Student | {\n s.academicWarning != none => s.scholarshipStatus = none // scholarship cancelled on academic warning\n }\n}\n\n// Assertions for verification\nassert NoConcurrentDegrees {\n all s: Student | #s.registeredCourses <= 6 // maximum courses per semester\n}\n\nassert ValidAttendance {\n all s: Student, c: Course | s.attendance[c] >= 0 and s.attendance[c] <= 100\n}\n\nassert PrerequisitesSatisfied {\n all s: Student, c: s.registeredCourses | c.prerequisites in s.registeredCourses\n}\n\n// Run checks\ncheck NoConcurrentDegrees for 5\ncheck ValidAttendance for 5\ncheck PrerequisitesSatisfied for 5", "permalink": "lint-asleep-bakery-vowel", "time": "2024-11-19 06:08:54.291424", "cmd": 1} {"id": 24208, "parent": 24207, "code": "// Basic Time abstraction\nabstract sig Date {}\none sig JunDate, JulyDate extends Date {}\n\n// Academic structure signatures\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n courses: some Course\n}\nsig Spring, Fall extends Semester {}\nsig Summer extends Semester {}\n\nsig AcademicYear {\n semesters: some Semester\n}\n\n// Course related signatures\nabstract sig Course {\n creditHours: one Int,\n prerequisites: set Course,\n instructionLanguage: one Language\n}\n\nabstract sig Language {}\none sig English, Urdu extends Language {}\n\nsig ReligiousStudies extends Course {}\nsig AppliedProgramming extends Course {}\n\n// Student related signatures\nsig Student {\n rollNumber: one Int,\n registeredCourses: set Course,\n attendance: Course -> one Int,\n scholarshipStatus: lone Scholarship,\n academicWarning: lone AcademicWarning,\n freezeStatus: lone FreezeSemester\n}\n\nsig Scholarship {}\nsig AcademicWarning {}\nsig FreezeSemester {\n freezingFee: one Int\n}\n\n// Facts for basic constraints\n\n// Fact 1: Semester duration constraints\nfact SemesterDuration {\n all s: Semester | {\n s.endDate in s.startDate.^next // end date must be after start date\n s in Spring + Fall => #(s.startDate.^next & s.endDate.*prev) = 17 // 17 weeks for Spring/Fall\n s in Summer => #(s.startDate.^next & s.endDate.*prev) = 8 // 8 weeks for Summer\n }\n}\n\n// Fact 2: Academic year constraints\nfact AcademicYearRules {\n all ay: AcademicYear | {\n #ay.semesters >= 2 and #ay.semesters <= 3 // 2-3 semesters per year\n one s: ay.semesters & Spring | some s\n one s: ay.semesters & Fall | some s\n lone s: ay.semesters & Summer | some s // at most one summer semester\n }\n}\n\n// Fact 3: Student roll number uniqueness\nfact UniqueRollNumbers {\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber\n}\n\n// Fact 4: Attendance requirements\nfact AttendanceRules {\n all s: Student, c: Course | {\n s.attendance[c] >= 80 // minimum 80% attendance required\n s.attendance[c] <= 100 // maximum 100% attendance\n }\n}\n\n// Fact 5: Course registration rules\nfact CourseRegistrationRules {\n all s: Student | {\n // Normal course load\n #s.registeredCourses >= 5 and sum(s.registeredCourses.creditHours) >= 15 and \n sum(s.registeredCourses.creditHours) <= 18\n \n // Prerequisites must be satisfied\n all c: s.registeredCourses | c.prerequisites in s.registeredCourses\n \n // Non-FAST MS students must take Applied Programming\n s.scholarshipStatus = none => AppliedProgramming in s.registeredCourses\n }\n}\n\n// Fact 6: Summer semester specific rules\nfact SummerSemesterRules {\n all sem: Summer | {\n #sem.courses <= 2 // maximum two courses\n all c: sem.courses | some s: Student | c in s.registeredCourses // courses must have been previously offered\n #(Student <: registeredCourses.sem.courses) >= 10 // minimum 10 students\n }\n}\n\n// Fact 7: Freezing semester rules\nfact FreezingSemesterRules {\n all s: Student | {\n lone s.freezeStatus // at most one freeze status at a time\n all fs: s.freezeStatus | fs.freezingFee = 11000 // freezing fee amount\n #(Student <: freezeStatus) <= 2 // maximum 2 semesters can be frozen\n }\n}\n\n// Fact 8: Scholarship and Academic Warning\nfact ScholarshipRules {\n all s: Student | {\n s.academicWarning != none => s.scholarshipStatus = none // scholarship cancelled on academic warning\n }\n}\n\n// Assertions for verification\nassert NoConcurrentDegrees {\n all s: Student | #s.registeredCourses <= 6 // maximum courses per semester\n}\n\nassert ValidAttendance {\n all s: Student, c: Course | s.attendance[c] >= 0 and s.attendance[c] <= 100\n}\n\nassert PrerequisitesSatisfied {\n all s: Student, c: s.registeredCourses | c.prerequisites in s.registeredCourses\n}\n\n// Run checks\ncheck NoConcurrentDegrees for 5\ncheck ValidAttendance for 5\ncheck PrerequisitesSatisfied for 5", "permalink": "neatly-calm-panda-creole", "time": "2024-11-19 06:09:00.483720", "cmd": 2} {"id": 24211, "parent": 24209, "code": "// Basic Time abstraction\nabstract sig Date {}\none sig JunDate, JulyDate extends Date {}\n\n// Academic structure signatures\nabstract sig Semester {\n startDate: one Date,\n endDate: one Date,\n courses: some Course\n}\nsig Spring, Fall extends Semester {}\nsig Summer extends Semester {}\n\nsig AcademicYear {\n semesters: some Semester\n}\n\n// Course related signatures\nabstract sig Course {\n creditHours: one Int,\n prerequisites: set Course,\n instructionLanguage: one Language\n}\n\nabstract sig Language {}\none sig English, Urdu extends Language {}\n\nsig ReligiousStudies extends Course {}\nsig AppliedProgramming extends Course {}\n\n// Student related signatures\nsig Student {\n rollNumber: one Int,\n registeredCourses: set Course,\n attendance: Course -> one Int,\n scholarshipStatus: lone Scholarship,\n academicWarning: lone AcademicWarning,\n freezeStatus: lone FreezeSemester\n}\n\nsig Scholarship {}\nsig AcademicWarning {}\nsig FreezeSemester {\n freezingFee: one Int\n}\n\n// Facts for basic constraints\n\n// Fact 1: Semester duration constraints\nfact SemesterDuration {\n all s: Semester | {\n s.endDate in s.startDate.^next // end date must be after start date\n s in Spring + Fall => #(s.startDate.^next & s.endDate.*prev) = 17 // 17 weeks for Spring/Fall\n s in Summer => #(s.startDate.^next & s.endDate.*prev) = 8 // 8 weeks for Summer\n }\n}\n\n// Fact 2: Academic year constraints\nfact AcademicYearRules {\n all ay: AcademicYear | {\n #ay.semesters >= 2 and #ay.semesters <= 3 // 2-3 semesters per year\n one s: ay.semesters & Spring | some s\n one s: ay.semesters & Fall | some s\n lone s: ay.semesters & Summer | some s // at most one summer semester\n }\n}\n\n// Fact 3: Student roll number uniqueness\nfact UniqueRollNumbers {\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber\n}\n\n// Fact 4: Attendance requirements\nfact AttendanceRules {\n all s: Student, c: Course | {\n s.attendance[c] >= 80 // minimum 80% attendance required\n s.attendance[c] <= 100 // maximum 100% attendance\n }\n}\n\n// Fact 5: Course registration rules\nfact CourseRegistrationRules {\n all s: Student | {\n // Normal course load\n #s.registeredCourses >= 5 and sum(s.registeredCourses.creditHours) >= 15 and \n sum(s.registeredCourses.creditHours) <= 18\n \n // Prerequisites must be satisfied\n all c: s.registeredCourses | c.prerequisites in s.registeredCourses\n \n // Non-FAST MS students must take Applied Programming\n s.scholarshipStatus = none => AppliedProgramming in s.registeredCourses\n }\n}\n\n// Fact 6: Summer semester specific rules\nfact SummerSemesterRules {\n all sem: Summer | {\n #sem.courses <= 2 // maximum two courses\n all c: sem.courses | some s: Student | c in s.registeredCourses // courses must have been previously offered\n #(Student <: registeredCourses.sem.courses) >= 10 // minimum 10 students\n }\n}\n\n// Fact 7: Freezing semester rules\nfact FreezingSemesterRules {\n all s: Student | {\n lone s.freezeStatus // at most one freeze status at a time\n all fs: s.freezeStatus | fs.freezingFee = 11000 // freezing fee amount\n #(Student <: freezeStatus) <= 2 // maximum 2 semesters can be frozen\n }\n}\n\n// Fact 8: Scholarship and Academic Warning\nfact ScholarshipRules {\n all s: Student | {\n s.academicWarning != none => s.scholarshipStatus = none // scholarship cancelled on academic warning\n }\n}\n\n// Assertions for verification\nassert NoConcurrentDegrees {\n all s: Student | #s.registeredCourses <= 6 // maximum courses per semester\n}\n\nassert ValidAttendance {\n all s: Student, c: Course | s.attendance[c] >= 0 and s.attendance[c] <= 100\n}\n\nassert PrerequisitesSatisfied {\n all s: Student, c: s.registeredCourses | c.prerequisites in s.registeredCourses\n}\n\n// Run checks\ncheck NoConcurrentDegrees for 5\ncheck ValidAttendance for 5\ncheck PrerequisitesSatisfied for 5\nrun NoConcurrentDegrees for 3", "permalink": "wince-defile-revise-flame", "time": "2024-11-19 06:09:58.852952", "cmd": 4} {"id": 24214, "parent": 24211, "code": "// Utility signatures for integers\nabstract sig TimeUnit {}\none sig Week1, Week2, Week3, Week4, Week5, Week6, Week7, Week8, Week9, Week10,\n Week11, Week12, Week13, Week14, Week15, Week16, Week17 extends TimeUnit {}\n\n// Academic structure signatures\nabstract sig Semester {\n weeks: set TimeUnit,\n courses: set Course\n}\nsig Spring, Fall extends Semester {}\nsig Summer extends Semester {}\n\nsig AcademicYear {\n semesters: some Semester\n}\n\n// Course related signatures\nabstract sig Course {\n prerequisites: set Course,\n credits: Int\n}\n{\n credits >= 2 and credits <= 4 // realistic credit hour range\n}\n\nsig RegularCourse extends Course {}\nsig ReligiousStudies extends Course {}\nsig AppliedProgramming extends Course {}\n\n// Student related signatures\nsig Student {\n rollNumber: Int,\n registeredCourses: set Course,\n attendance: Course -> one Int,\n status: lone Status\n}\n\nabstract sig Status {}\none sig Regular, Scholarship, AcademicWarning, Frozen extends Status {}\n\n// Facts\n\n// Fact 1: Semester duration constraints\nfact SemesterDuration {\n all s: Spring + Fall | #s.weeks = 17\n all s: Summer | #s.weeks = 8\n}\n\n// Fact 2: Academic year constraints\nfact AcademicYearRules {\n all ay: AcademicYear | {\n #ay.semesters >= 2 and #ay.semesters <= 3\n one s: ay.semesters & Spring\n one s: ay.semesters & Fall\n lone s: ay.semesters & Summer\n }\n}\n\n// Fact 3: Roll number uniqueness\nfact UniqueRollNumbers {\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber\n}\n\n// Fact 4: Course registration rules\nfact CourseRegistrationRules {\n all s: Student | {\n s.status != Frozen => {\n #s.registeredCourses >= 3 and #s.registeredCourses <= 6\n all c: s.registeredCourses | {\n // Prerequisites must be satisfied\n c.prerequisites in s.registeredCourses\n }\n }\n }\n}\n\n// Fact 5: Summer semester specific rules\nfact SummerSemesterRules {\n all sem: Summer | {\n #sem.courses <= 2 // maximum two courses\n some s: Student | some s.registeredCourses & sem.courses // at least one student\n }\n}\n\n// Fact 6: Attendance tracking\nfact AttendanceRules {\n all s: Student, c: s.registeredCourses | {\n s.attendance[c] >= 0 and s.attendance[c] <= 100\n s.status != Frozen => s.attendance[c] >= 80 // minimum attendance requirement\n }\n}\n\n// Fact 7: Scholarship rules\nfact ScholarshipRules {\n all s: Student | {\n s.status = AcademicWarning => s.status != Scholarship\n s.status = Frozen => #s.registeredCourses = 0\n }\n}\n\n// Predicates for testing\npred show() {\n #Student > 2\n #Course > 3\n some Summer\n}\n\nrun show for 5 but exactly 1 AcademicYear", "permalink": "clump-ditzy-gift-trough", "time": "2024-11-19 06:12:09.669766", "cmd": 1} {"id": 24215, "parent": 24214, "code": "module academicRules\n\n// Basic signatures for courses and credits\nsig Course {\n prerequisites: set Course,\n credits: one Int\n} {\n credits >= 2 and credits <= 4\n}\n\n// Semester types\nabstract sig Semester {\n courses: set Course,\n duration: one Int\n}\n\nsig Spring, Fall extends Semester {} {\n duration = 17\n}\n\nsig Summer extends Semester {} {\n duration = 8\n}\n\n// Academic Year containing semesters\nsig AcademicYear {\n semesters: some Semester\n}\n\n// Student representation\nsig Student {\n rollNumber: one Int,\n registeredCourses: set Course,\n attendance: Course -> one Int,\n isScholarship: one Bool,\n isFrozen: one Bool,\n hasWarning: one Bool\n}\n\n// Boolean values\nabstract sig Bool {}\none sig True, False extends Bool {}\n\n// Facts defining the rules\n\n// Fact 1: Academic Year structure\nfact AcademicYearRules {\n // Each academic year must have 2-3 semesters\n all ay: AcademicYear | {\n #ay.semesters >= 2\n #ay.semesters <= 3\n one s: ay.semesters & Spring\n one s: ay.semesters & Fall\n lone s: ay.semesters & Summer\n }\n}\n\n// Fact 2: Course Registration Rules\nfact CourseRegistrationRules {\n all s: Student | {\n s.isFrozen = False implies {\n // Normal course load\n #s.registeredCourses >= 3\n #s.registeredCourses <= 6\n \n // Credit hours constraint\n sum c: s.registeredCourses | c.credits >= 15\n sum c: s.registeredCourses | c.credits <= 18\n \n // Prerequisites must be satisfied\n all c: s.registeredCourses | c.prerequisites in s.registeredCourses\n }\n }\n}\n\n// Fact 3: Unique Roll Numbers\nfact UniqueRollNumbers {\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber\n}\n\n// Fact 4: Attendance Rules\nfact AttendanceRules {\n all s: Student | all c: s.registeredCourses | {\n s.attendance[c] >= 0\n s.attendance[c] <= 100\n s.isFrozen = False implies s.attendance[c] >= 80\n }\n}\n\n// Fact 5: Summer Semester Rules\nfact SummerSemesterRules {\n all s: Summer | {\n #s.courses <= 2\n some st: Student | some st.registeredCourses & s.courses\n #(Student <: registeredCourses.s.courses) >= 2 // at least 2 students\n }\n}\n\n// Fact 6: Scholarship Rules\nfact ScholarshipRules {\n all s: Student | {\n s.hasWarning = True implies s.isScholarship = False\n s.isFrozen = True implies #s.registeredCourses = 0\n }\n}\n\n// Predicates for testing scenarios\npred showBasicSystem() {\n #Student > 2\n #Course > 3\n some Summer\n some s: Student | s.isScholarship = True\n some s: Student | s.hasWarning = True\n}\n\n// Run command to generate instances\nrun showBasicSystem for 4 but exactly 1 AcademicYear", "permalink": "chili-ploy-octane-hassle", "time": "2024-11-19 06:14:30.287504", "cmd": 1} {"id": 24216, "parent": 24215, "code": "module academicRules\n\n// Basic signatures for courses and credits\nsig Course {\n prerequisites: set Course,\n credits: one Int\n} {\n credits >= 2 and credits <= 4\n}\n\n// Semester types\nabstract sig Semester {\n courses: set Course,\n duration: one Int\n}\n\nsig Spring, Fall extends Semester {} {\n duration = 17\n}\n\nsig Summer extends Semester {} {\n duration = 8\n}\n\n// Academic Year containing semesters\nsig AcademicYear {\n semesters: some Semester\n}\n\n// Student representation\nsig Student {\n rollNumber: one Int,\n registeredCourses: set Course,\n attendance: Course -> one Int,\n isScholarship: one Bool,\n isFrozen: one Bool,\n hasWarning: one Bool\n}\n\n// Boolean values\nabstract sig Bool {}\none sig True, False extends Bool {}\n\n// Facts defining the rules\n\n// Fact 1: Academic Year structure\nfact AcademicYearRules {\n // Each academic year must have 2-3 semesters\n all ay: AcademicYear | {\n #ay.semesters >= 2\n #ay.semesters <= 3\n one s: ay.semesters & Spring\n one s: ay.semesters & Fall\n lone s: ay.semesters & Summer\n }\n}\n\n// Fact 2: Course Registration Rules\nfact CourseRegistrationRules {\n all s: Student | {\n s.isFrozen = False implies {\n // Normal course load\n #s.registeredCourses >= 3\n #s.registeredCourses <= 6\n \n // Credit hours constraint\n sum c: s.registeredCourses | c.credits >= 15\n sum c: s.registeredCourses | c.credits <= 18\n \n // Prerequisites must be satisfied\n all c: s.registeredCourses | c.prerequisites in s.registeredCourses\n }\n }\n}\n\n// Fact 3: Unique Roll Numbers\nfact UniqueRollNumbers {\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber\n}\n\n// Fact 4: Attendance Rules\nfact AttendanceRules {\n all s: Student | all c: s.registeredCourses | {\n s.attendance[c] >= 0\n s.attendance[c] <= 100\n s.isFrozen = False implies s.attendance[c] >= 80\n }\n}\n\n// Fact 5: Summer Semester Rules\nfact SummerSemesterRules {\n all s: Summer | {\n #s.courses <= 2\n some st: Student | some st.registeredCourses & s.courses\n #(Student <: registeredCourses.s.courses) >= 2 // at least 2 students\n }\n}\n\n// Fact 6: Scholarship Rules\nfact ScholarshipRules {\n all s: Student | {\n s.hasWarning = True implies s.isScholarship = False\n s.isFrozen = True implies #s.registeredCourses = 0\n }\n}\n\n// Predicates for testing scenarios\npred showBasicSystem() {\n #Student > 2\n #Course > 3\n some Summer\n some s: Student | s.isScholarship = True\n some s: Student | s.hasWarning = True\n}\n\n// Run command to generate instances\nrun showBasicSystem for 4 but exactly 1 AcademicYear", "permalink": "boney-abroad-tiny-grout", "time": "2024-11-19 06:14:33.240282", "cmd": 1} {"id": 28700, "parent": 28699, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 6 Book, 6 Person\ncheck NoDuplicateBorrowing", "permalink": "making-stitch-goofy-parole", "time": "2024-12-14 19:23:28.556975", "cmd": 2} {"id": 24217, "parent": 24200, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 6 Book, 6 Person\ncheck NoDuplicateBorrowing", "permalink": "purse-filth-jiffy-retry", "time": "2024-11-19 06:31:57.099272", "cmd": 2} {"id": 27778, "parent": 27777, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 6 Book, 6 Person\ncheck NoDuplicateBorrowing", "permalink": "mayday-smooth-module-expert", "time": "2024-11-27 13:37:39.157503", "cmd": 2} {"id": 28699, "parent": 27778, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\nfact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 6 Book, 6 Person\ncheck NoDuplicateBorrowing", "permalink": "liquid-refund-usable-sage", "time": "2024-12-14 19:23:16.694464", "cmd": 1} {"id": 24218, "parent": 24217, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\n#fact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 6 Book, 6 Person\ncheck NoDuplicateBorrowing", "permalink": "eject-racoon-brunt-spree", "time": "2024-11-19 06:32:30.121141", "cmd": 2} {"id": 24219, "parent": 24218, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\n//fact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 6 Book, 6 Person\ncheck NoDuplicateBorrowing", "permalink": "around-grip-rebuff-spiral", "time": "2024-11-19 06:32:37.847677", "cmd": 2} {"id": 24220, "parent": 24218, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\n//fact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 6 Book, 6 Person\ncheck NoDuplicateBorrowing", "permalink": "friend-cope-hurry-garter", "time": "2024-11-19 06:32:55.005996", "cmd": 2} {"id": 27777, "parent": null, "code": "sig Book {}\nsig Person {borrowedBooks: set Book }\n//fact UniqueBorrow { all b: Book | lone b.~borrowedBooks }\nassert NoDuplicateBorrowing { all p: Person | lone p.borrowedBooks }\npred borrowBook(p: Person, b: Book) { b in p.borrowedBooks }\nrun { some p: Person, b: Book | b in p.borrowedBooks } for 6 Book, 6 Person\ncheck NoDuplicateBorrowing", "permalink": "septum-squid-lunar-caress", "time": "2024-11-27 13:36:34.156307", "cmd": 2} {"id": 24221, "parent": null, "code": "//Anum Batool (anonymized)\n\n//***** Signatures *****//\n//Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester\nabstract sig Semester {\n duration: Int, //weeks\n startDate: Int, //nth day of the year\n endDate: Int //nth day of the year\n}\nsig Spring, Summer, Fall extends Semester {}\n\n//Course\nsig Course {\n name: one String,\n\n}\n\n//Student\n\n//***** Facts and Assertions *****//\n//Academic Year Constraints\nfact AcademicYearConstraint {\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 && #ay.semesters <= 3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional Summer semester\n lone su: Summer | su in ay.semesters\n\n //Three semesters imply third is Summer\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n\n//Semester Date and Duration Constraints\nfact SemesterDateConstraints {\n all s: Semester | s.endDate > s.startDate\n \n // Duration for Spring, Fall, and Summer\n all sp: Spring | sp.duration = 17\n \n\n all fl: Fall | fl.duration = 17\n all su: Summer | su.duration = 8\n \n //Summer semester date constraints\n all su: Summer | ValidSummerDay[su]\n}\n\n// Valid Summer Semester Dates\npred ValidSummerDay [s: Summer] {\n s.startDate >= 151 && s.startDate <= 181 && \n s.endDate > s.startDate\n}\n\n// Test the model\nrun {} for 3", "permalink": "chump-curry-kung-capped", "time": "2024-11-19 06:48:07.755050", "cmd": 1} {"id": 24222, "parent": 24221, "code": "//Anum Batool (anonymized)\n\n//***** Signatures *****//\n//Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester\nabstract sig Semester {\n duration: Int, //weeks\n startDate: Int, //nth day of the year\n endDate: Int //nth day of the year\n}\nsig Spring, Summer, Fall extends Semester {}\n\n//Course\nsig Course {\n name: one String,\n\n}\n\n//Student\n\n//***** Facts and Assertions *****//\n//Academic Year Constraints\nfact AcademicYearConstraint {\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 && #ay.semesters <= 3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional Summer semester\n lone su: Summer | su in ay.semesters\n\n //Three semesters imply third is Summer\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n\n//Semester Date and Duration Constraints\nfact SemesterDateConstraints {\n all s: Semester | s.endDate > s.startDate\n \n // Duration for Spring, Fall, and Summer\n all sp: Spring | sp.duration >= 17\n \n\n all fl: Fall | fl.duration = 17\n all su: Summer | su.duration = 8\n \n //Summer semester date constraints\n all su: Summer | ValidSummerDay[su]\n}\n\n// Valid Summer Semester Dates\npred ValidSummerDay [s: Summer] {\n s.startDate >= 151 && s.startDate <= 181 && \n s.endDate > s.startDate\n}\n\n// Test the model\nrun {} for 3", "permalink": "claw-unroll-pretty-apron", "time": "2024-11-19 07:27:21.742944", "cmd": 1} {"id": 24223, "parent": 24222, "code": "//Anum Batool (anonymized)\nutil/int\n//***** Signatures *****//\n//Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester\nabstract sig Semester {\n duration: Int, //weeks\n startDate: Int, //nth day of the year\n endDate: Int //nth day of the year\n}\nsig Spring, Summer, Fall extends Semester {}\n\n//Course\nsig Course {\n name: one String,\n\n}\n\n//Student\n\n//***** Facts and Assertions *****//\n//Academic Year Constraints\nfact AcademicYearConstraint {\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 && #ay.semesters <= 3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional Summer semester\n lone su: Summer | su in ay.semesters\n\n //Three semesters imply third is Summer\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n\n//Semester Date and Duration Constraints\nfact SemesterDateConstraints {\n all s: Semester | s.endDate > s.startDate\n \n // Duration for Spring, Fall, and Summer\n all sp: Spring | sp.duration >= 17\n \n\n all fl: Fall | fl.duration >= 17\n all su: Summer | su.duration = 8\n \n //Summer semester date constraints\n all su: Summer | ValidSummerDay[su]\n}\n\n// Valid Summer Semester Dates\npred ValidSummerDay [s: Summer] {\n s.startDate >= 151 && s.startDate <= 181 && \n s.endDate > s.startDate\n}\n\n// Test the model\nrun {} for 3", "permalink": "basics-retool-mumbo-muppet", "time": "2024-11-19 07:34:10.098375", "cmd": 1} {"id": 24224, "parent": 24223, "code": "//Anum Batool (anonymized)\nopen util/int\n//***** Signatures *****//\n//Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester\nabstract sig Semester {\n duration: Int, //weeks\n startDate: Int, //nth day of the year\n endDate: Int //nth day of the year\n}\nsig Spring, Summer, Fall extends Semester {}\n\n//Course\nsig Course {\n name: one String,\n\n}\n\n//Student\n\n//***** Facts and Assertions *****//\n//Academic Year Constraints\nfact AcademicYearConstraint {\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 && #ay.semesters <= 3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional Summer semester\n lone su: Summer | su in ay.semesters\n\n //Three semesters imply third is Summer\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n\n//Semester Date and Duration Constraints\nfact SemesterDateConstraints {\n all s: Semester | s.endDate > s.startDate\n \n // Duration for Spring, Fall, and Summer\n all sp: Spring | sp.duration >= 17\n \n\n all fl: Fall | fl.duration >= 17\n all su: Summer | su.duration = 8\n \n //Summer semester date constraints\n all su: Summer | ValidSummerDay[su]\n}\n\n// Valid Summer Semester Dates\npred ValidSummerDay [s: Summer] {\n s.startDate >= 151 && s.startDate <= 181 && \n s.endDate > s.startDate\n}\n\n// Test the model\nrun {} for 3", "permalink": "wolf-trifle-pastel-jawed", "time": "2024-11-19 07:34:39.769622", "cmd": 1} {"id": 24225, "parent": 24224, "code": "//Anum Batool (anonymized)\nopen util/integer\n//***** Signatures *****//\n//Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semester\nabstract sig Semester {\n duration: Int, //weeks\n startDate: Int, //nth day of the year\n endDate: Int //nth day of the year\n}\nsig Spring, Summer, Fall extends Semester {}\n\n//Course\nsig Course {\n name: one String,\n\n}\n\n//Student\n\n//***** Facts and Assertions *****//\n//Academic Year Constraints\nfact AcademicYearConstraint {\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 && #ay.semesters <= 3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional Summer semester\n lone su: Summer | su in ay.semesters\n\n //Three semesters imply third is Summer\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n\n//Semester Date and Duration Constraints\nfact SemesterDateConstraints {\n all s: Semester | s.endDate > s.startDate\n \n // Duration for Spring, Fall, and Summer\n all sp: Spring | sp.duration >= 17\n \n\n all fl: Fall | fl.duration >= 17\n all su: Summer | su.duration = 8\n \n //Summer semester date constraints\n all su: Summer | ValidSummerDay[su]\n}\n\n// Valid Summer Semester Dates\npred ValidSummerDay [s: Summer] {\n s.startDate >= 151 && s.startDate <= 181 && \n s.endDate > s.startDate\n}\n\n// Test the model\nrun {} for 3", "permalink": "tibia-sludge-onion-slurp", "time": "2024-11-19 07:35:42.141590", "cmd": 1} {"id": 24226, "parent": null, "code": "//Anum Batool (anonymized)\nopen util/integer\n\n//***** Signatures *****//\n//Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semesters\nabstract sig Semester{}\nsig Spring, Summer, Fall extends Semester {}\n\n\n//***** Facts and Assertions *****//\n//*** Academic Year (1 and 4)***//\nfact AcademicYearConstraint {\n all ay: AcademicYear | {\n //Number of semester constraint\n #ay.semesters >= 2 and #ay.semesters <= 3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional Summer semester\n lone su: Summer | su in ay.semesters\n\n //Three semesters imply third is Summer\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n\n\nrun {} for 3", "permalink": "diner-xbox-oyster-bogus", "time": "2024-11-19 07:52:03.998968", "cmd": 1} {"id": 24227, "parent": 24226, "code": "//Anum Batool (anonymized)\nopen util/integer\n\n//***** Signatures *****//\n//Academic Year\nsig AcademicYear {\n semesters: some Semester\n}\n\n//Semesters\nabstract sig Semester{}\nsig Spring, Summer, Fall extends Semester {}\n\n\n//***** Facts and Assertions *****//\n//*** Academic Year (1 and 4)***//\nfact AcademicYearConstraint {\n all ay: AcademicYear | {\n //Number of semester constraint\n #ay.semesters >= 2 and #ay.semesters <= 3\n\n //Mandatory Semesters Spring and Fall\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional Summer semester\n lone su: Summer | su in ay.semesters\n\n //Three semesters imply third is Summer\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n\n\nrun {} for 3", "permalink": "jam-cabana-amid-oxford", "time": "2024-11-19 07:54:20.985908", "cmd": 1} {"id": 24266, "parent": 24265, "code": "// 1. Basic Academic Structure Signatures\nabstract sig Semester {\n startDate: Int, // Start date of the semester\n endDate: Int, // End date of the semester\n weeks: Int // Duration in weeks\n}\none sig Spring, Fall extends Semester {} // Regular Semesters\nlone sig Summer extends Semester {} // Optional Summer Semester\n\nsig AcademicYear {\n semesters: set Semester // Semesters in academic year\n}\n\nsig Campus {} // For summer campus rules\n\n// 2. Academic Personnel Signatures\nsig Faculty {\n isVisiting: Bool // Tracks visiting faculty status\n}\n\n// 3. Course and Language Related Signatures\nabstract sig Language {}\none sig English, Urdu extends Language {} // Language options for courses\n\nabstract sig Grade {}\none sig GradeA, GradeB, GradeC, GradeBMinus, GradeF extends Grade {} // Grade classifications\n\nsig Course {\n name: String, // Course name\n creditHours: Int, // Credit hours\n preReq: set Course, // Pre-requisite courses\n isMandatory: Bool, // Mandatory status\n isIncomplete: Bool, // Incomplete status\n faculty: Faculty, // Assigned faculty\n language: Language, // Instruction language\n grade: Grade // Course grade\n}\n\n// 4. Student and Program Signatures\nsig DegreeProgram {\n name: String, // Program name\n isConcurrentAllowed: Bool // Concurrent admission status\n}\n\nabstract sig FeeStatus {}\none sig Paid, Frozen extends FeeStatus {} // Fee payment status\n\nsig Student {\n // Basic Information\n rollNumber: Int, // Unique identifier\n attendance: Int, // Attendance percentage\n \n // Academic Status\n isScholarship: Bool, // Scholarship status\n isInAcademicWarning: Bool,// Academic warning status\n isNewStudent: Bool, // New student status\n \n // Course Registration\n courses: set Course, // Registered courses\n registeredCredits: Int, // Total credit hours\n degreeProgram: DegreeProgram, // Enrolled program\n \n // Financial Status\n feesPaid: Bool, // Fee payment status\n feeStatus: FeeStatus, // Current fee status\n previousDuesCleared: Bool,// Previous dues clearance\n freezingFeeAdvancePaid: Bool, // Freezing fee status\n \n // Administrative\n frozenSemesters: Int, // Number of frozen semesters\n studyCampus: Campus // Campus location\n}\n\n// 5. Facts - Academic Calendar Rules\nfact SemesterRules {\n // Rule 1-4: Semester structure\n all ay: AcademicYear | {\n // Mandatory Spring and Fall semesters\n Spring in ay.semesters and Fall in ay.semesters\n // Optional Summer semester\n Summer in ay.semesters implies #ay.semesters = 3\n // Semester durations\n Spring.weeks = 17\n Fall.weeks = 17\n Summer.weeks = 8\n // Valid semester dates\n all s: Semester | s.startDate < s.endDate\n }\n}\n\n// 6. Facts - Student Academic Rules\nfact StudentRules {\n // Rule 5: Unique roll numbers\n all s1, s2: Student | s1 != s2 implies s1.rollNumber != s2.rollNumber\n \n // Rule 6: Attendance requirements with condonation\n all s: Student | {\n s.attendance >= 80 or \n (s.attendance < 80 implies all c: s.courses | c.isIncomplete = true)\n }\n \n // Rule 16: Concurrent admission restriction\n all s: Student | not s.degreeProgram.isConcurrentAllowed\n}\n\n// 7. Facts - Course Registration Rules\nfact CourseRegistrationRules {\n // Rule 8-9: Course load requirements\n all s: Student | {\n // New student course load\n s.isNewStudent implies {\n #s.courses = 5\n s.registeredCredits >= 15 and s.registeredCredits <= 18\n }\n \n // Applied Programming requirement for non-FAST MS\n (s.degreeProgram.name = \"MS\" and not s.degreeProgram.name = \"FAST\") implies\n some c: s.courses | c.name = \"Applied Programming\" and c.isMandatory = true\n }\n}\n\n// 8. Facts - Summer Semester Rules\nfact SummerRules {\n // Rule 19: Summer specific constraints\n all s: Student | Summer in s.degreeProgram implies {\n // Only previously taken courses\n all c: s.courses | c in Student.courses\n // Maximum two courses\n #s.courses <= 2\n // No scholarships in summer\n not s.isScholarship\n // Minimum enrollment requirement\n all c: Course | #(Student & c.~courses) >= 10\n // Campus flexibility\n one c: Campus | s.studyCampus = c\n // No visiting faculty\n all f: Faculty | f.isVisiting = false\n }\n}\n\n// 9. Facts - Language and Instruction Rules\nfact LanguageRules {\n // Rule 7: Medium of instruction\n all c: Course | {\n c.language = English or \n (c.name = \"Religious and Islamic Studies\" implies \n (c.language = English or c.language = Urdu))\n }\n}\n\n// 10. Facts - Financial and Fee Rules\nfact FinancialRules {\n // Rules 12-15: Fee and scholarship management\n all s: Student | {\n // Fee payment requirements\n s.feesPaid implies s.previousDuesCleared\n \n // Freezing semester rules\n s.frozenSemesters > 0 implies {\n s.freezingFeeAdvancePaid\n s.feeStatus = Frozen\n s.frozenSemesters <= 2\n }\n \n // Scholarship cancellation on academic warning\n s.isScholarship and s.isInAcademicWarning implies not s.isScholarship\n }\n}\n\n// 11. Facts - Credit Exemption Rules\nfact CreditExemptionRules {\n // Rule 20: Grade-based credit exemption\n all c: Course | {\n // Bachelor program requirements\n (c.grade = GradeC or c.grade = GradeB or c.grade = GradeA) implies {\n some s: Student | s.degreeProgram.name = \"Bachelor\" and c in s.courses\n }\n // Master program requirements\n (c.grade = GradeBMinus or c.grade = GradeB or c.grade = GradeA) implies {\n some s: Student | s.degreeProgram.name = \"Master\" and c in s.courses\n }\n // Prerequisite handling\n all pre: c.preReq | pre.grade != GradeF\n }\n}\n\n// 12. Assertions\nassert AcademicYearValidation {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3\n}\n\nassert StudentAttendanceValidation {\n all s: Student | s.attendance >= 80 or (s.attendance < 80 and s.isInAcademicWarning)\n}\n\nassert LanguageValidation {\n all c: Course | c.language = English or \n (c.name = \"Religious and Islamic Studies\" implies \n (c.language = English or c.language = Urdu))\n}\n\nassert FeeAndScholarshipValidation {\n all s: Student | s.isScholarship implies s.feesPaid\n}\n\n// 13. Execution Commands\nrun AcademicYearValidation for 4\ncheck StudentAttendanceValidation for 4\ncheck LanguageValidation for 4\ncheck FeeAndScholarshipValidation for 4", "permalink": "upbeat-parole-bleep-letter", "time": "2024-11-19 09:14:01.420684", "cmd": 1} {"id": 24269, "parent": 24268, "code": "// 1. Basic Academic Structure Signatures\nabstract sig Semester {\n startDate: Int, // Start date of the semester\n endDate: Int, // End date of the semester\n weeks: Int // Duration in weeks\n}\none sig Spring, Fall extends Semester {} // Regular Semesters\nlone sig Summer extends Semester {} // Optional Summer Semester\n\nsig AcademicYear {\n semesters: set Semester // Semesters in academic year\n}\n\nsig Campus {} // For summer campus rules\n\n// 2. Academic Personnel Signatures\nsig Faculty {\n isVisiting: Bool // Tracks visiting faculty status\n}\n\n// 3. Course and Language Related Signatures\nabstract sig Language {}\none sig English, Urdu extends Language {} // Language options for courses\n\nabstract sig Grade {}\none sig GradeA, GradeB, GradeC, GradeBMinus, GradeF extends Grade {} // Grade classifications\n\nsig Course {\n name: String, // Course name\n creditHours: Int, // Credit hours\n preReq: set Course, // Pre-requisite courses\n isMandatory: Bool, // Mandatory status\n isIncomplete: Bool, // Incomplete status\n faculty: Faculty, // Assigned faculty\n language: Language, // Instruction language\n grade: Grade // Course grade\n}\n\n// 4. Student and Program Signatures\nsig DegreeProgram {\n name: String, // Program name\n isConcurrentAllowed: Bool // Concurrent admission status\n}\n\nabstract sig FeeStatus {}\none sig Paid, Frozen extends FeeStatus {} // Fee payment status\n\nsig Student {\n // Basic Information\n rollNumber: Int, // Unique identifier\n attendance: Int, // Attendance percentage\n \n // Academic Status\n isScholarship: Bool, // Scholarship status\n isInAcademicWarning: Bool,// Academic warning status\n isNewStudent: Bool, // New student status\n \n // Course Registration\n courses: set Course, // Registered courses\n registeredCredits: Int, // Total credit hours\n degreeProgram: DegreeProgram, // Enrolled program\n \n // Financial Status\n feesPaid: Bool, // Fee payment status\n feeStatus: FeeStatus, // Current fee status\n previousDuesCleared: Bool,// Previous dues clearance\n freezingFeeAdvancePaid: Bool, // Freezing fee status\n \n // Administrative\n frozenSemesters: Int, // Number of frozen semesters\n studyCampus: Campus // Campus location\n}\n\n// 5. Facts - Academic Calendar Rules\nfact SemesterRules {\n // Rule 1-4: Semester structure\n all ay: AcademicYear | {\n // Mandatory Spring and Fall semesters\n Spring in ay.semesters and Fall in ay.semesters\n // Optional Summer semester\n Summer in ay.semesters implies #ay.semesters = 3\n // Semester durations\n Spring.weeks = 17\n Fall.weeks = 17\n Summer.weeks = 8\n // Valid semester dates\n all s: Semester | s.startDate < s.endDate\n }\n}\n\n// 6. Facts - Student Academic Rules\nfact StudentRules {\n // Rule 5: Unique roll numbers\n all s1, s2: Student | s1 != s2 implies s1.rollNumber != s2.rollNumber\n \n // Rule 6: Attendance requirements with condonation\n all s: Student | {\n s.attendance >= 80 or \n (s.attendance < 80 implies all c: s.courses | c.isIncomplete = true)\n }\n \n // Rule 16: Concurrent admission restriction\n all s: Student | not s.degreeProgram.isConcurrentAllowed\n}\n\n// 7. Facts - Course Registration Rules\nfact CourseRegistrationRules {\n // Rule 8-9: Course load requirements\n all s: Student | {\n // New student course load\n s.isNewStudent implies {\n #s.courses = 5\n s.registeredCredits >= 15 and s.registeredCredits <= 18\n }\n \n // Applied Programming requirement for non-FAST MS\n (s.degreeProgram.name = \"MS\" and not s.degreeProgram.name = \"FAST\") implies\n some c: s.courses | c.name = \"Applied Programming\" and c.isMandatory = true\n }\n}\n\n// 8. Facts - Summer Semester Rules\nfact SummerRules {\n // Rule 19: Summer specific constraints\n all s: Student | Summer in s.degreeProgram implies {\n // Only previously taken courses\n all c: s.courses | c in Student.courses\n // Maximum two courses\n #s.courses <= 2\n // No scholarships in summer\n not s.isScholarship\n // Minimum enrollment requirement\n all c: Course | #(Student & c.~courses) >= 10\n // Campus flexibility\n one c: Campus | s.studyCampus = c\n // No visiting faculty\n all f: Faculty | f.isVisiting = false\n }\n}\n\n// 9. Facts - Language and Instruction Rules\nfact LanguageRules {\n // Rule 7: Medium of instruction\n all c: Course | {\n c.language = English or \n (c.name = \"Religious and Islamic Studies\" implies \n (c.language = English or c.language = Urdu))\n }\n}\n\n// 10. Facts - Financial and Fee Rules\nfact FinancialRules {\n // Rules 12-15: Fee and scholarship management\n all s: Student | {\n // Fee payment requirements\n s.feesPaid implies s.previousDuesCleared\n \n // Freezing semester rules\n s.frozenSemesters > 0 implies {\n s.freezingFeeAdvancePaid\n s.feeStatus = Frozen\n s.frozenSemesters <= 2\n }\n \n // Scholarship cancellation on academic warning\n s.isScholarship and s.isInAcademicWarning implies not s.isScholarship\n }\n}\n\n// 11. Facts - Credit Exemption Rules\nfact CreditExemptionRules {\n // Rule 20: Grade-based credit exemption\n all c: Course | {\n // Bachelor program requirements\n (c.grade = GradeC or c.grade = GradeB or c.grade = GradeA) implies {\n some s: Student | s.degreeProgram.name = \"Bachelor\" and c in s.courses\n }\n // Master program requirements\n (c.grade = GradeBMinus or c.grade = GradeB or c.grade = GradeA) implies {\n some s: Student | s.degreeProgram.name = \"Master\" and c in s.courses\n }\n // Prerequisite handling\n all pre: c.preReq | pre.grade != GradeF\n }\n}\n\n// 12. Assertions\nassert AcademicYearValidation {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3\n}\n\nassert StudentAttendanceValidation {\n all s: Student | s.attendance >= 80 or (s.attendance < 80 and s.isInAcademicWarning)\n}\n\nassert LanguageValidation {\n all c: Course | c.language = English or \n (c.name = \"Religious and Islamic Studies\" implies \n (c.language = English or c.language = Urdu))\n}\n\nassert FeeAndScholarshipValidation {\n all s: Student | s.isScholarship implies s.feesPaid\n}\n\n// 13. Execution Commands\nrun AcademicYearValidation for 4\ncheck StudentAttendanceValidation for 4\ncheck LanguageValidation for 4\ncheck FeeAndScholarshipValidation for 4", "permalink": "shine-foam-barley-chive", "time": "2024-11-19 09:36:39.605571", "cmd": 1} {"id": 24265, "parent": null, "code": "// 1. Basic Academic Structure Signatures\nabstract sig Semester {\n startDate: Int, // Start date of the semester\n endDate: Int, // End date of the semester\n weeks: Int // Duration in weeks\n}\none sig Spring, Fall extends Semester {} // Regular Semesters\nlone sig Summer extends Semester {} // Optional Summer Semester\n\nsig AcademicYear {\n semesters: set Semester // Semesters in academic year\n}\n\nsig Campus {} // For summer campus rules\n\n// 2. Academic Personnel Signatures\nsig Faculty {\n isVisiting: Bool // Tracks visiting faculty status\n}\n\n// 3. Course and Language Related Signatures\nabstract sig Language {}\none sig English, Urdu extends Language {} // Language options for courses\n\nabstract sig Grade {}\none sig GradeA, GradeB, GradeC, GradeBMinus, GradeF extends Grade {} // Grade classifications\n\nsig Course {\n name: String, // Course name\n creditHours: Int, // Credit hours\n preReq: set Course, // Pre-requisite courses\n isMandatory: Bool, // Mandatory status\n isIncomplete: Bool, // Incomplete status\n faculty: Faculty, // Assigned faculty\n language: Language, // Instruction language\n grade: Grade // Course grade\n}\n\n// 4. Student and Program Signatures\nsig DegreeProgram {\n name: String, // Program name\n isConcurrentAllowed: Bool // Concurrent admission status\n}\n\nabstract sig FeeStatus {}\none sig Paid, Frozen extends FeeStatus {} // Fee payment status\n\nsig Student {\n // Basic Information\n rollNumber: Int, // Unique identifier\n attendance: Int, // Attendance percentage\n \n // Academic Status\n isScholarship: Bool, // Scholarship status\n isInAcademicWarning: Bool,// Academic warning status\n isNewStudent: Bool, // New student status\n \n // Course Registration\n courses: set Course, // Registered courses\n registeredCredits: Int, // Total credit hours\n degreeProgram: DegreeProgram, // Enrolled program\n \n // Financial Status\n feesPaid: Bool, // Fee payment status\n feeStatus: FeeStatus, // Current fee status\n previousDuesCleared: Bool,// Previous dues clearance\n freezingFeeAdvancePaid: Bool, // Freezing fee status\n \n // Administrative\n frozenSemesters: Int, // Number of frozen semesters\n studyCampus: Campus // Campus location\n}\n\n// 5. Facts - Academic Calendar Rules\nfact SemesterRules {\n // Rule 1-4: Semester structure\n all ay: AcademicYear | {\n // Mandatory Spring and Fall semesters\n Spring in ay.semesters and Fall in ay.semesters\n // Optional Summer semester\n Summer in ay.semesters implies #ay.semesters = 3\n // Semester durations\n Spring.weeks = 17\n Fall.weeks = 17\n Summer.weeks = 8\n // Valid semester dates\n all s: Semester | s.startDate < s.endDate\n }\n}\n\n// 6. Facts - Student Academic Rules\nfact StudentRules {\n // Rule 5: Unique roll numbers\n all s1, s2: Student | s1 != s2 implies s1.rollNumber != s2.rollNumber\n \n // Rule 6: Attendance requirements with condonation\n all s: Student | {\n s.attendance >= 80 or \n (s.attendance < 80 implies all c: s.courses | c.isIncomplete = true)\n }\n \n // Rule 16: Concurrent admission restriction\n all s: Student | not s.degreeProgram.isConcurrentAllowed\n}\n\n// 7. Facts - Course Registration Rules\nfact CourseRegistrationRules {\n // Rule 8-9: Course load requirements\n all s: Student | {\n // New student course load\n s.isNewStudent implies {\n #s.courses = 5\n s.registeredCredits >= 15 and s.registeredCredits <= 18\n }\n \n // Applied Programming requirement for non-FAST MS\n (s.degreeProgram.name = \"MS\" and not s.degreeProgram.name = \"FAST\") implies\n some c: s.courses | c.name = \"Applied Programming\" and c.isMandatory = true\n }\n}\n\n// 8. Facts - Summer Semester Rules\nfact SummerRules {\n // Rule 19: Summer specific constraints\n all s: Student | Summer in s.degreeProgram implies {\n // Only previously taken courses\n all c: s.courses | c in Student.courses\n // Maximum two courses\n #s.courses <= 2\n // No scholarships in summer\n not s.isScholarship\n // Minimum enrollment requirement\n all c: Course | #(Student & c.~courses) >= 10\n // Campus flexibility\n one c: Campus | s.studyCampus = c\n // No visiting faculty\n all f: Faculty | f.isVisiting = false\n }\n}\n\n// 9. Facts - Language and Instruction Rules\nfact LanguageRules {\n // Rule 7: Medium of instruction\n all c: Course | {\n c.language = English or \n (c.name = \"Religious and Islamic Studies\" implies \n (c.language = English or c.language = Urdu))\n }\n}\n\n// 10. Facts - Financial and Fee Rules\nfact FinancialRules {\n // Rules 12-15: Fee and scholarship management\n all s: Student | {\n // Fee payment requirements\n s.feesPaid implies s.previousDuesCleared\n \n // Freezing semester rules\n s.frozenSemesters > 0 implies {\n s.freezingFeeAdvancePaid\n s.feeStatus = Frozen\n s.frozenSemesters <= 2\n }\n \n // Scholarship cancellation on academic warning\n s.isScholarship and s.isInAcademicWarning implies not s.isScholarship\n }\n}\n\n// 11. Facts - Credit Exemption Rules\nfact CreditExemptionRules {\n // Rule 20: Grade-based credit exemption\n all c: Course | {\n // Bachelor program requirements\n (c.grade = GradeC or c.grade = GradeB or c.grade = GradeA) implies {\n some s: Student | s.degreeProgram.name = \"Bachelor\" and c in s.courses\n }\n // Master program requirements\n (c.grade = GradeBMinus or c.grade = GradeB or c.grade = GradeA) implies {\n some s: Student | s.degreeProgram.name = \"Master\" and c in s.courses\n }\n // Prerequisite handling\n all pre: c.preReq | pre.grade != GradeF\n }\n}\n\n// 12. Assertions\nassert AcademicYearValidation {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3\n}\n\nassert StudentAttendanceValidation {\n all s: Student | s.attendance >= 80 or (s.attendance < 80 and s.isInAcademicWarning)\n}\n\nassert LanguageValidation {\n all c: Course | c.language = English or \n (c.name = \"Religious and Islamic Studies\" implies \n (c.language = English or c.language = Urdu))\n}\n\nassert FeeAndScholarshipValidation {\n all s: Student | s.isScholarship implies s.feesPaid\n}\n\n// 13. Execution Commands\nrun AcademicYearValidation for 4\ncheck StudentAttendanceValidation for 4\ncheck LanguageValidation for 4\ncheck FeeAndScholarshipValidation for 4", "permalink": "domain-hertz-circus-basis", "time": "2024-11-19 09:13:32.702798", "cmd": 1} {"id": 24268, "parent": 24266, "code": "// 1. Basic Academic Structure Signatures\nabstract sig Semester {\n startDate: Int, // Start date of the semester\n endDate: Int, // End date of the semester\n weeks: Int // Duration in weeks\n}\none sig Spring, Fall extends Semester {} // Regular Semesters\nlone sig Summer extends Semester {} // Optional Summer Semester\n\nsig AcademicYear {\n semesters: set Semester // Semesters in academic year\n}\n\nsig Campus {} // For summer campus rules\n\n// 2. Academic Personnel Signatures\nsig Faculty {\n isVisiting: Boolean // Tracks visiting faculty status\n}\n\n// 3. Course and Language Related Signatures\nabstract sig Language {}\none sig English, Urdu extends Language {} // Language options for courses\n\nabstract sig Grade {}\none sig GradeA, GradeB, GradeC, GradeBMinus, GradeF extends Grade {} // Grade classifications\n\nsig Course {\n name: String, // Course name\n creditHours: Int, // Credit hours\n preReq: set Course, // Pre-requisite courses\n isMandatory: Bool, // Mandatory status\n isIncomplete: Bool, // Incomplete status\n faculty: Faculty, // Assigned faculty\n language: Language, // Instruction language\n grade: Grade // Course grade\n}\n\n// 4. Student and Program Signatures\nsig DegreeProgram {\n name: String, // Program name\n isConcurrentAllowed: Bool // Concurrent admission status\n}\n\nabstract sig FeeStatus {}\none sig Paid, Frozen extends FeeStatus {} // Fee payment status\n\nsig Student {\n // Basic Information\n rollNumber: Int, // Unique identifier\n attendance: Int, // Attendance percentage\n \n // Academic Status\n isScholarship: Bool, // Scholarship status\n isInAcademicWarning: Bool,// Academic warning status\n isNewStudent: Bool, // New student status\n \n // Course Registration\n courses: set Course, // Registered courses\n registeredCredits: Int, // Total credit hours\n degreeProgram: DegreeProgram, // Enrolled program\n \n // Financial Status\n feesPaid: Bool, // Fee payment status\n feeStatus: FeeStatus, // Current fee status\n previousDuesCleared: Bool,// Previous dues clearance\n freezingFeeAdvancePaid: Bool, // Freezing fee status\n \n // Administrative\n frozenSemesters: Int, // Number of frozen semesters\n studyCampus: Campus // Campus location\n}\n\n// 5. Facts - Academic Calendar Rules\nfact SemesterRules {\n // Rule 1-4: Semester structure\n all ay: AcademicYear | {\n // Mandatory Spring and Fall semesters\n Spring in ay.semesters and Fall in ay.semesters\n // Optional Summer semester\n Summer in ay.semesters implies #ay.semesters = 3\n // Semester durations\n Spring.weeks = 17\n Fall.weeks = 17\n Summer.weeks = 8\n // Valid semester dates\n all s: Semester | s.startDate < s.endDate\n }\n}\n\n// 6. Facts - Student Academic Rules\nfact StudentRules {\n // Rule 5: Unique roll numbers\n all s1, s2: Student | s1 != s2 implies s1.rollNumber != s2.rollNumber\n \n // Rule 6: Attendance requirements with condonation\n all s: Student | {\n s.attendance >= 80 or \n (s.attendance < 80 implies all c: s.courses | c.isIncomplete = true)\n }\n \n // Rule 16: Concurrent admission restriction\n all s: Student | not s.degreeProgram.isConcurrentAllowed\n}\n\n// 7. Facts - Course Registration Rules\nfact CourseRegistrationRules {\n // Rule 8-9: Course load requirements\n all s: Student | {\n // New student course load\n s.isNewStudent implies {\n #s.courses = 5\n s.registeredCredits >= 15 and s.registeredCredits <= 18\n }\n \n // Applied Programming requirement for non-FAST MS\n (s.degreeProgram.name = \"MS\" and not s.degreeProgram.name = \"FAST\") implies\n some c: s.courses | c.name = \"Applied Programming\" and c.isMandatory = true\n }\n}\n\n// 8. Facts - Summer Semester Rules\nfact SummerRules {\n // Rule 19: Summer specific constraints\n all s: Student | Summer in s.degreeProgram implies {\n // Only previously taken courses\n all c: s.courses | c in Student.courses\n // Maximum two courses\n #s.courses <= 2\n // No scholarships in summer\n not s.isScholarship\n // Minimum enrollment requirement\n all c: Course | #(Student & c.~courses) >= 10\n // Campus flexibility\n one c: Campus | s.studyCampus = c\n // No visiting faculty\n all f: Faculty | f.isVisiting = false\n }\n}\n\n// 9. Facts - Language and Instruction Rules\nfact LanguageRules {\n // Rule 7: Medium of instruction\n all c: Course | {\n c.language = English or \n (c.name = \"Religious and Islamic Studies\" implies \n (c.language = English or c.language = Urdu))\n }\n}\n\n// 10. Facts - Financial and Fee Rules\nfact FinancialRules {\n // Rules 12-15: Fee and scholarship management\n all s: Student | {\n // Fee payment requirements\n s.feesPaid implies s.previousDuesCleared\n \n // Freezing semester rules\n s.frozenSemesters > 0 implies {\n s.freezingFeeAdvancePaid\n s.feeStatus = Frozen\n s.frozenSemesters <= 2\n }\n \n // Scholarship cancellation on academic warning\n s.isScholarship and s.isInAcademicWarning implies not s.isScholarship\n }\n}\n\n// 11. Facts - Credit Exemption Rules\nfact CreditExemptionRules {\n // Rule 20: Grade-based credit exemption\n all c: Course | {\n // Bachelor program requirements\n (c.grade = GradeC or c.grade = GradeB or c.grade = GradeA) implies {\n some s: Student | s.degreeProgram.name = \"Bachelor\" and c in s.courses\n }\n // Master program requirements\n (c.grade = GradeBMinus or c.grade = GradeB or c.grade = GradeA) implies {\n some s: Student | s.degreeProgram.name = \"Master\" and c in s.courses\n }\n // Prerequisite handling\n all pre: c.preReq | pre.grade != GradeF\n }\n}\n\n// 12. Assertions\nassert AcademicYearValidation {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3\n}\n\nassert StudentAttendanceValidation {\n all s: Student | s.attendance >= 80 or (s.attendance < 80 and s.isInAcademicWarning)\n}\n\nassert LanguageValidation {\n all c: Course | c.language = English or \n (c.name = \"Religious and Islamic Studies\" implies \n (c.language = English or c.language = Urdu))\n}\n\nassert FeeAndScholarshipValidation {\n all s: Student | s.isScholarship implies s.feesPaid\n}\n\n// 13. Execution Commands\nrun AcademicYearValidation for 4\ncheck StudentAttendanceValidation for 4\ncheck LanguageValidation for 4\ncheck FeeAndScholarshipValidation for 4", "permalink": "neon-neon-smooth-parlor", "time": "2024-11-19 09:35:58.770287", "cmd": 1} {"id": 24270, "parent": 24269, "code": "// 1. Basic Academic Structure Signatures\nabstract sig Semester {\n startDate: Int, // Start date of the semester\n endDate: Int, // End date of the semester\n weeks: Int // Duration in weeks\n}\none sig Spring, Fall extends Semester {} // Regular Semesters\nlone sig Summer extends Semester {} // Optional Summer Semester\n\nsig AcademicYear {\n semesters: set Semester // Semesters in academic year\n}\n\nsig Campus {} // For summer campus rules\n\n// 2. Academic Personnel Signatures\nabstract sig Boolean {}\none sig True, False extends Boolean {}\n\nsig Faculty {\n isVisiting: Boolean // Tracks visiting faculty status\n}\n\n// 3. Course and Language Related Signatures\nabstract sig Language {}\none sig English, Urdu extends Language {} // Language options for courses\n\nabstract sig Grade {}\none sig GradeA, GradeB, GradeC, GradeBMinus, GradeF extends Grade {} // Grade classifications\n\nsig Course {\n name: String, // Course name\n creditHours: Int, // Credit hours\n preReq: set Course, // Pre-requisite courses\n isMandatory: Boolean, // Mandatory status\n isIncomplete: Boolean, // Incomplete status\n faculty: Faculty, // Assigned faculty\n language: Language, // Instruction language\n grade: Grade // Course grade\n}\n\n// 4. Student and Program Signatures\nsig DegreeProgram {\n name: String, // Program name\n isConcurrentAllowed: Boolean // Concurrent admission status\n}\n\nabstract sig FeeStatus {}\none sig Paid, Frozen extends FeeStatus {} // Fee payment status\n\nsig Student {\n // Basic Information\n rollNumber: Int, // Unique identifier\n attendance: Int, // Attendance percentage\n \n // Academic Status\n isScholarship: Boolean, // Scholarship status\n isInAcademicWarning: Boolean,// Academic warning status\n isNewStudent: Boolean, // New student status\n \n // Course Registration\n courses: set Course, // Registered courses\n registeredCredits: Int, // Total credit hours\n degreeProgram: DegreeProgram, // Enrolled program\n \n // Financial Status\n feesPaid: Boolean, // Fee payment status\n feeStatus: FeeStatus, // Current fee status\n previousDuesCleared: Boolean,// Previous dues clearance\n freezingFeeAdvancePaid: Boolean, // Freezing fee status\n \n // Administrative\n frozenSemesters: Int, // Number of frozen semesters\n studyCampus: Campus // Campus location\n}\n\n// 5. Facts - Academic Calendar Rules\nfact SemesterRules {\n // Rule 1-4: Semester structure\n all ay: AcademicYear | {\n // Mandatory Spring and Fall semesters\n Spring in ay.semesters and Fall in ay.semesters\n // Optional Summer semester\n Summer in ay.semesters implies #ay.semesters = 3\n // Semester durations\n Spring.weeks = 17\n Fall.weeks = 17\n Summer.weeks = 8\n // Valid semester dates\n all s: Semester | s.startDate < s.endDate\n }\n}\n\n// 6. Facts - Student Academic Rules\nfact StudentRules {\n // Rule 5: Unique roll numbers\n all s1, s2: Student | s1 != s2 implies s1.rollNumber != s2.rollNumber\n \n // Rule 6: Attendance requirements with condonation\n all s: Student | {\n s.attendance >= 80 or \n (s.attendance < 80 implies all c: s.courses | c.isIncomplete = True)\n }\n \n // Rule 16: Concurrent admission restriction\n all s: Student | s.degreeProgram.isConcurrentAllowed = False\n}\n\n// 7. Facts - Course Registration Rules\nfact CourseRegistrationRules {\n // Rule 8-9: Course load requirements\n all s: Student | {\n // New student course load\n s.isNewStudent = True implies {\n #s.courses = 5\n s.registeredCredits >= 15 and s.registeredCredits <= 18\n }\n \n // Applied Programming requirement for non-FAST MS\n (s.degreeProgram.name = \"MS\" and not s.degreeProgram.name = \"FAST\") implies\n some c: s.courses | c.name = \"Applied Programming\" and c.isMandatory = True\n }\n}\n\n// 8. Facts - Summer Semester Rules\nfact SummerRules {\n // Rule 19: Summer specific constraints\n all s: Student | Summer in s.degreeProgram implies {\n // Only previously taken courses\n all c: s.courses | c in Student.courses\n // Maximum two courses\n #s.courses <= 2\n // No scholarships in summer\n s.isScholarship = False\n // Minimum enrollment requirement\n all c: Course | #(Student & c.~courses) >= 10\n // Campus flexibility\n one c: Campus | s.studyCampus = c\n // No visiting faculty\n all f: Faculty | f.isVisiting = False\n }\n}\n\n// 9. Facts - Language and Instruction Rules\nfact LanguageRules {\n // Rule 7: Medium of instruction\n all c: Course | {\n c.language = English or \n (c.name = \"Religious and Islamic Studies\" implies \n (c.language = English or c.language = Urdu))\n }\n}\n\n// 10. Facts - Financial and Fee Rules\nfact FinancialRules {\n // Rules 12-15: Fee and scholarship management\n all s: Student | {\n // Fee payment requirements\n s.feesPaid = True implies s.previousDuesCleared = True\n \n // Freezing semester rules\n s.frozenSemesters > 0 implies {\n s.freezingFeeAdvancePaid = True\n s.feeStatus = Frozen\n s.frozenSemesters <= 2\n }\n \n // Scholarship cancellation on academic warning\n s.isScholarship = True and s.isInAcademicWarning = True implies s.isScholarship = False\n }\n}\n\n// 11. Facts - Credit Exemption Rules\nfact CreditExemptionRules {\n // Rule 20: Grade-based credit exemption\n all c: Course | {\n // Bachelor program requirements\n (c.grade = GradeC or c.grade = GradeB or c.grade = GradeA) implies {\n some s: Student | s.degreeProgram.name = \"Bachelor\" and c in s.courses\n }\n // Master program requirements\n (c.grade = GradeBMinus or c.grade = GradeB or c.grade = GradeA) implies {\n some s: Student | s.degreeProgram.name = \"Master\" and c in s.courses\n }\n // Prerequisite handling\n all pre: c.preReq | pre.grade != GradeF\n }\n}\n\n// 12. Assertions\nassert AcademicYearValidation {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3\n}\n\nassert StudentAttendanceValidation {\n all s: Student | s.attendance >= 80 or (s.attendance < 80 and s.isInAcademicWarning = True)\n}\n\nassert LanguageValidation {\n all c: Course | c.language = English or \n (c.name = \"Religious and Islamic Studies\" implies \n (c.language = English or c.language = Urdu))\n}\n\nassert FeeAndScholarshipValidation {\n all s: Student | s.isScholarship = True implies s.feesPaid = True\n}\n\n// 13. Execution Commands\nrun AcademicYearValidation for 4\ncheck StudentAttendanceValidation for 4\ncheck LanguageValidation for 4\ncheck FeeAndScholarshipValidation for 4", "permalink": "armed-dig-scotch-mocker", "time": "2024-11-19 09:39:26.026817", "cmd": 1} {"id": 24271, "parent": 24270, "code": "// 1. Basic Academic Structure Signatures\nabstract sig Semester {\n startDate: Int, // Start date of the semester\n endDate: Int, // End date of the semester\n weeks: Int // Duration in weeks\n}\none sig Spring, Fall extends Semester {} // Regular Semesters\nlone sig Summer extends Semester {} // Optional Summer Semester\n\nsig AcademicYear {\n semesters: set Semester // Semesters in academic year\n}\n\nsig Campus {} // For summer campus rules\n\n// 2. Academic Personnel Signatures\nabstract sig Boolean {}\none sig True, False extends Boolean {}\n\nsig Faculty {\n isVisiting: Boolean // Tracks visiting faculty status\n}\n\n// 3. Course and Language Related Signatures\nabstract sig Language {}\none sig English, Urdu extends Language {} // Language options for courses\n\nabstract sig Grade {}\none sig GradeA, GradeB, GradeC, GradeBMinus, GradeF extends Grade {} // Grade classifications\n\nsig Course {\n name: String, // Course name\n creditHours: Int, // Credit hours\n preReq: set Course, // Pre-requisite courses\n isMandatory: Boolean, // Mandatory status\n isIncomplete: Boolean, // Incomplete status\n faculty: Faculty, // Assigned faculty\n language: Language, // Instruction language\n grade: Grade // Course grade\n}\n\n// 4. Student and Program Signatures\nsig DegreeProgram {\n name: String, // Program name\n isConcurrentAllowed: Boolean // Concurrent admission status\n}\n\nabstract sig FeeStatus {}\none sig Paid, Frozen extends FeeStatus {} // Fee payment status\n\nsig Student {\n // Basic Information\n rollNumber: Int, // Unique identifier\n attendance: Int, // Attendance percentage\n \n // Academic Status\n isScholarship: Boolean, // Scholarship status\n isInAcademicWarning: Boolean,// Academic warning status\n isNewStudent: Boolean, // New student status\n \n // Course Registration\n courses: set Course, // Registered courses\n registeredCredits: Int, // Total credit hours\n degreeProgram: DegreeProgram, // Enrolled program\n \n // Financial Status\n feesPaid: Boolean, // Fee payment status\n feeStatus: FeeStatus, // Current fee status\n previousDuesCleared: Boolean,// Previous dues clearance\n freezingFeeAdvancePaid: Boolean, // Freezing fee status\n \n // Administrative\n frozenSemesters: Int, // Number of frozen semesters\n studyCampus: Campus // Campus location\n}\n\n// 5. Facts - Academic Calendar Rules\nfact SemesterRules {\n // Rule 1-4: Semester structure\n all ay: AcademicYear | {\n // Mandatory Spring and Fall semesters\n Spring in ay.semesters and Fall in ay.semesters\n // Optional Summer semester\n Summer in ay.semesters implies #ay.semesters = 3\n // Semester durations\n Spring.weeks = 17\n Fall.weeks = 17\n Summer.weeks = 8\n // Valid semester dates\n all s: Semester | s.startDate < s.endDate\n }\n}\n\n// 6. Facts - Student Academic Rules\nfact StudentRules {\n // Rule 5: Unique roll numbers\n all s1, s2: Student | s1 != s2 implies s1.rollNumber != s2.rollNumber\n \n // Rule 6: Attendance requirements with condonation\n all s: Student | {\n s.attendance >= 80 or \n (s.attendance < 80 implies all c: s.courses | c.isIncomplete = True)\n }\n \n // Rule 16: Concurrent admission restriction\n all s: Student | s.degreeProgram.isConcurrentAllowed = False\n}\n\n// 7. Facts - Course Registration Rules\nfact CourseRegistrationRules {\n // Rule 8-9: Course load requirements\n all s: Student | {\n // New student course load\n s.isNewStudent = True implies {\n #s.courses = 5\n s.registeredCredits >= 15 and s.registeredCredits <= 18\n }\n \n // Applied Programming requirement for non-FAST MS\n (s.degreeProgram.name = \"MS\" and not s.degreeProgram.name = \"FAST\") implies\n some c: s.courses | c.name = \"Applied Programming\" and c.isMandatory = True\n }\n}\n\n// 8. Facts - Summer Semester Rules\nfact SummerRules {\n // Rule 19: Summer specific constraints\n all s: Student | Summer in s.degreeProgram implies {\n // Only previously taken courses\n all c: s.courses | c in Student.courses\n // Maximum two courses\n #s.courses <= 2\n // No scholarships in summer\n s.isScholarship = False\n // Minimum enrollment requirement\n all c: Course | #(Student & c.~courses) >= 10\n // Campus flexibility\n one c: Campus | s.studyCampus = c\n // No visiting faculty\n all f: Faculty | f.isVisiting = False\n }\n}\n\n// 9. Facts - Language and Instruction Rules\nfact LanguageRules {\n // Rule 7: Medium of instruction\n all c: Course | {\n c.language = English or \n (c.name = \"Religious and Islamic Studies\" implies \n (c.language = English or c.language = Urdu))\n }\n}\n\n// 10. Facts - Financial and Fee Rules\nfact FinancialRules {\n // Rules 12-15: Fee and scholarship management\n all s: Student | {\n // Fee payment requirements\n s.feesPaid = True implies s.previousDuesCleared = True\n \n // Freezing semester rules\n s.frozenSemesters > 0 implies {\n s.freezingFeeAdvancePaid = True\n s.feeStatus = Frozen\n s.frozenSemesters <= 2\n }\n \n // Scholarship cancellation on academic warning\n s.isScholarship = True and s.isInAcademicWarning = True implies s.isScholarship = False\n }\n}\n\n// 11. Facts - Credit Exemption Rules\nfact CreditExemptionRules {\n // Rule 20: Grade-based credit exemption\n all c: Course | {\n // Bachelor program requirements\n (c.grade = GradeC or c.grade = GradeB or c.grade = GradeA) implies {\n some s: Student | s.degreeProgram.name = \"Bachelor\" and c in s.courses\n }\n // Master program requirements\n (c.grade = GradeBMinus or c.grade = GradeB or c.grade = GradeA) implies {\n some s: Student | s.degreeProgram.name = \"Master\" and c in s.courses\n }\n // Prerequisite handling\n all pre: c.preReq | pre.grade != GradeF\n }\n}\n\n// 12. Assertions\nassert AcademicYearValidation {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3\n}\n\nassert StudentAttendanceValidation {\n all s: Student | s.attendance >= 80 or (s.attendance < 80 and s.isInAcademicWarning = True)\n}\n\nassert LanguageValidation {\n all c: Course | c.language = English or \n (c.name = \"Religious and Islamic Studies\" implies \n (c.language = English or c.language = Urdu))\n}\n\nassert FeeAndScholarshipValidation {\n all s: Student | s.isScholarship = True implies s.feesPaid = True\n}\n\n// 13. Execution Commands\nrun {AcademicYearValidation} for 4\ncheck StudentAttendanceValidation for 4\ncheck LanguageValidation for 4\ncheck FeeAndScholarshipValidation for 4", "permalink": "wound-step-knoll-rust", "time": "2024-11-19 09:39:42.362984", "cmd": 1} {"id": 24448, "parent": 24447, "code": "// 1. Basic Academic Structure Signatures\nabstract sig Semester {\n startDate: Int, // Start date of the semester\n endDate: Int, // End date of the semester\n weeks: Int // Duration in weeks\n}\none sig Spring, Fall extends Semester {} // Regular Semesters\nlone sig Summer extends Semester {} // Optional Summer Semester\n\nsig AcademicYear {\n semesters: set Semester // Semesters in academic year\n}\n\nsig Campus {} // For summer campus rules\n\n// 2. Academic Personnel Signatures\nabstract sig Boolean {}\none sig True, False extends Boolean {}\n\nsig Faculty {\n isVisiting: Boolean // Tracks visiting faculty status\n}\n\n// 3. Course and Language Related Signatures\nabstract sig Language {}\none sig English, Urdu extends Language {} // Language options for courses\n\nabstract sig Grade {}\none sig GradeA, GradeB, GradeC, GradeBMinus, GradeF extends Grade {} // Grade classifications\n\nsig Course {\n name: String, // Course name\n creditHours: Int, // Credit hours\n preReq: set Course, // Pre-requisite courses\n isMandatory: Boolean, // Mandatory status\n isIncomplete: Boolean, // Incomplete status\n faculty: Faculty, // Assigned faculty\n language: Language, // Instruction language\n grade: Grade // Course grade\n}\n\n// 4. Student and Program Signatures\nsig DegreeProgram {\n name: String, // Program name\n isConcurrentAllowed: Boolean // Concurrent admission status\n}\n\nabstract sig FeeStatus {}\none sig Paid, Frozen extends FeeStatus {} // Fee payment status\n\nsig Student {\n // Basic Information\n rollNumber: Int, // Unique identifier\n attendance: Int, // Attendance percentage\n \n // Academic Status\n isScholarship: Boolean, // Scholarship status\n isInAcademicWarning: Boolean,// Academic warning status\n isNewStudent: Boolean, // New student status\n \n // Course Registration\n courses: set Course, // Registered courses\n registeredCredits: Int, // Total credit hours\n degreeProgram: DegreeProgram, // Enrolled program\n \n // Financial Status\n feesPaid: Boolean, // Fee payment status\n feeStatus: FeeStatus, // Current fee status\n previousDuesCleared: Boolean,// Previous dues clearance\n freezingFeeAdvancePaid: Boolean, // Freezing fee status\n \n // Administrative\n frozenSemesters: Int, // Number of frozen semesters\n studyCampus: Campus // Campus location\n}\n\n// 5. Facts - Academic Calendar Rules\nfact SemesterRules {\n // Rule 1-4: Semester structure\n all ay: AcademicYear | {\n // Mandatory Spring and Fall semesters\n Spring in ay.semesters and Fall in ay.semesters\n // Optional Summer semester\n Summer in ay.semesters implies #ay.semesters = 3\n // Semester durations\n Spring.weeks = 17\n Fall.weeks = 17\n Summer.weeks = 8\n // Valid semester dates\n all s: Semester | s.startDate < s.endDate\n }\n}\n\n// 6. Facts - Student Academic Rules\nfact StudentRules {\n // Rule 5: Unique roll numbers\n all s1, s2: Student | s1 != s2 implies s1.rollNumber != s2.rollNumber\n \n // Rule 6: Attendance requirements with condonation\n all s: Student | {\n s.attendance >= 80 or \n (s.attendance < 80 implies all c: s.courses | c.isIncomplete = True)\n }\n \n // Rule 16: Concurrent admission restriction\n all s: Student | s.degreeProgram.isConcurrentAllowed = False\n}\n\n// 7. Facts - Course Registration Rules\nfact CourseRegistrationRules {\n // Rule 8-9: Course load requirements\n all s: Student | {\n // New student course load\n s.isNewStudent = True implies {\n #s.courses = 5\n s.registeredCredits >= 15 and s.registeredCredits <= 18\n }\n \n // Applied Programming requirement for non-FAST MS\n (s.degreeProgram.name = \"MS\" and not s.degreeProgram.name = \"FAST\") implies\n some c: s.courses | c.name = \"Applied Programming\" and c.isMandatory = True\n }\n}\n\n// 8. Facts - Summer Semester Rules\nfact SummerRules {\n // Rule 19: Summer specific constraints\n all s: Student | Summer in s.degreeProgram implies {\n // Only previously taken courses\n all c: s.courses | c in Student.courses\n // Maximum two courses\n #s.courses <= 2\n // No scholarships in summer\n s.isScholarship = False\n // Minimum enrollment requirement\n all c: Course | #(Student & c.~courses) >= 10\n // Campus flexibility\n one c: Campus | s.studyCampus = c\n // No visiting faculty\n all f: Faculty | f.isVisiting = False\n }\n}\n\n// 9. Facts - Language and Instruction Rules\nfact LanguageRules {\n // Rule 7: Medium of instruction\n all c: Course | {\n c.language = English or \n (c.name = \"Religious and Islamic Studies\" implies \n (c.language = English or c.language = Urdu))\n }\n}\n\n// 10. Facts - Financial and Fee Rules\nfact FinancialRules {\n // Rules 12-15: Fee and scholarship management\n all s: Student | {\n // Fee payment requirements\n s.feesPaid = True implies s.previousDuesCleared = True\n \n // Freezing semester rules\n s.frozenSemesters > 0 implies {\n s.freezingFeeAdvancePaid = True\n s.feeStatus = Frozen\n s.frozenSemesters <= 2\n }\n \n // Scholarship cancellation on academic warning\n s.isScholarship = True and s.isInAcademicWarning = True implies s.isScholarship = False\n }\n}\n\n// 11. Facts - Credit Exemption Rules\nfact CreditExemptionRules {\n // Rule 20: Grade-based credit exemption\n all c: Course | {\n // Bachelor program requirements\n (c.grade = GradeC or c.grade = GradeB or c.grade = GradeA) implies {\n some s: Student | s.degreeProgram.name = \"Bachelor\" and c in s.courses\n }\n // Master program requirements\n (c.grade = GradeBMinus or c.grade = GradeB or c.grade = GradeA) implies {\n some s: Student | s.degreeProgram.name = \"Master\" and c in s.courses\n }\n // Prerequisite handling\n all pre: c.preReq | pre.grade != GradeF\n }\n}\n\n// 12. Assertions\nassert AcademicYearValidation {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3\n}\n\nassert StudentAttendanceValidation {\n all s: Student | s.attendance >= 80 or (s.attendance < 80 and s.isInAcademicWarning = True)\n}\n\nassert LanguageValidation {\n all c: Course | c.language = English or \n (c.name = \"Religious and Islamic Studies\" implies \n (c.language = English or c.language = Urdu))\n}\n\nassert FeeAndScholarshipValidation {\n all s: Student | s.isScholarship = True implies s.feesPaid = True\n}\n\n// 13. Execution Commands\nrun {} for 3\n// run AcademicYearValidation for 4\n// check StudentAttendanceValidation for 4\n// check LanguageValidation for 4\n// check FeeAndScholarshipValidation for 4", "permalink": "spew-sleet-rinse-darn", "time": "2024-11-19 19:26:53.431268", "cmd": 1} {"id": 24479, "parent": null, "code": "// 1. Basic Academic Structure Signatures\nabstract sig Semester {\n startDate: Int, // Start date of the semester\n endDate: Int, // End date of the semester\n weeks: Int // Duration in weeks\n}\none sig Spring, Fall extends Semester {} // Regular Semesters\nlone sig Summer extends Semester {} // Optional Summer Semester\n\nsig AcademicYear {\n semesters: set Semester // Semesters in academic year\n}\n\nsig Campus {} // For summer campus rules\n\n// 2. Academic Personnel Signatures\nabstract sig Boolean {}\none sig True, False extends Boolean {}\n\nsig Faculty {\n isVisiting: Boolean // Tracks visiting faculty status\n}\n\n// 3. Course and Language Related Signatures\nabstract sig Language {}\none sig English, Urdu extends Language {} // Language options for courses\n\nabstract sig Grade {}\none sig GradeA, GradeB, GradeC, GradeBMinus, GradeF extends Grade {} // Grade classifications\n\nsig Course {\n name: String, // Course name\n creditHours: Int, // Credit hours\n preReq: set Course, // Pre-requisite courses\n isMandatory: Boolean, // Mandatory status\n isIncomplete: Boolean, // Incomplete status\n faculty: Faculty, // Assigned faculty\n language: Language, // Instruction language\n grade: Grade // Course grade\n}\n\n// 4. Student and Program Signatures\nsig DegreeProgram {\n name: String, // Program name\n isConcurrentAllowed: Boolean // Concurrent admission status\n}\n\nabstract sig FeeStatus {}\none sig Paid, Frozen extends FeeStatus {} // Fee payment status\n\nsig Student {\n // Basic Information\n rollNumber: Int, // Unique identifier\n attendance: Int, // Attendance percentage\n \n // Academic Status\n isScholarship: Boolean, // Scholarship status\n isInAcademicWarning: Boolean,// Academic warning status\n isNewStudent: Boolean, // New student status\n \n // Course Registration\n courses: set Course, // Registered courses\n registeredCredits: Int, // Total credit hours\n degreeProgram: DegreeProgram, // Enrolled program\n \n // Financial Status\n feesPaid: Boolean, // Fee payment status\n feeStatus: FeeStatus, // Current fee status\n previousDuesCleared: Boolean,// Previous dues clearance\n freezingFeeAdvancePaid: Boolean, // Freezing fee status\n \n // Administrative\n frozenSemesters: Int, // Number of frozen semesters\n studyCampus: Campus // Campus location\n}\n\n// 5. Facts - Academic Calendar Rules\nfact SemesterRules {\n // Rule 1-4: Semester structure\n all ay: AcademicYear | {\n // Mandatory Spring and Fall semesters\n Spring in ay.semesters and Fall in ay.semesters\n // Optional Summer semester\n Summer in ay.semesters implies #ay.semesters = 3\n // Semester durations\n Spring.weeks = 17\n Fall.weeks = 17\n Summer.weeks = 8\n // Valid semester dates\n all s: Semester | s.startDate < s.endDate\n }\n}\n\n// 6. Facts - Student Academic Rules\nfact StudentRules {\n // Rule 5: Unique roll numbers\n all s1, s2: Student | s1 != s2 implies s1.rollNumber != s2.rollNumber\n \n // Rule 6: Attendance requirements with condonation\n all s: Student | {\n s.attendance >= 80 or \n (s.attendance < 80 implies all c: s.courses | c.isIncomplete = True)\n }\n \n // Rule 16: Concurrent admission restriction\n all s: Student | s.degreeProgram.isConcurrentAllowed = False\n}\n\n// 7. Facts - Course Registration Rules\nfact CourseRegistrationRules {\n // Rule 8-9: Course load requirements\n all s: Student | {\n // New student course load\n s.isNewStudent = True implies {\n #s.courses = 5\n s.registeredCredits >= 15 and s.registeredCredits <= 18\n }\n \n // Applied Programming requirement for non-FAST MS\n (s.degreeProgram.name = \"MS\" and not s.degreeProgram.name = \"FAST\") implies\n some c: s.courses | c.name = \"Applied Programming\" and c.isMandatory = True\n }\n}\n\n// 8. Facts - Summer Semester Rules\nfact SummerRules {\n // Rule 19: Summer specific constraints\n all s: Student | Summer in s.degreeProgram implies {\n // Only previously taken courses\n all c: s.courses | c in Student.courses\n // Maximum two courses\n #s.courses <= 2\n // No scholarships in summer\n s.isScholarship = False\n // Minimum enrollment requirement\n all c: Course | #(Student & c.~courses) >= 10\n // Campus flexibility\n one c: Campus | s.studyCampus = c\n // No visiting faculty\n all f: Faculty | f.isVisiting = False\n }\n}\n\n// 9. Facts - Language and Instruction Rules\nfact LanguageRules {\n // Rule 7: Medium of instruction\n all c: Course | {\n c.language = English or \n (c.name = \"Religious and Islamic Studies\" implies \n (c.language = English or c.language = Urdu))\n }\n}\n\n// 10. Facts - Financial and Fee Rules\nfact FinancialRules {\n // Rules 12-15: Fee and scholarship management\n all s: Student | {\n // Fee payment requirements\n s.feesPaid = True implies s.previousDuesCleared = True\n \n // Freezing semester rules\n s.frozenSemesters > 0 implies {\n s.freezingFeeAdvancePaid = True\n s.feeStatus = Frozen\n s.frozenSemesters <= 2\n }\n \n // Scholarship cancellation on academic warning\n s.isScholarship = True and s.isInAcademicWarning = True implies s.isScholarship = False\n }\n}\n\n// 11. Facts - Credit Exemption Rules\nfact CreditExemptionRules {\n // Rule 20: Grade-based credit exemption\n all c: Course | {\n // Bachelor program requirements\n (c.grade = GradeC or c.grade = GradeB or c.grade = GradeA) implies {\n some s: Student | s.degreeProgram.name = \"Bachelor\" and c in s.courses\n }\n // Master program requirements\n (c.grade = GradeBMinus or c.grade = GradeB or c.grade = GradeA) implies {\n some s: Student | s.degreeProgram.name = \"Master\" and c in s.courses\n }\n // Prerequisite handling\n all pre: c.preReq | pre.grade != GradeF\n }\n}\n\n// 12. Assertions\nassert AcademicYearValidation {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3\n}\n\nassert StudentAttendanceValidation {\n all s: Student | s.attendance >= 80 or (s.attendance < 80 and s.isInAcademicWarning = True)\n}\n\nassert LanguageValidation {\n all c: Course | c.language = English or \n (c.name = \"Religious and Islamic Studies\" implies \n (c.language = English or c.language = Urdu))\n}\n\nassert FeeAndScholarshipValidation {\n all s: Student | s.isScholarship = True implies s.feesPaid = True\n}\n\n// 13. Execution Commands\nrun {} for 3\n// run AcademicYearValidation for 4\n// check StudentAttendanceValidation for 4\n// check LanguageValidation for 4\n// check FeeAndScholarshipValidation for 4", "permalink": "flip-tinsel-gladly-woven", "time": "2024-11-20 04:25:49.295987", "cmd": 1} {"id": 24272, "parent": 24271, "code": "// 1. Basic Academic Structure Signatures\nabstract sig Semester {\n startDate: Int, // Start date of the semester\n endDate: Int, // End date of the semester\n weeks: Int // Duration in weeks\n}\none sig Spring, Fall extends Semester {} // Regular Semesters\nlone sig Summer extends Semester {} // Optional Summer Semester\n\nsig AcademicYear {\n semesters: set Semester // Semesters in academic year\n}\n\nsig Campus {} // For summer campus rules\n\n// 2. Academic Personnel Signatures\nabstract sig Boolean {}\none sig True, False extends Boolean {}\n\nsig Faculty {\n isVisiting: Boolean // Tracks visiting faculty status\n}\n\n// 3. Course and Language Related Signatures\nabstract sig Language {}\none sig English, Urdu extends Language {} // Language options for courses\n\nabstract sig Grade {}\none sig GradeA, GradeB, GradeC, GradeBMinus, GradeF extends Grade {} // Grade classifications\n\nsig Course {\n name: String, // Course name\n creditHours: Int, // Credit hours\n preReq: set Course, // Pre-requisite courses\n isMandatory: Boolean, // Mandatory status\n isIncomplete: Boolean, // Incomplete status\n faculty: Faculty, // Assigned faculty\n language: Language, // Instruction language\n grade: Grade // Course grade\n}\n\n// 4. Student and Program Signatures\nsig DegreeProgram {\n name: String, // Program name\n isConcurrentAllowed: Boolean // Concurrent admission status\n}\n\nabstract sig FeeStatus {}\none sig Paid, Frozen extends FeeStatus {} // Fee payment status\n\nsig Student {\n // Basic Information\n rollNumber: Int, // Unique identifier\n attendance: Int, // Attendance percentage\n \n // Academic Status\n isScholarship: Boolean, // Scholarship status\n isInAcademicWarning: Boolean,// Academic warning status\n isNewStudent: Boolean, // New student status\n \n // Course Registration\n courses: set Course, // Registered courses\n registeredCredits: Int, // Total credit hours\n degreeProgram: DegreeProgram, // Enrolled program\n \n // Financial Status\n feesPaid: Boolean, // Fee payment status\n feeStatus: FeeStatus, // Current fee status\n previousDuesCleared: Boolean,// Previous dues clearance\n freezingFeeAdvancePaid: Boolean, // Freezing fee status\n \n // Administrative\n frozenSemesters: Int, // Number of frozen semesters\n studyCampus: Campus // Campus location\n}\n\n// 5. Facts - Academic Calendar Rules\nfact SemesterRules {\n // Rule 1-4: Semester structure\n all ay: AcademicYear | {\n // Mandatory Spring and Fall semesters\n Spring in ay.semesters and Fall in ay.semesters\n // Optional Summer semester\n Summer in ay.semesters implies #ay.semesters = 3\n // Semester durations\n Spring.weeks = 17\n Fall.weeks = 17\n Summer.weeks = 8\n // Valid semester dates\n all s: Semester | s.startDate < s.endDate\n }\n}\n\n// 6. Facts - Student Academic Rules\nfact StudentRules {\n // Rule 5: Unique roll numbers\n all s1, s2: Student | s1 != s2 implies s1.rollNumber != s2.rollNumber\n \n // Rule 6: Attendance requirements with condonation\n all s: Student | {\n s.attendance >= 80 or \n (s.attendance < 80 implies all c: s.courses | c.isIncomplete = True)\n }\n \n // Rule 16: Concurrent admission restriction\n all s: Student | s.degreeProgram.isConcurrentAllowed = False\n}\n\n// 7. Facts - Course Registration Rules\nfact CourseRegistrationRules {\n // Rule 8-9: Course load requirements\n all s: Student | {\n // New student course load\n s.isNewStudent = True implies {\n #s.courses = 5\n s.registeredCredits >= 15 and s.registeredCredits <= 18\n }\n \n // Applied Programming requirement for non-FAST MS\n (s.degreeProgram.name = \"MS\" and not s.degreeProgram.name = \"FAST\") implies\n some c: s.courses | c.name = \"Applied Programming\" and c.isMandatory = True\n }\n}\n\n// 8. Facts - Summer Semester Rules\nfact SummerRules {\n // Rule 19: Summer specific constraints\n all s: Student | Summer in s.degreeProgram implies {\n // Only previously taken courses\n all c: s.courses | c in Student.courses\n // Maximum two courses\n #s.courses <= 2\n // No scholarships in summer\n s.isScholarship = False\n // Minimum enrollment requirement\n all c: Course | #(Student & c.~courses) >= 10\n // Campus flexibility\n one c: Campus | s.studyCampus = c\n // No visiting faculty\n all f: Faculty | f.isVisiting = False\n }\n}\n\n// 9. Facts - Language and Instruction Rules\nfact LanguageRules {\n // Rule 7: Medium of instruction\n all c: Course | {\n c.language = English or \n (c.name = \"Religious and Islamic Studies\" implies \n (c.language = English or c.language = Urdu))\n }\n}\n\n// 10. Facts - Financial and Fee Rules\nfact FinancialRules {\n // Rules 12-15: Fee and scholarship management\n all s: Student | {\n // Fee payment requirements\n s.feesPaid = True implies s.previousDuesCleared = True\n \n // Freezing semester rules\n s.frozenSemesters > 0 implies {\n s.freezingFeeAdvancePaid = True\n s.feeStatus = Frozen\n s.frozenSemesters <= 2\n }\n \n // Scholarship cancellation on academic warning\n s.isScholarship = True and s.isInAcademicWarning = True implies s.isScholarship = False\n }\n}\n\n// 11. Facts - Credit Exemption Rules\nfact CreditExemptionRules {\n // Rule 20: Grade-based credit exemption\n all c: Course | {\n // Bachelor program requirements\n (c.grade = GradeC or c.grade = GradeB or c.grade = GradeA) implies {\n some s: Student | s.degreeProgram.name = \"Bachelor\" and c in s.courses\n }\n // Master program requirements\n (c.grade = GradeBMinus or c.grade = GradeB or c.grade = GradeA) implies {\n some s: Student | s.degreeProgram.name = \"Master\" and c in s.courses\n }\n // Prerequisite handling\n all pre: c.preReq | pre.grade != GradeF\n }\n}\n\n// 12. Assertions\nassert AcademicYearValidation {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3\n}\n\nassert StudentAttendanceValidation {\n all s: Student | s.attendance >= 80 or (s.attendance < 80 and s.isInAcademicWarning = True)\n}\n\nassert LanguageValidation {\n all c: Course | c.language = English or \n (c.name = \"Religious and Islamic Studies\" implies \n (c.language = English or c.language = Urdu))\n}\n\nassert FeeAndScholarshipValidation {\n all s: Student | s.isScholarship = True implies s.feesPaid = True\n}\n\n// 13. Execution Commands\nrun {} for 3\n// run AcademicYearValidation for 4\n// check StudentAttendanceValidation for 4\n// check LanguageValidation for 4\n// check FeeAndScholarshipValidation for 4", "permalink": "shame-jersey-icon-citric", "time": "2024-11-19 09:40:05.941337", "cmd": 1} {"id": 24447, "parent": null, "code": "// 1. Basic Academic Structure Signatures\nabstract sig Semester {\n startDate: Int, // Start date of the semester\n endDate: Int, // End date of the semester\n weeks: Int // Duration in weeks\n}\none sig Spring, Fall extends Semester {} // Regular Semesters\nlone sig Summer extends Semester {} // Optional Summer Semester\n\nsig AcademicYear {\n semesters: set Semester // Semesters in academic year\n}\n\nsig Campus {} // For summer campus rules\n\n// 2. Academic Personnel Signatures\nabstract sig Boolean {}\none sig True, False extends Boolean {}\n\nsig Faculty {\n isVisiting: Boolean // Tracks visiting faculty status\n}\n\n// 3. Course and Language Related Signatures\nabstract sig Language {}\none sig English, Urdu extends Language {} // Language options for courses\n\nabstract sig Grade {}\none sig GradeA, GradeB, GradeC, GradeBMinus, GradeF extends Grade {} // Grade classifications\n\nsig Course {\n name: String, // Course name\n creditHours: Int, // Credit hours\n preReq: set Course, // Pre-requisite courses\n isMandatory: Boolean, // Mandatory status\n isIncomplete: Boolean, // Incomplete status\n faculty: Faculty, // Assigned faculty\n language: Language, // Instruction language\n grade: Grade // Course grade\n}\n\n// 4. Student and Program Signatures\nsig DegreeProgram {\n name: String, // Program name\n isConcurrentAllowed: Boolean // Concurrent admission status\n}\n\nabstract sig FeeStatus {}\none sig Paid, Frozen extends FeeStatus {} // Fee payment status\n\nsig Student {\n // Basic Information\n rollNumber: Int, // Unique identifier\n attendance: Int, // Attendance percentage\n \n // Academic Status\n isScholarship: Boolean, // Scholarship status\n isInAcademicWarning: Boolean,// Academic warning status\n isNewStudent: Boolean, // New student status\n \n // Course Registration\n courses: set Course, // Registered courses\n registeredCredits: Int, // Total credit hours\n degreeProgram: DegreeProgram, // Enrolled program\n \n // Financial Status\n feesPaid: Boolean, // Fee payment status\n feeStatus: FeeStatus, // Current fee status\n previousDuesCleared: Boolean,// Previous dues clearance\n freezingFeeAdvancePaid: Boolean, // Freezing fee status\n \n // Administrative\n frozenSemesters: Int, // Number of frozen semesters\n studyCampus: Campus // Campus location\n}\n\n// 5. Facts - Academic Calendar Rules\nfact SemesterRules {\n // Rule 1-4: Semester structure\n all ay: AcademicYear | {\n // Mandatory Spring and Fall semesters\n Spring in ay.semesters and Fall in ay.semesters\n // Optional Summer semester\n Summer in ay.semesters implies #ay.semesters = 3\n // Semester durations\n Spring.weeks = 17\n Fall.weeks = 17\n Summer.weeks = 8\n // Valid semester dates\n all s: Semester | s.startDate < s.endDate\n }\n}\n\n// 6. Facts - Student Academic Rules\nfact StudentRules {\n // Rule 5: Unique roll numbers\n all s1, s2: Student | s1 != s2 implies s1.rollNumber != s2.rollNumber\n \n // Rule 6: Attendance requirements with condonation\n all s: Student | {\n s.attendance >= 80 or \n (s.attendance < 80 implies all c: s.courses | c.isIncomplete = True)\n }\n \n // Rule 16: Concurrent admission restriction\n all s: Student | s.degreeProgram.isConcurrentAllowed = False\n}\n\n// 7. Facts - Course Registration Rules\nfact CourseRegistrationRules {\n // Rule 8-9: Course load requirements\n all s: Student | {\n // New student course load\n s.isNewStudent = True implies {\n #s.courses = 5\n s.registeredCredits >= 15 and s.registeredCredits <= 18\n }\n \n // Applied Programming requirement for non-FAST MS\n (s.degreeProgram.name = \"MS\" and not s.degreeProgram.name = \"FAST\") implies\n some c: s.courses | c.name = \"Applied Programming\" and c.isMandatory = True\n }\n}\n\n// 8. Facts - Summer Semester Rules\nfact SummerRules {\n // Rule 19: Summer specific constraints\n all s: Student | Summer in s.degreeProgram implies {\n // Only previously taken courses\n all c: s.courses | c in Student.courses\n // Maximum two courses\n #s.courses <= 2\n // No scholarships in summer\n s.isScholarship = False\n // Minimum enrollment requirement\n all c: Course | #(Student & c.~courses) >= 10\n // Campus flexibility\n one c: Campus | s.studyCampus = c\n // No visiting faculty\n all f: Faculty | f.isVisiting = False\n }\n}\n\n// 9. Facts - Language and Instruction Rules\nfact LanguageRules {\n // Rule 7: Medium of instruction\n all c: Course | {\n c.language = English or \n (c.name = \"Religious and Islamic Studies\" implies \n (c.language = English or c.language = Urdu))\n }\n}\n\n// 10. Facts - Financial and Fee Rules\nfact FinancialRules {\n // Rules 12-15: Fee and scholarship management\n all s: Student | {\n // Fee payment requirements\n s.feesPaid = True implies s.previousDuesCleared = True\n \n // Freezing semester rules\n s.frozenSemesters > 0 implies {\n s.freezingFeeAdvancePaid = True\n s.feeStatus = Frozen\n s.frozenSemesters <= 2\n }\n \n // Scholarship cancellation on academic warning\n s.isScholarship = True and s.isInAcademicWarning = True implies s.isScholarship = False\n }\n}\n\n// 11. Facts - Credit Exemption Rules\nfact CreditExemptionRules {\n // Rule 20: Grade-based credit exemption\n all c: Course | {\n // Bachelor program requirements\n (c.grade = GradeC or c.grade = GradeB or c.grade = GradeA) implies {\n some s: Student | s.degreeProgram.name = \"Bachelor\" and c in s.courses\n }\n // Master program requirements\n (c.grade = GradeBMinus or c.grade = GradeB or c.grade = GradeA) implies {\n some s: Student | s.degreeProgram.name = \"Master\" and c in s.courses\n }\n // Prerequisite handling\n all pre: c.preReq | pre.grade != GradeF\n }\n}\n\n// 12. Assertions\nassert AcademicYearValidation {\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3\n}\n\nassert StudentAttendanceValidation {\n all s: Student | s.attendance >= 80 or (s.attendance < 80 and s.isInAcademicWarning = True)\n}\n\nassert LanguageValidation {\n all c: Course | c.language = English or \n (c.name = \"Religious and Islamic Studies\" implies \n (c.language = English or c.language = Urdu))\n}\n\nassert FeeAndScholarshipValidation {\n all s: Student | s.isScholarship = True implies s.feesPaid = True\n}\n\n// 13. Execution Commands\nrun {} for 3\n// run AcademicYearValidation for 4\n// check StudentAttendanceValidation for 4\n// check LanguageValidation for 4\n// check FeeAndScholarshipValidation for 4", "permalink": "tank-trial-fabric-dork", "time": "2024-11-19 19:26:46.438983", "cmd": 1} {"id": 24274, "parent": null, "code": "//Anum Batool (anonymized)\n// ***** Signatures ***** //\n\n\n// ***** Facts and Assertions ***** //\n\n\nrun {} for 5", "permalink": "onion-props-gauze-cola", "time": "2024-11-19 13:49:42.958378", "cmd": 1} {"id": 24277, "parent": 24276, "code": "//Anum Batool (anonymized)\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { semesters: some Semester }\n\n// *** Semester ***\nabstract sig Semester {}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n\n// *** Academic Year Constraints *** //\n\nrun {} for 5", "permalink": "poison-fit-bagful-cannon", "time": "2024-11-19 15:25:08.793033", "cmd": 1} {"id": 24275, "parent": 24274, "code": "//Anum Batool (anonymized)\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { semesters: some Semester }\n\n// *** Semester ***\nabstract sig Semester {}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n\n// *** Academic Year Constraints *** //\n\nrun {} for 5", "permalink": "moving-gully-poster-veggie", "time": "2024-11-19 14:31:14.924262", "cmd": 1} {"id": 24276, "parent": 24275, "code": "//Anum Batool (anonymized)\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { semesters: some Semester }\n\n// *** Semester ***\nabstract sig Semester {}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n\n// *** Academic Year Constraints *** //\n\nrun {} for 5", "permalink": "next-turban-bucket-barbed", "time": "2024-11-19 14:31:23.251577", "cmd": 1} {"id": 24278, "parent": null, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\nsig AcademicYear {\n semesters: set Semester\n}\nabstract sig Semester {}\n\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Rule 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\n\n\nrun {}", "permalink": "creole-catsup-caddy-update", "time": "2024-11-19 16:18:34.245887", "cmd": 1} {"id": 24280, "parent": 24279, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// abstract sig Boolean {}\n// one sig True extends Boolean {}\n// one sig False extends Boolean {}\n\nsig AcademicYear {\n semesters: set Semester\n}\nabstract sig Semester {}\n\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Rule 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\n\n\nrun {}", "permalink": "oozy-woozy-aroma-lazy", "time": "2024-11-19 16:19:08.728012", "cmd": 1} {"id": 24279, "parent": 24278, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// abstract sig Boolean {}\n// one sig True extends Boolean {}\n// one sig False extends Boolean {}\n\nsig AcademicYear {\n semesters: set Semester\n}\nabstract sig Semester {}\n\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Rule 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n}\nassert MaxSemesters {\n all ay: AcademicYear | #ay.semesters <= 3\n}\n\n\nrun {}", "permalink": "job-email-sleet-spill", "time": "2024-11-19 16:18:54.513703", "cmd": 1} {"id": 24281, "parent": 24280, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// abstract sig Boolean {}\n// one sig True extends Boolean {}\n// one sig False extends Boolean {}\n\nsig AcademicYear {\n semesters: set Semester\n}\nabstract sig Semester {}\n\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Rule 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n}\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n\n\nrun {}", "permalink": "gents-chuck-scant-bless", "time": "2024-11-19 16:19:40.407406", "cmd": 1} {"id": 24282, "parent": 24281, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// abstract sig Boolean {}\n// one sig True extends Boolean {}\n// one sig False extends Boolean {}\n\nsig AcademicYear {\n semesters: set Semester\n}\nabstract sig Semester {}\n\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Rule 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n}\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n\n\nrun {}", "permalink": "shrink-stump-lint-spout", "time": "2024-11-19 16:19:47.950490", "cmd": 1} {"id": 24283, "parent": 24282, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// abstract sig Boolean {}\n// one sig True extends Boolean {}\n// one sig False extends Boolean {}\n\nsig AcademicYear {\n semesters: set Semester\n}\nabstract sig Semester {}\n\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Rule 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Rule 2: Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n\n\nrun {}", "permalink": "oozy-depict-rash-gents", "time": "2024-11-19 16:21:23.587454", "cmd": 1} {"id": 24285, "parent": 24284, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// abstract sig Boolean {}\n// one sig True extends Boolean {}\n// one sig False extends Boolean {}\n\nsig AcademicYear {\n semesters: set Semester\n}\nabstract sig Semester {}\n\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Rule 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Rule 2: Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n // Rule 3: Two academic years cannot have the same semester\n all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n}\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n\n\nrun {}", "permalink": "marrow-cannon-tiara-carol", "time": "2024-11-19 16:23:15.772952", "cmd": 1} {"id": 24286, "parent": 24285, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// abstract sig Boolean {}\n// one sig True extends Boolean {}\n// one sig False extends Boolean {}\n\nsig AcademicYear {\n semesters: set Semester\n}\nabstract sig Semester {}\n\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Rule 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Rule 2: Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n // Rule 3: Two academic years cannot have the same semester\n all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n}\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n\n\nrun {}", "permalink": "bobble-trophy-stucco-march", "time": "2024-11-19 16:23:22.068647", "cmd": 1} {"id": 24284, "parent": 24283, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// abstract sig Boolean {}\n// one sig True extends Boolean {}\n// one sig False extends Boolean {}\n\nsig AcademicYear {\n semesters: set Semester\n}\nabstract sig Semester {}\n\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Rule 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Rule 2: Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n // Rule 3: Two academic years cannot have the same semester\n all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n}\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n\n\nrun {}", "permalink": "casket-lived-kebab-recant", "time": "2024-11-19 16:22:55.330950", "cmd": 1} {"id": 24287, "parent": 24286, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// abstract sig Boolean {}\n// one sig True extends Boolean {}\n// one sig False extends Boolean {}\n\nsig AcademicYear {\n semesters: set Semester\n}\nabstract sig Semester {}\n\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Rule 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Rule 2: Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n }\n\nrun {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n", "permalink": "manned-repeal-purity-could", "time": "2024-11-19 16:23:48.862430", "cmd": 1} {"id": 24288, "parent": 24287, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nabstract sig Semester {}\n\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Rule 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Rule 2: Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n }\n\nrun {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n\n// abstract sig Boolean {}\n// one sig True extends Boolean {}\n// one sig False extends Boolean {}", "permalink": "backup-given-catnip-fling", "time": "2024-11-19 16:24:18.637500", "cmd": 1} {"id": 24289, "parent": 24288, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nabstract sig Semester {}\n\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Constraint 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n }\n\nrun {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n\n// abstract sig Boolean {}\n// one sig True extends Boolean {}\n// one sig False extends Boolean {}", "permalink": "left-album-boxing-strike", "time": "2024-11-19 16:27:00.949221", "cmd": 1} {"id": 24290, "parent": 24277, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\nenum Number {17, 8, 1100}\nenum Bool {True, False}\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { semesters: some Semester }\n\n// *** Semester ***\nabstract sig Semester {\n duration: one Number,\n isStartDateGreaterThanEndDate: one Bool\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints *** //\nassert SemesterDurationConstraint {\n all s: Semester | s.isStartDateGreaterThanEndDate = True\n}\n// *** Semester Constraints *** //\n\nrun {} for 5", "permalink": "jam-sludge-landed-thrive", "time": "2024-11-19 16:27:07.024802", "cmd": 1} {"id": 24291, "parent": 24290, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\nenum Bool {True, False}\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { semesters: some Semester }\n\n// *** Semester ***\nabstract sig Semester {\n duration: one Number,\n isStartDateGreaterThanEndDate: one Bool\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints *** //\nassert SemesterDurationConstraint {\n all s: Semester | s.isStartDateGreaterThanEndDate = True\n}\n// *** Semester Constraints *** //\n\nrun {} for 5", "permalink": "pug-send-amount-album", "time": "2024-11-19 16:28:00.103971", "cmd": 1} {"id": 24292, "parent": 24291, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\nenum Bool {True, False}\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { semesters: some Semester }\n\n// *** Semester ***\nabstract sig Semester {\n duration: one Int,\n isStartDateGreaterThanEndDate: one Bool\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints *** //\nassert SemesterDurationConstraint {\n all s: Semester | s.isStartDateGreaterThanEndDate = True\n}\n// *** Semester Constraints *** //\n\nrun {} for 5", "permalink": "cone-unbent-swan-impose", "time": "2024-11-19 16:28:13.191144", "cmd": 1} {"id": 24293, "parent": 24292, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\nenum Bool {True, False}\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { semesters: some Semester }\n\n// *** Semester ***\nabstract sig Semester {\n duration: one Int,\n isStartDateGreaterThanEndDate: one Bool\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints *** //\nfact SemesterDurationConstraint {\n all s: Semester | s.isStartDateGreaterThanEndDate = True\n}\n// *** Semester Constraints *** //\n\nrun {} for 5", "permalink": "uncle-frayed-upwind-ending", "time": "2024-11-19 16:29:08.740466", "cmd": 1} {"id": 24294, "parent": 24289, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nabstract sig Semester {\n duration: one Int\n}\n\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Constraint 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n Spring.duration = 17\n Fall.duration = 17\n Summer.duration = 8\n}\n\nrun {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n\n// abstract sig Boolean {}\n// one sig True extends Boolean {}\n// one sig False extends Boolean {}", "permalink": "plop-neuron-arson-fling", "time": "2024-11-19 16:29:51.261522", "cmd": 1} {"id": 24295, "parent": 24294, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nabstract sig Semester {\n duration: one Int\n}\n\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Constraint 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n Spring.duration = 17\n Fall.duration = 17\n Summer.duration = 8\n}\n\nrun {} for 2 AcademicYear, 3 Semester, 17 Int\n\n//run {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n\n// abstract sig Boolean {}\n// one sig True extends Boolean {}\n// one sig False extends Boolean {}", "permalink": "folic-comply-crank-canned", "time": "2024-11-19 16:30:50.438091", "cmd": 1} {"id": 24297, "parent": 24296, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nabstract sig Semester {\n duration: one Int\n}\n\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Constraint 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n Spring.duration = 17\n Fall.duration = 17\n Summer.duration = 8\n}\n\nrun {} for 17 Int\n\n//run {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n\n// abstract sig Boolean {}\n// one sig True extends Boolean {}\n// one sig False extends Boolean {}", "permalink": "always-kooky-cinema-arming", "time": "2024-11-19 16:31:01.276455", "cmd": 1} {"id": 24298, "parent": 24297, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nabstract sig Semester {\n duration: one Int\n}\n\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Constraint 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n Spring.duration = 17\n Fall.duration = 17\n Summer.duration = 8\n}\n\nrun {} for 17 Int\n\n//run {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n\n// abstract sig Boolean {}\n// one sig True extends Boolean {}\n// one sig False extends Boolean {}", "permalink": "foyer-last-half-census", "time": "2024-11-19 16:31:08.448480", "cmd": 1} {"id": 24296, "parent": 24295, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\nabstract sig Semester {\n duration: one Int\n}\n\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Constraint 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n Spring.duration = 17\n Fall.duration = 17\n Summer.duration = 8\n}\n\nrun {} for 17 Int\n\n//run {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n\n// abstract sig Boolean {}\n// one sig True extends Boolean {}\n// one sig False extends Boolean {}", "permalink": "simply-tabby-delay-xerox", "time": "2024-11-19 16:30:59.034749", "cmd": 1} {"id": 24299, "parent": 24298, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\nabstract sig Duration {}\none sig SeventeenWeeks extends Duration {}\nlone sig EightWeeks extends Duration {}\n\nabstract sig Semester {\n duration: one Int\n}\n\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Constraint 1 (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n \n // Constraint 2: Semester durations\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n Summer.duration = EightWeeks\n\n}\n\nrun {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n\n// abstract sig Boolean {}\n// one sig True extends Boolean {}\n// one sig False extends Boolean {}", "permalink": "curse-hazing-herbal-perish", "time": "2024-11-19 16:33:00.876788", "cmd": 1} {"id": 24300, "parent": 24299, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\nabstract sig Duration {}\none sig SeventeenWeeks extends Duration {}\nlone sig EightWeeks extends Duration {}\n\nabstract sig Semester {\n duration: one Int\n}\n\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Constraint 1: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n \n // Constraint 2: Semester durations\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n Summer.duration = EightWeeks\n\n}\n\nrun {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n\n// abstract sig Boolean {}\n// one sig True extends Boolean {}\n// one sig False extends Boolean {}", "permalink": "diner-giggly-unbent-bogged", "time": "2024-11-19 16:33:06.951149", "cmd": 1} {"id": 24301, "parent": 24300, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\nabstract sig Semester {\n duration: one Int\n}\n\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Constraint 1: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n \n // Constraint 2: Semester durations\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n Summer.duration = EightWeeks\n\n}\n\nrun {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n\n// abstract sig Boolean {}\n// one sig True extends Boolean {}\n// one sig False extends Boolean {}", "permalink": "mutiny-casket-tint-polio", "time": "2024-11-19 16:33:17.405462", "cmd": 1} {"id": 24302, "parent": 24301, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\nabstract sig Semester {\n duration: one Int\n}\n\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Constraint 1: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n \n \n\n}\n\nassert duration {\n // Constraint 2: Semester durations\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n Summer.duration = EightWeeks\n}\n\nrun {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n\n// abstract sig Boolean {}\n// one sig True extends Boolean {}\n// one sig False extends Boolean {}", "permalink": "deny-tattoo-banter-flirt", "time": "2024-11-19 16:34:06.896847", "cmd": 1} {"id": 24303, "parent": 24302, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\nabstract sig Semester {\n duration: one Duration\n}\n\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Constraint 1: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n \n \n\n}\n\nassert duration {\n // Constraint 2: Semester durations\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n Summer.duration = EightWeeks\n}\n\nrun {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n\n// abstract sig Boolean {}\n// one sig True extends Boolean {}\n// one sig False extends Boolean {}", "permalink": "pushup-pouch-buffed-huddle", "time": "2024-11-19 16:34:19.122389", "cmd": 1} {"id": 24304, "parent": 24303, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\nabstract sig Semester {\n duration: one Duration\n}\n\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Constraint 1: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n \n all s: Fall | #s.duration = SeventeenWeeks\n all s: Spring | #s.duration = SeventeenWeeks\n \n\n}\n\nassert duration {\n // Constraint 2: Semester durations\n //Spring.duration = SeventeenWeeks\n //Fall.duration = SeventeenWeeks\n Summer.duration = EightWeeks\n}\n\nrun {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n\n// abstract sig Boolean {}\n// one sig True extends Boolean {}\n// one sig False extends Boolean {}", "permalink": "mangy-each-scabby-shone", "time": "2024-11-19 16:35:35.147764", "cmd": 1} {"id": 24305, "parent": 24304, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\nabstract sig Semester {\n duration: one Duration\n}\n\none sig Spring extends Semester {\n duration: one SeventeenWeeks\n}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Constraint 1: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n \n //all s: Fall | #s.duration = SeventeenWeeks\n //all s: Spring | #s.duration = SeventeenWeeks\n \n\n}\n\nassert duration {\n // Constraint 2: Semester durations\n //Spring.duration = SeventeenWeeks\n //Fall.duration = SeventeenWeeks\n //Summer.duration = EightWeeks\n}\n\nrun {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n\n// abstract sig Boolean {}\n// one sig True extends Boolean {}\n// one sig False extends Boolean {}", "permalink": "ramp-kabob-alias-irk", "time": "2024-11-19 16:36:23.040088", "cmd": 1} {"id": 24306, "parent": 24305, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\nabstract sig Semester {\n //duration: one Duration\n}\n\none sig Spring extends Semester {\n duration: one SeventeenWeeks\n}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Constraint 1: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n \n //all s: Fall | #s.duration = SeventeenWeeks\n //all s: Spring | #s.duration = SeventeenWeeks\n \n\n}\n\nassert duration {\n // Constraint 2: Semester durations\n //Spring.duration = SeventeenWeeks\n //Fall.duration = SeventeenWeeks\n //Summer.duration = EightWeeks\n}\n\nrun {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n\n// abstract sig Boolean {}\n// one sig True extends Boolean {}\n// one sig False extends Boolean {}", "permalink": "resent-jiffy-bless-acts", "time": "2024-11-19 16:36:37.162349", "cmd": 1} {"id": 24307, "parent": 24306, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\nabstract sig Semester {}\n\none sig Spring extends Semester {\n duration: one SeventeenWeeks\n}\none sig Fall extends Semester {\n duration: one SeventeenWeeks\n}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Constraint 1: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n \n //all s: Fall | #s.duration = SeventeenWeeks\n //all s: Spring | #s.duration = SeventeenWeeks\n \n\n}\n\nassert duration {\n // Constraint 2: Semester durations\n //Spring.duration = SeventeenWeeks\n //Fall.duration = SeventeenWeeks\n //Summer.duration = EightWeeks\n}\n\nrun {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n\n// abstract sig Boolean {}\n// one sig True extends Boolean {}\n// one sig False extends Boolean {}", "permalink": "shrimp-cavity-affair-velcro", "time": "2024-11-19 16:37:32.332394", "cmd": 1} {"id": 24308, "parent": 24307, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\nabstract sig Semester {}\n\none sig Spring extends Semester {\n duration: one SeventeenWeeks\n}\none sig Fall extends Semester {\n duration: one SeventeenWeeks\n}\nlone sig Summer extends Semester {\n duration: one EightWeeks\n} \n\nfact AcademicYearRules {\n // Constraint 1: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n \n // Constraint 2: every duration must belong to some semester\n all d: Duration | some s: Semester | d in s.duration\n\n}\n\nassert duration {\n // Constraint 2: Semester durations\n //Spring.duration = SeventeenWeeks\n //Fall.duration = SeventeenWeeks\n //Summer.duration = EightWeeks\n}\n\nrun {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n\n// abstract sig Boolean {}\n// one sig True extends Boolean {}\n// one sig False extends Boolean {}", "permalink": "haunt-battle-lingo-drier", "time": "2024-11-19 16:41:07.866641", "cmd": 1} {"id": 24309, "parent": 24308, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\nabstract sig Semester {}\n\none sig Spring extends Semester {\n duration: one SeventeenWeeks\n}\none sig Fall extends Semester {\n duration: one SeventeenWeeks\n}\nlone sig Summer extends Semester {\n duration: one EightWeeks\n} \n\nfact AcademicYearRules {\n // Constraint 1: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n \n // Constraint 2: every duration must belong to some semester\n all d: SeventeenWeeks | some s: Fall | d in s.duration\n\n}\n\nassert duration {\n // Constraint 2: Semester durations\n //Spring.duration = SeventeenWeeks\n //Fall.duration = SeventeenWeeks\n //Summer.duration = EightWeeks\n}\n\nrun {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n\n// abstract sig Boolean {}\n// one sig True extends Boolean {}\n// one sig False extends Boolean {}", "permalink": "shaky-maggot-wobbly-afar", "time": "2024-11-19 16:42:30.517758", "cmd": 1} {"id": 24310, "parent": 24309, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\nabstract sig Semester {}\n\none sig Spring extends Semester {\n duration: one SeventeenWeeks\n}\none sig Fall extends Semester {\n duration: one SeventeenWeeks\n}\nlone sig Summer extends Semester {\n duration: one EightWeeks\n} \n\nfact AcademicYearRules {\n // Constraint 1: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n \n // Constraint 2: every duration must belong to some semester\n all d: SeventeenWeeks | some s: Fall | d in s.duration\n all d: SeventeenWeeks | some s: Spring | d in s.duration\n all d: EightWeeks | some s: Summer | d in s.duration\n\n}\n\nassert duration {\n // Constraint 2: Semester durations\n //Spring.duration = SeventeenWeeks\n //Fall.duration = SeventeenWeeks\n //Summer.duration = EightWeeks\n}\n\nrun {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n\n// abstract sig Boolean {}\n// one sig True extends Boolean {}\n// one sig False extends Boolean {}", "permalink": "wow-henna-unused-gains", "time": "2024-11-19 16:42:53.955722", "cmd": 1} {"id": 24311, "parent": 24310, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\nabstract sig Semester {}\n\none sig Spring extends Semester {\n duration: one SeventeenWeeks // Constraint 2\n}\none sig Fall extends Semester { \n duration: one SeventeenWeeks // Constraint 2\n}\nlone sig Summer extends Semester {\n duration: one EightWeeks // Constraint 2\n} \n\nfact AcademicYearRules {\n // Constraint 1: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n \n // Constraint 2\n // Every duration must belong to some semester\n all d: SeventeenWeeks | some s: Fall | d in s.duration\n all d: SeventeenWeeks | some s: Spring | d in s.duration\n all d: EightWeeks | some s: Summer | d in s.duration\n\n}\n\nrun {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n\n// abstract sig Boolean {}\n// one sig True extends Boolean {}\n// one sig False extends Boolean {}", "permalink": "upbeat-chill-nuclei-raking", "time": "2024-11-19 16:44:25.219377", "cmd": 1} {"id": 24312, "parent": null, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\nabstract sig Semester {\n duration: one Duration\n}\n\none sig Spring extends Semester {\n //duration: one SeventeenWeeks // Constraint 2\n}\none sig Fall extends Semester { \n //duration: one SeventeenWeeks // Constraint 2\n}\nlone sig Summer extends Semester {\n //duration: one EightWeeks // Constraint 2\n} \n\nfact AcademicYearRules {\n // Constraint 1: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n \n // Constraint 2\n // Every duration must belong to some semester\n //all d: SeventeenWeeks | some s: Fall | d in s.duration\n //all d: SeventeenWeeks | some s: Spring | d in s.duration\n //all d: EightWeeks | some s: Summer | d in s.duration\n\n}\n\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n}\n\n\nrun {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n\n// abstract sig Boolean {}\n// one sig True extends Boolean {}\n// one sig False extends Boolean {}", "permalink": "bundle-haiku-huddle-deluge", "time": "2024-11-19 16:52:45.566806", "cmd": 1} {"id": 24313, "parent": 24293, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\nenum Bool {True, False}\nenum Numbers {\"17\"}\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { semesters: some Semester }\n\n// *** Semester ***\nabstract sig Semester {\n duration: one Int,\n isStartDateGreaterThanEndDate: one Bool\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\nfact SemesterDatesConstraint {\n all s: Semester | {\n //Start end date constraint\n s.isStartDateGreaterThanEndDate = True\n\n //\n\n }\n}\n\n\n// *** Semester Constraints *** //\n\nrun {} for 5", "permalink": "chatty-hazy-gong-earwig", "time": "2024-11-19 16:53:22.254355", "cmd": 1} {"id": 24314, "parent": 24312, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\nabstract sig Semester {\n duration: one Duration\n}\n\none sig Spring extends Semester {\n //duration: one SeventeenWeeks // Constraint 2\n}\none sig Fall extends Semester { \n //duration: one SeventeenWeeks // Constraint 2\n}\nlone sig Summer extends Semester {\n //duration: one EightWeeks // Constraint 2\n} \n\nfact AcademicYearRules {\n // Constraint 1: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n \n // Constraint 2\n // Every duration must belong to some semester\n //all d: SeventeenWeeks | some s: Fall | d in s.duration\n //all d: SeventeenWeeks | some s: Spring | d in s.duration\n //all d: EightWeeks | some s: Summer | d in s.duration\n\n}\n\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n all d: Duration | some s: Semester | d in s.duration\n}\n\n\nrun {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n\n// abstract sig Boolean {}\n// one sig True extends Boolean {}\n// one sig False extends Boolean {}", "permalink": "aloft-tricky-crook-womb", "time": "2024-11-19 16:53:36.796503", "cmd": 1} {"id": 24315, "parent": 24313, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\nenum Bool {True, False}\nenum Numbers {SevenTeen, Eight, ElevenThousand}\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { semesters: some Semester }\n\n// *** Semester ***\nabstract sig Semester {\n duration: one Int,\n isStartDateGreaterThanEndDate: one Bool\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\nfact SemesterDatesConstraint {\n all s: Semester | {\n //Start end date constraint\n s.isStartDateGreaterThanEndDate = True\n\n //\n\n }\n}\n\n\n// *** Semester Constraints *** //\n\nrun {} for 5", "permalink": "tyke-class-clone-that", "time": "2024-11-19 16:53:51.161881", "cmd": 1} {"id": 24316, "parent": 24314, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\nabstract sig Semester {\n duration: one Duration\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Constraint 1: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n\nrun {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n\n// abstract sig Boolean {}\n// one sig True extends Boolean {}\n// one sig False extends Boolean {}", "permalink": "ashes-traps-emit-lather", "time": "2024-11-19 16:55:04.247816", "cmd": 1} {"id": 24317, "parent": 24315, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\nenum Bool {True, False}\nenum Numbers {SevenTeen, Eight, ElevenThousand}\nenum Month {Jan, June, August}\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { semesters: some Semester }\n\n// *** Semester ***\nabstract sig Semester {\n duration: one Int,\n startMonth: one Month,\n isStartDateGreaterThanEndDate: one Bool\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\nfact SemesterDatesConstraint {\n all s: Semester | {\n //Start end date constraint\n s.isStartDateGreaterThanEndDate = True\n\n //Semester Durations Constraint\n (s in Spring or s in Fall) implies s.duration = SevenTeen\n (s in Summer) implies s.duration = Eight\n\n }\n}\n// *** Semester Constraints *** //\n\nrun {} for 5", "permalink": "doing-kitten-stray-causal", "time": "2024-11-19 16:57:21.597064", "cmd": 1} {"id": 24318, "parent": 24317, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\nenum Bool {True, False}\nenum Numbers {SevenTeen, Eight, ElevenThousand}\nenum Month {Jan, June, August}\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { semesters: some Semester }\n\n// *** Semester ***\nabstract sig Semester {\n duration: one Int,\n isStartDateGreaterThanEndDate: one Bool\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\nfact SemesterDatesConstraint {\n all s: Semester | {\n //Start end date constraint\n s.isStartDateGreaterThanEndDate = True\n\n //Semester Durations Constraint\n (s in Spring or s in Fall) implies s.duration = SevenTeen\n (s in Summer) implies s.duration = Eight\n }\n}\n// *** Semester Constraints *** //\n\nrun {} for 5", "permalink": "clutch-unfair-thrift-nape", "time": "2024-11-19 16:57:32.963564", "cmd": 1} {"id": 24319, "parent": 24318, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\nenum Bool {True, False}\nenum Numbers {SevenTeen, Eight, ElevenThousand}\nenum Month {Jan, June, August}\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { semesters: some Semester }\n\n// *** Semester ***\nabstract sig Semester {\n duration: one Int,\n isStartDateGreaterThanEndDate: one Bool\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\nfact SemesterDatesConstraint {\n all s: Semester | {\n //Start end date constraint\n s.isStartDateGreaterThanEndDate = True\n }\n}\n// *** Semester Constraints *** //\n\nrun {} for 5", "permalink": "fame-giving-giddy-anger", "time": "2024-11-19 16:57:41.140478", "cmd": 1} {"id": 24320, "parent": 24319, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\nenum Bool {True, False}\nenum Numbers {SevenTeen, Eight, ElevenThousand}\nenum Month {Jan, June, August}\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { semesters: some Semester }\n\n// *** Semester ***\nabstract sig Semester {\n duration: one Numbers,\n isStartDateGreaterThanEndDate: one Bool\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\nfact SemesterDatesConstraint {\n all s: Semester | {\n //Start end date constraint\n s.isStartDateGreaterThanEndDate = True\n\n (s in Spring or s in Fall) implies s.duration = SevenTeen\n (s in Summer) implies s.duration = Eight\n\n }\n}\n// *** Semester Constraints *** //\n\nrun {} for 5", "permalink": "skirt-oat-print-fleshy", "time": "2024-11-19 16:59:01.981007", "cmd": 1} {"id": 24321, "parent": 24320, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\nenum Bool {True, False}\nenum Numbers {SevenTeen, Eight, ElevenThousand}\nenum Month {Jan, June, August}\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { semesters: some Semester }\n\n// *** Semester ***\nabstract sig Semester {\n duration: one Numbers,\n startMonth: one Month,\n isStartDateGreaterThanEndDate: one Bool\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\nfact SemesterDatesConstraint {\n all s: Semester | {\n //Start end date constraint\n s.isStartDateGreaterThanEndDate = True\n\n //Duration Constraints\n (s in Spring or s in Fall) implies s.duration = SevenTeen\n (s in Summer) implies s.duration = Eight\n\n //Start Month Constraints\n (s in Spring) implies s.startMonth = Jan\n (s in Fall) implies s.startMonth = August\n (s in Summer) implies s.startMonth = June\n\n }\n}\n// *** Semester Constraints *** //\n\nrun {} for 5", "permalink": "taps-sphere-preppy-oblong", "time": "2024-11-19 17:01:14.899164", "cmd": 1} {"id": 24322, "parent": 24316, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1 extends Date{}\nsig April30 extends Date{}\nsig June1 extends Date{}\nsig July31 extends Date{}\nsig Aug10 extends Date{}\nsig Dec22 extends Date{}\n\nabstract sig Semester {\n duration: one Duration\n startdate: one Date\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Constraint 1: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n // Ordering of dates\n Jan1 = Spring.startdate\n April30 = Spring.enddate\n June1 = Summer.startdate\n July31 = Summer.startdate\n Aug10 = Fall.startdate\n Dec22 = Fall.enddate\n \n // end date must be greater than start date for each semester\n all s: Semester | s.startDate != s.endDate\n}\n\nrun {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n\n// abstract sig Boolean {}\n// one sig True extends Boolean {}\n// one sig False extends Boolean {}", "permalink": "wispy-defame-recede-chrome", "time": "2024-11-19 17:08:09.801640", "cmd": 1} {"id": 24323, "parent": 24322, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1 extends Date{}\nsig April30 extends Date{}\nsig June1 extends Date{}\nsig July31 extends Date{}\nsig Aug10 extends Date{}\nsig Dec22 extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Constraint 1: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n // Ordering of dates\n Jan1 = Spring.startdate\n April30 = Spring.enddate\n June1 = Summer.startdate\n July31 = Summer.startdate\n Aug10 = Fall.startdate\n Dec22 = Fall.enddate\n \n // end date must be greater than start date for each semester\n all s: Semester | s.startDate != s.endDate\n}\n\nrun {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n\n// abstract sig Boolean {}\n// one sig True extends Boolean {}\n// one sig False extends Boolean {}", "permalink": "epic-nibble-snazzy-verse", "time": "2024-11-19 17:08:23.503840", "cmd": 1} {"id": 24324, "parent": 24323, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1 extends Date{}\nsig April30 extends Date{}\nsig June1 extends Date{}\nsig July31 extends Date{}\nsig Aug10 extends Date{}\nsig Dec22 extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Constraint 1: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n // Ordering of dates\n Jan1 = Spring.startdate\n April30 = Spring.enddate\n June1 = Summer.startdate\n July31 = Summer.startdate\n Aug10 = Fall.startdate\n Dec22 = Fall.enddate\n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nrun {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n\n// abstract sig Boolean {}\n// one sig True extends Boolean {}\n// one sig False extends Boolean {}", "permalink": "patrol-crease-till-vice", "time": "2024-11-19 17:08:34.012841", "cmd": 1} {"id": 24325, "parent": 24324, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1 extends Date{}\nsig April30 extends Date{}\nsig June1 extends Date{}\nsig July31 extends Date{}\nsig Aug10 extends Date{}\nsig Dec22 extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Constraint 1: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n // Ordering of dates\n Spring.startdate = Jan1\n //April30 = Spring.enddate\n // June1 = Summer.startdate\n // July31 = Summer.startdate\n // Aug10 = Fall.startdate\n // Dec22 = Fall.enddate\n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nrun {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n\n// abstract sig Boolean {}\n// one sig True extends Boolean {}\n// one sig False extends Boolean {}", "permalink": "skinny-snarl-finite-reason", "time": "2024-11-19 17:09:01.816821", "cmd": 1} {"id": 24326, "parent": 24325, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Constraint 1: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n // Ordering of dates\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n // June1 = Summer.startdate\n // July31 = Summer.startdate\n // Aug10 = Fall.startdate\n // Dec22 = Fall.enddate\n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nrun {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n\n// abstract sig Boolean {}\n// one sig True extends Boolean {}\n// one sig False extends Boolean {}", "permalink": "acid-fried-album-racing", "time": "2024-11-19 17:10:00.830097", "cmd": 1} {"id": 24327, "parent": 24326, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Constraint 1: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n // Ordering of dates\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n // Aug10 = Fall.startdate\n // Dec22 = Fall.enddate\n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nrun {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n\n// abstract sig Boolean {}\n// one sig True extends Boolean {}\n// one sig False extends Boolean {}", "permalink": "motion-copper-muck-snugly", "time": "2024-11-19 17:10:26.080922", "cmd": 1} {"id": 24330, "parent": 24329, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Constraint 1: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n // Ordering of dates\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n Fall.enddate = Dec22_\n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nrun {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n\n// abstract sig Boolean {}\n// one sig True extends Boolean {}\n// one sig False extends Boolean {}", "permalink": "gulf-reps-roving-quit", "time": "2024-11-19 17:11:32.306806", "cmd": 1} {"id": 24328, "parent": 24327, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Constraint 1: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n // Ordering of dates\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n Fall.enddate = Dec22_\n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nrun {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n\n// abstract sig Boolean {}\n// one sig True extends Boolean {}\n// one sig False extends Boolean {}", "permalink": "tux-blurt-annex-single", "time": "2024-11-19 17:10:56.113739", "cmd": 1} {"id": 24329, "parent": 24328, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Constraint 1: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n // Ordering of dates\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //Fall.enddate = Dec22_\n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nrun {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n\n// abstract sig Boolean {}\n// one sig True extends Boolean {}\n// one sig False extends Boolean {}", "permalink": "nibble-scheme-shelf-wages", "time": "2024-11-19 17:11:10.329135", "cmd": 1} {"id": 24331, "parent": 24330, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Constraint 1: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //Fall.enddate = Dec22_\n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nfact date{\n Fall.enddate = Dec22_\n}\n\nrun {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n\n// abstract sig Boolean {}\n// one sig True extends Boolean {}\n// one sig False extends Boolean {}", "permalink": "party-corny-finch-coil", "time": "2024-11-19 17:12:04.864420", "cmd": 1} {"id": 24332, "parent": 24331, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Constraint 1: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //Fall.enddate = Dec22_\n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nrun {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n\n// abstract sig Boolean {}\n// one sig True extends Boolean {}\n// one sig False extends Boolean {}", "permalink": "scant-dandy-uncut-parole", "time": "2024-11-19 17:12:10.048223", "cmd": 1} {"id": 24333, "parent": 24332, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nfact AcademicYearRules {\n // Constraint 1: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nrun {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n\n// abstract sig Boolean {}\n// one sig True extends Boolean {}\n// one sig False extends Boolean {}", "permalink": "vastly-anthem-lake-retake", "time": "2024-11-19 17:14:13.031841", "cmd": 1} {"id": 24334, "parent": 24321, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\nenum Bool {True, False}\nenum Numbers {SevenTeen, Eight, ElevenThousand}\nenum Month {Jan, June, August}\nenum Language {Urdu, English}\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { semesters: some Semester }\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n courses: some Course\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\nsig Course {\n mediumOfInstruction: some Language\n \n}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\n\n// *** Course Constraints *** //\n\nrun {} for 5", "permalink": "mumps-array-kilt-hurray", "time": "2024-11-19 17:16:35.601727", "cmd": 1} {"id": 24335, "parent": 24333, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int\n}\n\nfact StudentRules {\n // Rule 5\n // Each student must have a unique roll number\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n}\n\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nrun {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n\n// abstract sig Boolean {}\n// one sig True extends Boolean {}\n// one sig False extends Boolean {}", "permalink": "edgy-baboon-ranged-tried", "time": "2024-11-19 17:18:12.262758", "cmd": 1} {"id": 24336, "parent": 24335, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int\n above80attendance: one Boolean\n eligibleToGiveExam: one Boolean\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n}\n\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies eligibleToGiveExam = True\n}\n\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nrun {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n", "permalink": "rare-dairy-diaper-rogue", "time": "2024-11-19 17:24:14.013082", "cmd": 1} {"id": 24337, "parent": 24336, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n}\n\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies eligibleToGiveExam = True\n}\n\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nrun {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n", "permalink": "valium-driver-liking-armed", "time": "2024-11-19 17:24:22.855829", "cmd": 1} {"id": 24338, "parent": 24334, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\nenum Bool {True, False}\nenum Numbers {SevenTeen, Eight, ElevenThousand}\nenum Month {Jan, June, August}\nenum Language {Urdu, English}\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { semesters: some Semester }\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n courses: some Course\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\nsig Course {\n mediumOfInstruction: some Language,\n preRequisite: some Course,\n isMandatoryForNonFastMS: one Bool,\n courseName: one string\n}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\n\n// *** Course Constraints *** //\n\nrun {} for 5", "permalink": "study-bunt-script-virus", "time": "2024-11-19 17:25:26.653275", "cmd": 1} {"id": 24339, "parent": 24338, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\nenum Bool {True, False}\nenum Numbers {SevenTeen, Eight, ElevenThousand}\nenum Month {Jan, June, August}\nenum Language {Urdu, English}\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { semesters: some Semester }\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n courses: some Course\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\nsig Course {\n mediumOfInstruction: some Language,\n preRequisite: some Course,\n isMandatoryForNonFastMS: one Bool,\n courseName: one String\n}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\n\n// *** Course Constraints *** //\n\nrun {} for 5", "permalink": "anew-refund-hence-fog", "time": "2024-11-19 17:25:33.020320", "cmd": 1} {"id": 24340, "parent": 24339, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\nenum Bool {True, False}\nenum Numbers {SevenTeen, Eight, ElevenThousand}\nenum Month {Jan, June, August}\nenum Language {Urdu, English}\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { semesters: some Semester }\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n courses: some Course\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\nsig Course {\n mediumOfInstruction: some Language,\n preRequisite: some Course,\n isMandatoryForNonFastMS: one Bool,\n //courseName: one String\n}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\n\n// *** Course Constraints *** //\n\nrun {} for 5", "permalink": "goofy-baffle-shrunk-plant", "time": "2024-11-19 17:25:40.653363", "cmd": 1} {"id": 24341, "parent": 24337, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n}\n\nfact AttendanceRules{\n all s: Student | s.above80attendance == True implies eligibleToGiveExam = True\n}\n\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nrun {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n", "permalink": "target-result-plasma-coat", "time": "2024-11-19 17:25:45.212436", "cmd": 1} {"id": 24342, "parent": 24341, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n}\n\nfact AttendanceRules{\n all s: Student | s.above80attendance in True implies eligibleToGiveExam in True\n}\n\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nrun {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n", "permalink": "pork-vegan-peso-thinly", "time": "2024-11-19 17:26:35.964804", "cmd": 1} {"id": 24343, "parent": 24342, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n}\n\nfact AttendanceRules{\n all s: Student | (s.above80attendance = True) implies (eligibleToGiveExam = True)\n}\n\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nrun {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n", "permalink": "clammy-flyer-snitch-gave", "time": "2024-11-19 17:26:57.492312", "cmd": 1} {"id": 24344, "parent": 24343, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nabstract sig Boolean {}\none sig True extends Boolean {}\none sig False extends Boolean {}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n}\n\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies eligibleToGiveExam in True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nrun {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n", "permalink": "marina-winner-plated-cavity", "time": "2024-11-19 17:27:45.010607", "cmd": 1} {"id": 24345, "parent": 24344, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n}\n\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies eligibleToGiveExam in True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nrun {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n", "permalink": "scale-browse-ocelot-gopher", "time": "2024-11-19 17:28:07.799596", "cmd": 1} {"id": 24346, "parent": 24345, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n}\n\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies eligibleToGiveExam in True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nrun {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n", "permalink": "jockey-plural-defile-cube", "time": "2024-11-19 17:28:35.997715", "cmd": 1} {"id": 24347, "parent": 24346, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n}\n\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies eligibleToGiveExam in True\n //all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nrun {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n", "permalink": "ozone-urchin-hatred-grunt", "time": "2024-11-19 17:28:39.850230", "cmd": 1} {"id": 24348, "parent": 24347, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n}\n\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies eligibleToGiveExam in True\n //all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nrun for 3 Student\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n", "permalink": "barge-rewash-upside-wiry", "time": "2024-11-19 17:29:13.003341", "cmd": 1} {"id": 24349, "parent": 24348, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n}\n\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies eligibleToGiveExam in True\n //all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nrun {} for 3 Student\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n", "permalink": "sprite-dial-omen-grit", "time": "2024-11-19 17:29:24.288972", "cmd": 1} {"id": 24350, "parent": 24349, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n}\n\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies eligibleToGiveExam = True\n //all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nrun {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n", "permalink": "five-gargle-specks-settle", "time": "2024-11-19 17:30:20.801126", "cmd": 1} {"id": 24351, "parent": 24350, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n}\n\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n //all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nrun {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n", "permalink": "wimp-much-legged-lumber", "time": "2024-11-19 17:30:42.214538", "cmd": 1} {"id": 24352, "parent": 24351, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n}\n\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nrun {}\n\n\n// assert MaxSemesters {\n// all ay: AcademicYear | #ay.semesters <= 3\n// }\n// Rule 3: Two academic years cannot have the same semester\n// all disj ay1, ay2: AcademicYear | ay1.semesters & ay2.semesters = none\n\n", "permalink": "jackal-gift-coke-ditch", "time": "2024-11-19 17:31:23.441235", "cmd": 1} {"id": 24353, "parent": 24352, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\nabstract sig Language {}\nsig English extends Language {}\nsig Urdu extends Language {}\nsig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n mediumOfInstruction: one Language, \n isReligiousStudies: one Boolean, \n isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// Constraint 1 & 4\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n}\n\n// Constraint: 6\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\n\n// Constraint: 7 for medium of instruction in courses\nfact MediumOfInstructionRules {\n // All courses must have English as the medium of instruction, except language courses (OtherLanguage) and Religious Studies\n all c: Course | (c.mediumOfInstruction = English or c.isReligiousStudies = True implies c.mediumOfInstruction = English) \n // Religious and Islamic Studies courses can have Urdu as an alternative language\n all c: Course | c.isReligiousStudies = True implies (c.mediumOfInstruction = English or c.mediumOfInstruction = Urdu)\n // Language courses may have a different medium of instruction\n all c: Course | c.isReligiousStudies = False and c.mediumOfInstruction != English implies c.mediumOfInstruction = OtherLanguage\n}\n\nrun {}", "permalink": "barge-boots-giver-derby", "time": "2024-11-19 17:43:45.246407", "cmd": 1} {"id": 24354, "parent": 24353, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\nabstract sig Language {}\nsig English extends Language {}\nsig Urdu extends Language {}\nsig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n mediumOfInstruction: one Language, \n isReligiousStudies: one Boolean, \n isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// Constraint 1 & 4\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n}\n\n// Constraint: 6\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\n\n// Constraint: 7 for medium of instruction in courses\nfact MediumOfInstructionRules {\n // All courses must have English as the medium of instruction, except language courses (OtherLanguage) and Religious Studies\n all c: Course | (c.mediumOfInstruction = English or c.isReligiousStudies = True implies c.mediumOfInstruction = English) \n // Religious and Islamic Studies courses can have Urdu as an alternative language\n all c: Course | c.isReligiousStudies = True implies (c.mediumOfInstruction = English or c.mediumOfInstruction = Urdu)\n // Language courses may have a different medium of instruction\n all c: Course | c.isReligiousStudies = False and c.mediumOfInstruction != English implies c.mediumOfInstruction = OtherLanguage\n\n all l: Language | some c: Course | l in c\n\n}\n\nrun {}", "permalink": "video-dipped-haste-chive", "time": "2024-11-19 17:44:29.035647", "cmd": 1} {"id": 24355, "parent": 24354, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\nabstract sig Language {}\nsig English extends Language {}\nsig Urdu extends Language {}\nsig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n mediumOfInstruction: one Language, \n isReligiousStudies: one Boolean, \n isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// Constraint 1 & 4\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n}\n\n// Constraint: 6\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\n\n// Constraint: 7 for medium of instruction in courses\nfact MediumOfInstructionRules {\n // All courses must have English as the medium of instruction, except language courses (OtherLanguage) and Religious Studies\n all c: Course | (c.mediumOfInstruction = English or c.isReligiousStudies = True implies c.mediumOfInstruction = English) \n // Religious and Islamic Studies courses can have Urdu as an alternative language\n all c: Course | c.isReligiousStudies = True implies (c.mediumOfInstruction = English or c.mediumOfInstruction = Urdu)\n // Language courses may have a different medium of instruction\n all c: Course | c.isReligiousStudies = False and c.mediumOfInstruction != English implies c.mediumOfInstruction = OtherLanguage\n\n all l: Language | some c: Course | l = c.mediumOfInstruction\n\n}\n\nrun {}", "permalink": "enamel-chaps-cymbal-glitzy", "time": "2024-11-19 17:45:01.727270", "cmd": 1} {"id": 24356, "parent": 24340, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\nenum Bool {True, False}\nenum Numbers {SevenTeen, Eight, ElevenThousand}\nenum Month {Jan, June, August}\nenum Language {Urdu, English, Other}\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { semesters: some Semester }\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n courses: some Course\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\nabstract sig Course {\n mediumOfInstruction: some Language,\n //isMandatoryForNonFastMS: one Bool,\n //preRequisite: set Course,\n}\nsig GeneralCourse, ReligiousStudies, LanguageCourse, AppliedProgramming extends Course {}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\nfact CourseMediumOfConstructionConstraints {\n all c: Course | {\n (c in GeneralCourse) implies c.mediumOfInstruction = English\n (c in ReligiousStudies) implies c.mediumOfInstruction = Urdu\n (c in LanguageCourse) implies c.mediumOfInstruction = Other\n }\n}\n// *** Course Constraints *** //\n\nrun {} for 5", "permalink": "gaming-exile-calm-frown", "time": "2024-11-19 17:45:56.264259", "cmd": 1} {"id": 24357, "parent": 24356, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\nenum Bool {True, False}\nenum Numbers {SevenTeen, Eight, ElevenThousand}\nenum Month {Jan, June, August}\nenum Language {Urdu, English, Other}\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { semesters: some Semester }\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n courses: some Course\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\nabstract sig Course {\n mediumOfInstruction: some Language,\n //isMandatoryForNonFastMS: one Bool,\n //preRequisite: set Course,\n}\nsig GeneralCourse, ReligiousStudies, LanguageCourse, AppliedProgramming extends Course {}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\nfact CourseMediumOfConstructionConstraints {\n all c: Course | {\n (c in GeneralCourse) implies c.mediumOfInstruction = English\n (c in ReligiousStudies) implies c.mediumOfInstruction = Urdu\n (c in LanguageCourse) implies c.mediumOfInstruction = Other\n }\n}\n// *** Course Constraints *** //\n\nrun {} for 5", "permalink": "wavy-hurt-citric-cosmos", "time": "2024-11-19 17:47:57.463195", "cmd": 1} {"id": 24358, "parent": 24355, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\nabstract sig Language {}\nsig English extends Language {}\nsig Urdu extends Language {}\nsig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n mediumOfInstruction: one Language, \n isReligiousStudies: one Boolean, \n isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// Constraint 1 & 4\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n}\n\n// Constraint: 6\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\n\n// Constraint: 7 for medium of instruction in courses\nfact MediumOfInstructionRules {\n // all courses must have English as the medium of instruction, except language courses and Religious Studies\n all c: Course | (c.mediumOfInstruction = English or c.isReligiousStudies = True implies c.mediumOfInstruction = English) \n // religious and islamic Studies courses can have Urdu as an alternative language\n all c: Course | c.isReligiousStudies = True implies (c.mediumOfInstruction = English or c.mediumOfInstruction = Urdu)\n // language courses may have a different medium of instruction\n all c: Course | c.isReligiousStudies = False and c.mediumOfInstruction != English implies c.mediumOfInstruction = OtherLanguage and c.isLanguageCourse = True\n //all c: Course | c.isLanguageCourse = True implies c.mediumOfInstruction = English\n\n all l: Language | some c: Course | l = c.mediumOfInstruction\n\n}\n\nrun {}", "permalink": "pretty-bully-tubby-voice", "time": "2024-11-19 17:48:51.235031", "cmd": 1} {"id": 24359, "parent": 24358, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\nabstract sig Language {}\nsig English extends Language {}\nsig Urdu extends Language {}\nsig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n mediumOfInstruction: one Language, \n isReligiousStudies: one Boolean, \n isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// Constraint 1 & 4\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n}\n\n// Constraint: 6\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\n\n// Constraint: 7 for medium of instruction in courses\nfact MediumOfInstructionRules {\n all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction = English\n all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n all c: Course | c.isReligiousStudies = True implies c.mediumOfInstruction = English or c.mediumOfInstruction = Urdu and c.isLanguageCourse = False\n all c: Course | c.mediumOfInstruction = English or c.mediumOfInstruction = Urdu and c.isLanguageCourse = False implies c.isReligiousStudies = True\n\n all c: Course | c.isLanguageCourse = True implies c.mediumOfInstruction = OtherLanguage and isReligiousStudies = False\n\n all l: Language | some c: Course | l = c.mediumOfInstruction\n\n}\n\nrun {}", "permalink": "john-unholy-prewar-bottle", "time": "2024-11-19 17:53:33.156496", "cmd": 1} {"id": 24360, "parent": 24359, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\nabstract sig Language {}\nsig English extends Language {}\nsig Urdu extends Language {}\nsig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n mediumOfInstruction: one Language, \n isReligiousStudies: one Boolean, \n isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// Constraint 1 & 4\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n}\n\n// Constraint: 6\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\n\n// Constraint: 7 for medium of instruction in courses\nfact MediumOfInstructionRules {\n all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction = English\n all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n all c: Course | c.isReligiousStudies = True implies c.mediumOfInstruction = English or c.mediumOfInstruction = Urdu and c.isLanguageCourse = False\n all c: Course | c.mediumOfInstruction = English or c.mediumOfInstruction = Urdu and c.isLanguageCourse = False implies c.isReligiousStudies = True\n\n all c: Course | c.isLanguageCourse = True implies c.mediumOfInstruction = OtherLanguage and c.isReligiousStudies = False\n\n all l: Language | some c: Course | l = c.mediumOfInstruction\n\n}\n\nrun {}", "permalink": "fresh-pretty-ruby-clasp", "time": "2024-11-19 17:53:40.148259", "cmd": 1} {"id": 24361, "parent": 24360, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\nabstract sig Language {}\nsig English extends Language {}\nsig Urdu extends Language {}\nsig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n mediumOfInstruction: one Language, \n isReligiousStudies: one Boolean, \n isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// Constraint 1 & 4\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n}\n\n// Constraint: 6\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\n\n// Constraint: 7 for medium of instruction in courses\nfact MediumOfInstructionRules {\n all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction = English\n all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n all c: Course | c.isReligiousStudies = True implies c.mediumOfInstruction !=OtherLanguage and c.isLanguageCourse = False\n all c: Course | c.mediumOfInstruction != OtherLanguage and c.isLanguageCourse = False implies c.isReligiousStudies = True\n\n all c: Course | c.isLanguageCourse = True implies c.mediumOfInstruction = OtherLanguage and c.isReligiousStudies = False\n\n all l: Language | some c: Course | l = c.mediumOfInstruction\n\n}\n\nrun {}", "permalink": "savor-banjo-caviar-rack", "time": "2024-11-19 17:54:52.090184", "cmd": 1} {"id": 24362, "parent": 24361, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\nabstract sig Language {}\nsig English extends Language {}\nsig Urdu extends Language {}\nsig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n mediumOfInstruction: one Language, \n isReligiousStudies: one Boolean, \n isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// Constraint 1 & 4\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n}\n\n// Constraint: 6\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\n\n// Constraint: 7 for medium of instruction in courses\nfact MediumOfInstructionRules {\n all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction = English\n all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n all c: Course | c.isReligiousStudies = True implies c.mediumOfInstruction != OtherLanguage and c.isLanguageCourse = False\n all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n\n all c: Course | c.isLanguageCourse = True implies c.mediumOfInstruction = OtherLanguage and c.isReligiousStudies = False\n\n all l: Language | some c: Course | l = c.mediumOfInstruction\n\n}\n\nrun {}", "permalink": "cornea-tinker-iodine-grew", "time": "2024-11-19 17:56:45.772360", "cmd": 1} {"id": 24363, "parent": 24357, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\nenum Bool {True, False}\nenum Numbers {SevenTeen, Eight, ElevenThousand}\nenum Month {Jan, June, August}\nenum Language {Urdu, English, Other}\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { semesters: some Semester }\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n courses: some Course\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\nabstract sig Course {\n mediumOfInstruction: some Language,\n //isMandatoryForNonFastMS: one Bool,\n //preRequisite: set Course,\n}\nsig GeneralCourse, ReligiousStudies, LanguageCourse, AppliedProgramming extends Course {}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\nfact CourseMediumOfConstructionConstraints {\n all c: Course | {\n (c in GeneralCourse) implies c.mediumOfInstruction = English\n (c in ReligiousStudies) implies (c.mediumOfInstruction = Urdu or c.mediumOfInstruction = English)\n (c in LanguageCourse) implies c.mediumOfInstruction = Other\n }\n}\n// *** Course Constraints *** //\n\nrun {} for 5", "permalink": "blob-carton-tag-pleat", "time": "2024-11-19 17:57:02.764603", "cmd": 1} {"id": 24364, "parent": 24363, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\nenum Bool {True, False}\nenum Numbers {SevenTeen, Eight, ElevenThousand}\nenum Month {Jan, June, August}\nenum Language {Urdu, English, Other}\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { semesters: some Semester }\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n courses: some Course\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\nabstract sig Course {\n mediumOfInstruction: one Language,\n //isMandatoryForNonFastMS: one Bool,\n //preRequisite: set Course,\n}\nsig GeneralCourse, ReligiousStudies, LanguageCourse, AppliedProgramming extends Course {}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\nfact CourseMediumOfConstructionConstraints {\n all c: Course | {\n (c in GeneralCourse) implies c.mediumOfInstruction = English\n (c in ReligiousStudies) implies (c.mediumOfInstruction = Urdu or c.mediumOfInstruction = English)\n (c in LanguageCourse) implies c.mediumOfInstruction = Other\n }\n}\n// *** Course Constraints *** //\n\nrun {} for 5", "permalink": "glass-mousy-chop-french", "time": "2024-11-19 17:57:16.487154", "cmd": 1} {"id": 24365, "parent": 24364, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\nenum Bool {True, False}\nenum Numbers {SevenTeen, Eight, ElevenThousand}\nenum Month {Jan, June, August}\nenum Language {Urdu, English, Other}\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { semesters: some Semester }\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n courses: some Course\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\nabstract sig Course {\n mediumOfInstruction: one Language,\n //isMandatoryForNonFastMS: one Bool,\n //preRequisite: set Course,\n}\nsig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\nsig AppliedProgramming extends GeneralCourse {}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\nfact CourseMediumOfConstructionConstraints {\n all c: Course | {\n (c in GeneralCourse) implies c.mediumOfInstruction = English\n (c in ReligiousStudies) implies (c.mediumOfInstruction = Urdu or c.mediumOfInstruction = English)\n (c in LanguageCourse) implies c.mediumOfInstruction = Other\n }\n}\n// *** Course Constraints *** //\n\nrun {} for 5", "permalink": "viper-spore-wispy-email", "time": "2024-11-19 17:57:48.607064", "cmd": 1} {"id": 24366, "parent": 24365, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\nenum Bool {True, False}\n//enum Numbers {SevenTeen, Eight, ElevenThousand}\n//enum Month {Jan, June, August}\nenum Language {Urdu, English, Other}\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { semesters: some Semester }\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n courses: some Course\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\nabstract sig Course {\n mediumOfInstruction: one Language,\n //isMandatoryForNonFastMS: one Bool,\n //preRequisite: set Course,\n}\nsig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\nsig AppliedProgramming extends GeneralCourse {}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\nfact CourseMediumOfConstructionConstraints {\n all c: Course | {\n (c in GeneralCourse) implies c.mediumOfInstruction = English\n (c in ReligiousStudies) implies (c.mediumOfInstruction = Urdu or c.mediumOfInstruction = English)\n (c in LanguageCourse) implies c.mediumOfInstruction = Other\n }\n}\n// *** Course Constraints *** //\n\nrun {} for 5", "permalink": "frolic-thrash-untie-dollop", "time": "2024-11-19 17:59:10.201400", "cmd": 1} {"id": 24367, "parent": 24366, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\n//enum Bool {True, False}\n//enum Numbers {SevenTeen, Eight, ElevenThousand}\n//enum Month {Jan, June, August}\nenum Language {Urdu, English, Other}\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { semesters: some Semester }\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n courses: some Course\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\nabstract sig Course {\n mediumOfInstruction: one Language,\n //isMandatoryForNonFastMS: one Bool,\n //preRequisite: set Course,\n}\nsig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\nsig AppliedProgramming extends GeneralCourse {}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\nfact CourseMediumOfConstructionConstraints {\n all c: Course | {\n (c in GeneralCourse) implies c.mediumOfInstruction = English\n (c in ReligiousStudies) implies (c.mediumOfInstruction = Urdu or c.mediumOfInstruction = English)\n (c in LanguageCourse) implies c.mediumOfInstruction = Other\n }\n}\n// *** Course Constraints *** //\n\nrun {} for 5", "permalink": "trowel-jumbo-exodus-snugly", "time": "2024-11-19 17:59:49.161205", "cmd": 1} {"id": 24370, "parent": 24367, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\n//enum Bool {True, False}\n//enum Numbers {SevenTeen, Eight, ElevenThousand}\n//enum Month {Jan, June, August}\nenum Language {Urdu, English, Other}\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { semesters: some Semester }\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n courses: some Course\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\nabstract sig Course {\n mediumOfInstruction: one Language,\n //isMandatoryForNonFastMS: one Bool,\n //preRequisite: set Course,\n}\nsig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\nsig AppliedProgramming extends GeneralCourse {}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\nfact CourseMediumOfConstructionConstraints {\n all c: Course | {\n (c in GeneralCourse) implies c.mediumOfInstruction = English\n (c in ReligiousStudies) implies (c.mediumOfInstruction = Urdu or c.mediumOfInstruction = English)\n (c in LanguageCourse) implies c.mediumOfInstruction = Other\n }\n}\n// *** Course Constraints *** //\n\nrun {} for 5", "permalink": "reboot-dorsal-sports-steam", "time": "2024-11-19 18:04:50.600211", "cmd": 1} {"id": 24369, "parent": 24368, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\nabstract sig Language {}\nsig English extends Language {}\nsig Urdu extends Language {}\nsig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n mediumOfInstruction: one Language, \n isReligiousStudies: one Boolean, \n isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// Constraint 1 & 4\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n}\n\n// Constraint: 6\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\n\n// Constraint: 7 for medium of instruction in courses\nfact MediumOfInstructionRules {\n all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n // all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction = English\n // all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n // all c: Course | c.isReligiousStudies = True implies c.mediumOfInstruction != OtherLanguage and c.isLanguageCourse = False\n // all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n\n // all c: Course | c.isLanguageCourse = True implies c.mediumOfInstruction = OtherLanguage and c.isReligiousStudies = False\n\n all l: Language | some c: Course | l = c.mediumOfInstruction\n\n}\n\nrun {}", "permalink": "kite-small-smile-pep", "time": "2024-11-19 18:00:00.786103", "cmd": 1} {"id": 24368, "parent": 24362, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\nabstract sig Language {}\nsig English extends Language {}\nsig Urdu extends Language {}\nsig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n mediumOfInstruction: one Language, \n isReligiousStudies: one Boolean, \n isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// Constraint 1 & 4\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n}\n\n// Constraint: 6\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\n\n// Constraint: 7 for medium of instruction in courses\nfact MediumOfInstructionRules {\n all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n // all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction = English\n // all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n // all c: Course | c.isReligiousStudies = True implies c.mediumOfInstruction != OtherLanguage and c.isLanguageCourse = False\n // all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n\n // all c: Course | c.isLanguageCourse = True implies c.mediumOfInstruction = OtherLanguage and c.isReligiousStudies = False\n\n all l: Language | some c: Course | l = c.mediumOfInstruction\n\n}\n\nrun {}", "permalink": "recast-unbend-gloomy-gargle", "time": "2024-11-19 17:59:51.072270", "cmd": 1} {"id": 24371, "parent": 24369, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\nabstract sig Language {}\nsig English extends Language {}\nsig Urdu extends Language {}\nsig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n mediumOfInstruction: one Language, \n isReligiousStudies: one Boolean, \n isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// Constraint 1 & 4\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n}\n\n// Constraint: 6\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\n\n// Constraint: 7 for medium of instruction in courses\nfact MediumOfInstructionRules {\n all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n all c: Course | isReligiousStudies = True implies isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n all c: Course | isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n all c: Course | isLanguageCourse = True implies isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n all c: Course | isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n \n \n\n all l: Language | some c: Course | l = c.mediumOfInstruction\n\n}\n\nrun {}", "permalink": "backup-plasma-stable-xbox", "time": "2024-11-19 18:06:42.821546", "cmd": 1} {"id": 24374, "parent": 24372, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\nabstract sig Language {}\nsig English extends Language {}\nsig Urdu extends Language {}\nsig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n mediumOfInstruction: one Language, \n isReligiousStudies: one Boolean, \n isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// Constraint 1 & 4\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n}\n\n// Constraint: 6\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\n\n// Constraint: 7 for medium of instruction in courses\nfact MediumOfInstructionRules {\n all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n\n \n\n all l: Language | some c: Course | l = c.mediumOfInstruction\n\n}\n\nrun {}", "permalink": "wrist-fender-wand-bash", "time": "2024-11-19 18:07:58.939601", "cmd": 1} {"id": 24372, "parent": 24371, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\nabstract sig Language {}\nsig English extends Language {}\nsig Urdu extends Language {}\nsig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n mediumOfInstruction: one Language, \n isReligiousStudies: one Boolean, \n isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// Constraint 1 & 4\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n}\n\n// Constraint: 6\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\n\n// Constraint: 7 for medium of instruction in courses\nfact MediumOfInstructionRules {\n all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n\n \n\n all l: Language | some c: Course | l = c.mediumOfInstruction\n\n}\n\nrun {}", "permalink": "manual-feeble-rectal-liking", "time": "2024-11-19 18:07:10.090496", "cmd": 1} {"id": 24373, "parent": 24370, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\n//enum Bool {True, False}\n//enum Numbers {SevenTeen, Eight, ElevenThousand}\n//enum Month {Jan, June, August}\nenum Language {Urdu, English, Other}\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { semesters: some Semester }\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n courses: some Course\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\nabstract sig Course {\n mediumOfInstruction: one Language,\n //isMandatoryForNonFastMS: one Bool,\n //preRequisite: set Course,\n}\nsig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\nsig AppliedProgramming extends GeneralCourse {}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\nfact CourseMediumOfConstructionConstraints {\n all c: Course | {\n (c in GeneralCourse) implies c.mediumOfInstruction = English\n (c in ReligiousStudies) implies ((c.mediumOfInstruction = Urdu) or (c.mediumOfInstruction = English))\n (c in LanguageCourse) implies c.mediumOfInstruction = Other\n }\n}\n// *** Course Constraints *** //\n\nrun {} for 5", "permalink": "rug-tutor-flying-cushy", "time": "2024-11-19 18:07:28.857960", "cmd": 1} {"id": 24375, "parent": 24373, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\n//enum Bool {True, False}\n//enum Numbers {SevenTeen, Eight, ElevenThousand}\n//enum Month {Jan, June, August}\nenum Language {Urdu, English, Other}\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { semesters: some Semester }\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n courses: some Course\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\nabstract sig Course {\n mediumOfInstruction: one Language,\n //isMandatoryForNonFastMS: one Bool,\n //preRequisite: set Course,\n}\nsig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\n//sig AppliedProgramming extends GeneralCourse {}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\nfact CourseMediumOfConstructionConstraints {\n all c: Course | {\n (c in GeneralCourse) implies c.mediumOfInstruction = English\n (c in ReligiousStudies) implies ((c.mediumOfInstruction = Urdu) or (c.mediumOfInstruction = English))\n (c in LanguageCourse) implies c.mediumOfInstruction = Other\n }\n}\n// *** Course Constraints *** //\n\nrun {} for 5", "permalink": "wish-fetch-specks-rehire", "time": "2024-11-19 18:08:00.616043", "cmd": 1} {"id": 24376, "parent": 24375, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\n//enum Bool {True, False}\n//enum Numbers {SevenTeen, Eight, ElevenThousand}\n//enum Month {Jan, June, August}\nenum Language {Urdu, English, Other}\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { semesters: some Semester }\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n courses: some Course\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\nabstract sig Course {\n mediumOfInstruction: one Language,\n //isMandatoryForNonFastMS: one Bool,\n //preRequisite: set Course,\n}\nsig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\n//sig AppliedProgramming extends GeneralCourse {}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\nfact CourseMediumOfConstructionConstraints {\n all c: Course | {\n (c in GeneralCourse) implies c.mediumOfInstruction = English\n (c in ReligiousStudies) implies ((c.mediumOfInstruction = Urdu) or (c.mediumOfInstruction = English))\n (c in LanguageCourse) implies c.mediumOfInstruction = Other\n }\n}\n// *** Course Constraints *** //\n\nrun {} for 3", "permalink": "bunion-repair-yen-retold", "time": "2024-11-19 18:08:18.642455", "cmd": 1} {"id": 24377, "parent": 24374, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\nabstract sig Language {}\nsig English extends Language {}\nsig Urdu extends Language {}\nsig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n mediumOfInstruction: one Language, \n isReligiousStudies: one Boolean, \n isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// Constraint 1 & 4\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n}\n\n// Constraint: 6\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\n\n// Constraint: 7 for medium of instruction in courses\nfact MediumOfInstructionRules {\n all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n all l: Language | some c: Course | l = c.mediumOfInstruction\n}\n\nfact NoOfCoursesConstraint{\n all s: Student | #s.courses >= 5 and #s.courses <= 6\n}\n\nrun {}", "permalink": "hamlet-unify-slang-litmus", "time": "2024-11-19 18:14:02.287138", "cmd": 1} {"id": 24380, "parent": 24379, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\nabstract sig Language {}\nsig English extends Language {}\nsig Urdu extends Language {}\nsig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n mediumOfInstruction: one Language, \n isReligiousStudies: one Boolean, \n isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// Constraint 1 & 4\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n}\n\n// Constraint: 6\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\n\n// Constraint: 7 for medium of instruction in courses\nfact MediumOfInstructionRules {\n all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n all l: Language | some c: Course | l = c.mediumOfInstruction\n}\n\nfact NoOfCoursesConstraint{\n all s: Student | #s.course >= 5 and #s.course <= 6\n}\n\nrun {}", "permalink": "baton-cannon-last-only", "time": "2024-11-19 18:15:33.905891", "cmd": 1} {"id": 24378, "parent": 24377, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\nabstract sig Language {}\nsig English extends Language {}\nsig Urdu extends Language {}\nsig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n mediumOfInstruction: one Language, \n isReligiousStudies: one Boolean, \n isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// Constraint 1 & 4\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n}\n\n// Constraint: 6\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\n\n// Constraint: 7 for medium of instruction in courses\nfact MediumOfInstructionRules {\n all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n all l: Language | some c: Course | l = c.mediumOfInstruction\n}\n\nfact NoOfCoursesConstraint{\n all s: Student | #s.course >= 5 and #s.course <= 6\n}\n\nrun {}", "permalink": "headed-sequel-catty-utmost", "time": "2024-11-19 18:14:23.125681", "cmd": 1} {"id": 24379, "parent": 24378, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\nabstract sig Language {}\nsig English extends Language {}\nsig Urdu extends Language {}\nsig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n one mediumOfInstruction: one Language, \n one isReligiousStudies: one Boolean, \n one isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// Constraint 1 & 4\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n}\n\n// Constraint: 6\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\n\n// Constraint: 7 for medium of instruction in courses\nfact MediumOfInstructionRules {\n all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n all l: Language | some c: Course | l = c.mediumOfInstruction\n}\n\nfact NoOfCoursesConstraint{\n all s: Student | #s.course >= 5 and #s.course <= 6\n}\n\nrun {}", "permalink": "jinx-ankle-waggle-badge", "time": "2024-11-19 18:15:17.167010", "cmd": 1} {"id": 24381, "parent": 24380, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\nabstract sig Language {}\nsig English extends Language {}\nsig Urdu extends Language {}\nsig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n mediumOfInstruction: one Language, \n isReligiousStudies: one Boolean, \n isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// Constraint 1 & 4\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n}\n\n// Constraint: 6\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\n\n// Constraint: 7 for medium of instruction in courses\nfact MediumOfInstructionRules {\n all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n all l: Language | some c: Course | l = c.mediumOfInstruction\n}\n\nfact NoOfCoursesConstraint{\n all s: Student | #s.course >= 5 and #s.course <= 6\n}\n\nrun {} for 1 Student", "permalink": "easily-geek-award-slit", "time": "2024-11-19 18:16:08.470557", "cmd": 1} {"id": 24382, "parent": 24381, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\nabstract sig Language {}\nsig English extends Language {}\nsig Urdu extends Language {}\nsig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n mediumOfInstruction: one Language, \n isReligiousStudies: one Boolean, \n isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// Constraint 1 & 4\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n}\n\n// Constraint: 6\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\n\n// Constraint: 7 for medium of instruction in courses\nfact MediumOfInstructionRules {\n all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n all l: Language | some c: Course | l = c.mediumOfInstruction\n}\n\nfact NoOfCoursesConstraint{\n all s: Student | #s.course >= 5 and #s.course <= 6\n}\n\nrun {} for 1 Student 1 AcademicYear", "permalink": "zebra-pretty-return-breath", "time": "2024-11-19 18:16:19.207303", "cmd": 1} {"id": 24383, "parent": 24382, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\nabstract sig Language {}\nsig English extends Language {}\nsig Urdu extends Language {}\nsig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n mediumOfInstruction: one Language, \n isReligiousStudies: one Boolean, \n isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// Constraint 1 & 4\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n}\n\n// Constraint: 6\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\n\n// Constraint: 7 for medium of instruction in courses\nfact MediumOfInstructionRules {\n all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n all l: Language | some c: Course | l = c.mediumOfInstruction\n}\n\nfact NoOfCoursesConstraint{\n all s: Student | #s.course >= 5 and #s.course <= 6\n}\n\nrun {} for 1 Student, 1 AcademicYear", "permalink": "barman-surfer-lego-glue", "time": "2024-11-19 18:16:24.232574", "cmd": 1} {"id": 24384, "parent": 24383, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\nabstract sig Language {}\nsig English extends Language {}\nsig Urdu extends Language {}\nsig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n mediumOfInstruction: one Language, \n isReligiousStudies: one Boolean, \n isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// Constraint 1 & 4\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n}\n\n// Constraint: 6\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\n\n// Constraint: 7 for medium of instruction in courses\nfact MediumOfInstructionRules {\n all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n all l: Language | some c: Course | l = c.mediumOfInstruction\n}\n\nfact NoOfCoursesConstraint{\n all s: Student | #s.course >= 5 and #s.course <= 6\n}\n\nrun {} for 1 Student, 1 AcademicYear, 3 Duration, ", "permalink": "pardon-mangle-tiny-shaft", "time": "2024-11-19 18:16:47.354915", "cmd": 1} {"id": 24386, "parent": 24384, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\nabstract sig Language {}\nsig English extends Language {}\nsig Urdu extends Language {}\nsig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n mediumOfInstruction: one Language, \n isReligiousStudies: one Boolean, \n isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// Constraint 1 & 4\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n}\n\n// Constraint: 6\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\n\n// Constraint: 7 for medium of instruction in courses\nfact MediumOfInstructionRules {\n all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n all l: Language | some c: Course | l = c.mediumOfInstruction\n}\n\nfact NoOfCoursesConstraint{\n all s: Student | #s.course >= 5 and #s.course <= 6\n}\n\nrun {} for 1 Student, 1 AcademicYear, 3 Duration", "permalink": "level-bubbly-guide-crepe", "time": "2024-11-19 18:16:51.441740", "cmd": 1} {"id": 24388, "parent": 24386, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\nabstract sig Language {}\nsig English extends Language {}\nsig Urdu extends Language {}\nsig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n mediumOfInstruction: one Language, \n isReligiousStudies: one Boolean, \n isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// Constraint 1 & 4\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n}\n\n// Constraint: 6\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\n\n// Constraint: 7 for medium of instruction in courses\nfact MediumOfInstructionRules {\n all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n all l: Language | some c: Course | l = c.mediumOfInstruction\n}\n\nfact NoOfCoursesConstraint{\n all s: Student | #s.course >= 5 and #s.course <= 6\n}\n\nrun {} for 1 Student, 1 AcademicYear, 3 Duration, 6 Date", "permalink": "henna-limit-entity-nuzzle", "time": "2024-11-19 18:17:05.123924", "cmd": 1} {"id": 24390, "parent": 24388, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\nabstract sig Language {}\nsig English extends Language {}\nsig Urdu extends Language {}\nsig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n mediumOfInstruction: one Language, \n isReligiousStudies: one Boolean, \n isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// Constraint 1 & 4\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n}\n\n// Constraint: 6\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\n\n// Constraint: 7 for medium of instruction in courses\nfact MediumOfInstructionRules {\n all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n all l: Language | some c: Course | l = c.mediumOfInstruction\n}\n\nfact NoOfCoursesConstraint{\n all s: Student | #s.course >= 5 and #s.course <= 6\n}\n\nrun {} for 1 Student, 1 AcademicYear, 3 Duration, 6 Date, one Boolean", "permalink": "gladly-stinky-itunes-petty", "time": "2024-11-19 18:17:16.063664", "cmd": 1} {"id": 24391, "parent": 24390, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\nabstract sig Language {}\nsig English extends Language {}\nsig Urdu extends Language {}\nsig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n mediumOfInstruction: one Language, \n isReligiousStudies: one Boolean, \n isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// Constraint 1 & 4\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n}\n\n// Constraint: 6\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\n\n// Constraint: 7 for medium of instruction in courses\nfact MediumOfInstructionRules {\n all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n all l: Language | some c: Course | l = c.mediumOfInstruction\n}\n\nfact NoOfCoursesConstraint{\n all s: Student | #s.course >= 5 and #s.course <= 6\n}\n\nrun {} for 1 Student, 1 AcademicYear, 3 Duration, 6 Date, 1 Boolean", "permalink": "dish-vegan-pogo-dizzy", "time": "2024-11-19 18:17:23.147072", "cmd": 1} {"id": 24392, "parent": 24391, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\nabstract sig Language {}\nsig English extends Language {}\nsig Urdu extends Language {}\nsig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n mediumOfInstruction: one Language, \n isReligiousStudies: one Boolean, \n isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// Constraint 1 & 4\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n}\n\n// Constraint: 6\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\n\n// Constraint: 7 for medium of instruction in courses\nfact MediumOfInstructionRules {\n all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n all l: Language | some c: Course | l = c.mediumOfInstruction\n}\n\nfact NoOfCoursesConstraint{\n all s: Student | #s.course >= 5 and #s.course <= 6\n}\n\nrun {} for 1 Student, 1 AcademicYear, 3 Duration, 6 Date, 1 Boolean, 3 Language", "permalink": "vacant-class-pope-nail", "time": "2024-11-19 18:17:38.144245", "cmd": 1} {"id": 24393, "parent": 24392, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\nabstract sig Language {}\nsig English extends Language {}\nsig Urdu extends Language {}\nsig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n mediumOfInstruction: one Language, \n isReligiousStudies: one Boolean, \n isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// Constraint 1 & 4\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n}\n\n// Constraint: 6\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\n\n// Constraint: 7 for medium of instruction in courses\nfact MediumOfInstructionRules {\n all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n all l: Language | some c: Course | l = c.mediumOfInstruction\n}\n\nfact NoOfCoursesConstraint{\n all s: Student | #s.course >= 5 and #s.course <= 6\n}\n\nrun {} for 1 Student, 1 AcademicYear, 3 Duration, 6 Date, 1 Boolean, 3 Language, 6 Course", "permalink": "entomb-tubby-dial-impose", "time": "2024-11-19 18:17:46.061453", "cmd": 1} {"id": 24395, "parent": 24393, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\nabstract sig Language {}\nsig English extends Language {}\nsig Urdu extends Language {}\nsig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n mediumOfInstruction: one Language, \n isReligiousStudies: one Boolean, \n isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// Constraint 1 & 4\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all disj c1, c2: Course | c1.id != c2.id \n}\n\n// Constraint: 6\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\n\n// Constraint: 7 for medium of instruction in courses\nfact MediumOfInstructionRules {\n all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n all l: Language | some c: Course | l = c.mediumOfInstruction\n}\n\nfact NoOfCoursesConstraint{\n all s: Student | #s.course >= 5 and #s.course <= 6\n}\n\nrun {} for 1 Student, 1 AcademicYear, 3 Duration, 6 Date, 1 Boolean, 3 Language, 6 Course", "permalink": "dial-barley-thigh-stout", "time": "2024-11-19 18:19:08.070695", "cmd": 1} {"id": 24396, "parent": 24395, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n\n// // Constraint 2\n// // simulating an enum for duration\n// abstract sig Duration {}\n// sig SeventeenWeeks extends Duration {}\n// sig EightWeeks extends Duration {}\n\n// // Constraint 3\n// // simulating an enum for dates\n// abstract sig Date{}\n// sig Jan1_ extends Date{}\n// sig April30_ extends Date{}\n// sig June1_ extends Date{}\n// sig July31_ extends Date{}\n// sig Aug10_ extends Date{}\n// sig Dec22_ extends Date{}\n\n// abstract sig Semester {\n// duration: one Duration,\n// startdate: one Date,\n// enddate: one Date\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\nabstract sig Language {}\nsig English extends Language {}\nsig Urdu extends Language {}\nsig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n mediumOfInstruction: one Language, \n isReligiousStudies: one Boolean, \n isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// // Constraint 1 & 4\n// fact AcademicYearRules {\n// // Constraint 1 + 4: (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Every semester must belong to some academic year\n// all s: Semester | some ay: AcademicYear | s in ay.semesters\n// }\n\n// // Constraint: 2\n// fact SemesterDurations {\n// Spring.duration = SeventeenWeeks\n// Fall.duration = SeventeenWeeks\n// all s: Summer | s.duration = EightWeeks\n// // every duration must belong to a semester\n// all d: Duration | some s: Semester | d in s.duration\n// }\n\n// // Constraint: 3\n// fact SemesterDates {\n// Spring.startdate = Jan1_\n// Spring.enddate = April30_\n// Summer.startdate = June1_\n// Summer.startdate = July31_\n// Fall.startdate = Aug10_\n// //adding fall enddate would make it stop working ;-;\n// //Fall.enddate = Dec22_ \n \n// // end date must be greater than start date for each semester\n// all s: Semester | s.startdate != s.enddate\n// }\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all disj c1, c2: Course | c1.id != c2.id \n}\n\n// Constraint: 6\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\n\n// Constraint: 7 for medium of instruction in courses\nfact MediumOfInstructionRules {\n all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n all l: Language | some c: Course | l = c.mediumOfInstruction\n}\n\nfact NoOfCoursesConstraint{\n all s: Student | #s.course >= 5 and #s.course <= 6\n}\n\nrun {}", "permalink": "roamer-dart-marina-recall", "time": "2024-11-19 18:21:13.446110", "cmd": 1} {"id": 24397, "parent": 24396, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n\n// // Constraint 2\n// // simulating an enum for duration\n// abstract sig Duration {}\n// sig SeventeenWeeks extends Duration {}\n// sig EightWeeks extends Duration {}\n\n// // Constraint 3\n// // simulating an enum for dates\n// abstract sig Date{}\n// sig Jan1_ extends Date{}\n// sig April30_ extends Date{}\n// sig June1_ extends Date{}\n// sig July31_ extends Date{}\n// sig Aug10_ extends Date{}\n// sig Dec22_ extends Date{}\n\n// abstract sig Semester {\n// duration: one Duration,\n// startdate: one Date,\n// enddate: one Date\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\nabstract sig Language {}\nsig English extends Language {}\nsig Urdu extends Language {}\nsig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n mediumOfInstruction: one Language, \n isReligiousStudies: one Boolean, \n isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// // Constraint 1 & 4\n// fact AcademicYearRules {\n// // Constraint 1 + 4: (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Every semester must belong to some academic year\n// all s: Semester | some ay: AcademicYear | s in ay.semesters\n// }\n\n// // Constraint: 2\n// fact SemesterDurations {\n// Spring.duration = SeventeenWeeks\n// Fall.duration = SeventeenWeeks\n// all s: Summer | s.duration = EightWeeks\n// // every duration must belong to a semester\n// all d: Duration | some s: Semester | d in s.duration\n// }\n\n// // Constraint: 3\n// fact SemesterDates {\n// Spring.startdate = Jan1_\n// Spring.enddate = April30_\n// Summer.startdate = June1_\n// Summer.startdate = July31_\n// Fall.startdate = Aug10_\n// //adding fall enddate would make it stop working ;-;\n// //Fall.enddate = Dec22_ \n \n// // end date must be greater than start date for each semester\n// all s: Semester | s.startdate != s.enddate\n// }\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all disj c1, c2: Course | c1.id != c2.id \n}\n\n// Constraint: 6\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\n\n// Constraint: 7 for medium of instruction in courses\nfact MediumOfInstructionRules {\n all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n all l: Language | some c: Course | l = c.mediumOfInstruction\n}\n\nfact NoOfCoursesConstraint{\n all s: Student | #s.course >= 5 and #s.course <= 6\n}\n\nrun {} for 1 Student", "permalink": "squint-dining-crown-sweat", "time": "2024-11-19 18:21:55.880651", "cmd": 1} {"id": 24398, "parent": 24397, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n\n// // Constraint 2\n// // simulating an enum for duration\n// abstract sig Duration {}\n// sig SeventeenWeeks extends Duration {}\n// sig EightWeeks extends Duration {}\n\n// // Constraint 3\n// // simulating an enum for dates\n// abstract sig Date{}\n// sig Jan1_ extends Date{}\n// sig April30_ extends Date{}\n// sig June1_ extends Date{}\n// sig July31_ extends Date{}\n// sig Aug10_ extends Date{}\n// sig Dec22_ extends Date{}\n\n// abstract sig Semester {\n// duration: one Duration,\n// startdate: one Date,\n// enddate: one Date\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\nabstract sig Language {}\nsig English extends Language {}\nsig Urdu extends Language {}\nsig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n mediumOfInstruction: one Language, \n isReligiousStudies: one Boolean, \n isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// // Constraint 1 & 4\n// fact AcademicYearRules {\n// // Constraint 1 + 4: (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Every semester must belong to some academic year\n// all s: Semester | some ay: AcademicYear | s in ay.semesters\n// }\n\n// // Constraint: 2\n// fact SemesterDurations {\n// Spring.duration = SeventeenWeeks\n// Fall.duration = SeventeenWeeks\n// all s: Summer | s.duration = EightWeeks\n// // every duration must belong to a semester\n// all d: Duration | some s: Semester | d in s.duration\n// }\n\n// // Constraint: 3\n// fact SemesterDates {\n// Spring.startdate = Jan1_\n// Spring.enddate = April30_\n// Summer.startdate = June1_\n// Summer.startdate = July31_\n// Fall.startdate = Aug10_\n// //adding fall enddate would make it stop working ;-;\n// //Fall.enddate = Dec22_ \n \n// // end date must be greater than start date for each semester\n// all s: Semester | s.startdate != s.enddate\n// }\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all disj c1, c2: Course | c1.id != c2.id \n}\n\n// Constraint: 6\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\n\n// Constraint: 7 for medium of instruction in courses\nfact MediumOfInstructionRules {\n all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n all l: Language | some c: Course | l = c.mediumOfInstruction\n}\n\nfact NoOfCoursesConstraint{\n all s: Student | #s.course >= 5 and #s.course <= 6\n}\n\nrun {} for 1 Student but any ", "permalink": "poise-half-aptly-bogus", "time": "2024-11-19 18:22:06.612704", "cmd": 1} {"id": 24400, "parent": 24399, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n\n// // Constraint 2\n// // simulating an enum for duration\n// abstract sig Duration {}\n// sig SeventeenWeeks extends Duration {}\n// sig EightWeeks extends Duration {}\n\n// // Constraint 3\n// // simulating an enum for dates\n// abstract sig Date{}\n// sig Jan1_ extends Date{}\n// sig April30_ extends Date{}\n// sig June1_ extends Date{}\n// sig July31_ extends Date{}\n// sig Aug10_ extends Date{}\n// sig Dec22_ extends Date{}\n\n// abstract sig Semester {\n// duration: one Duration,\n// startdate: one Date,\n// enddate: one Date\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\nabstract sig Language {}\nsig English extends Language {}\nsig Urdu extends Language {}\nsig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n mediumOfInstruction: one Language, \n isReligiousStudies: one Boolean, \n isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// // Constraint 1 & 4\n// fact AcademicYearRules {\n// // Constraint 1 + 4: (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Every semester must belong to some academic year\n// all s: Semester | some ay: AcademicYear | s in ay.semesters\n// }\n\n// // Constraint: 2\n// fact SemesterDurations {\n// Spring.duration = SeventeenWeeks\n// Fall.duration = SeventeenWeeks\n// all s: Summer | s.duration = EightWeeks\n// // every duration must belong to a semester\n// all d: Duration | some s: Semester | d in s.duration\n// }\n\n// // Constraint: 3\n// fact SemesterDates {\n// Spring.startdate = Jan1_\n// Spring.enddate = April30_\n// Summer.startdate = June1_\n// Summer.startdate = July31_\n// Fall.startdate = Aug10_\n// //adding fall enddate would make it stop working ;-;\n// //Fall.enddate = Dec22_ \n \n// // end date must be greater than start date for each semester\n// all s: Semester | s.startdate != s.enddate\n// }\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all disj c1, c2: Course | c1.id != c2.id \n}\n\n// Constraint: 6\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\n\n// Constraint: 7 for medium of instruction in courses\nfact MediumOfInstructionRules {\n all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n all l: Language | some c: Course | l = c.mediumOfInstruction\n}\n\nfact NoOfCoursesConstraint{\n all s: Student | #s.course >= 5 and #s.course <= 6\n}\n\nrun {} for 1 Student but ", "permalink": "awhile-babble-waggle-bleak", "time": "2024-11-19 18:22:11.982179", "cmd": 1} {"id": 24399, "parent": 24398, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n\n// // Constraint 2\n// // simulating an enum for duration\n// abstract sig Duration {}\n// sig SeventeenWeeks extends Duration {}\n// sig EightWeeks extends Duration {}\n\n// // Constraint 3\n// // simulating an enum for dates\n// abstract sig Date{}\n// sig Jan1_ extends Date{}\n// sig April30_ extends Date{}\n// sig June1_ extends Date{}\n// sig July31_ extends Date{}\n// sig Aug10_ extends Date{}\n// sig Dec22_ extends Date{}\n\n// abstract sig Semester {\n// duration: one Duration,\n// startdate: one Date,\n// enddate: one Date\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\nabstract sig Language {}\nsig English extends Language {}\nsig Urdu extends Language {}\nsig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n mediumOfInstruction: one Language, \n isReligiousStudies: one Boolean, \n isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// // Constraint 1 & 4\n// fact AcademicYearRules {\n// // Constraint 1 + 4: (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Every semester must belong to some academic year\n// all s: Semester | some ay: AcademicYear | s in ay.semesters\n// }\n\n// // Constraint: 2\n// fact SemesterDurations {\n// Spring.duration = SeventeenWeeks\n// Fall.duration = SeventeenWeeks\n// all s: Summer | s.duration = EightWeeks\n// // every duration must belong to a semester\n// all d: Duration | some s: Semester | d in s.duration\n// }\n\n// // Constraint: 3\n// fact SemesterDates {\n// Spring.startdate = Jan1_\n// Spring.enddate = April30_\n// Summer.startdate = June1_\n// Summer.startdate = July31_\n// Fall.startdate = Aug10_\n// //adding fall enddate would make it stop working ;-;\n// //Fall.enddate = Dec22_ \n \n// // end date must be greater than start date for each semester\n// all s: Semester | s.startdate != s.enddate\n// }\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all disj c1, c2: Course | c1.id != c2.id \n}\n\n// Constraint: 6\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\n\n// Constraint: 7 for medium of instruction in courses\nfact MediumOfInstructionRules {\n all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n all l: Language | some c: Course | l = c.mediumOfInstruction\n}\n\nfact NoOfCoursesConstraint{\n all s: Student | #s.course >= 5 and #s.course <= 6\n}\n\nrun {} for 1 Student but ", "permalink": "plenty-jaws-ritzy-parrot", "time": "2024-11-19 18:22:10.902660", "cmd": 1} {"id": 24401, "parent": 24400, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n\n// // Constraint 2\n// // simulating an enum for duration\n// abstract sig Duration {}\n// sig SeventeenWeeks extends Duration {}\n// sig EightWeeks extends Duration {}\n\n// // Constraint 3\n// // simulating an enum for dates\n// abstract sig Date{}\n// sig Jan1_ extends Date{}\n// sig April30_ extends Date{}\n// sig June1_ extends Date{}\n// sig July31_ extends Date{}\n// sig Aug10_ extends Date{}\n// sig Dec22_ extends Date{}\n\n// abstract sig Semester {\n// duration: one Duration,\n// startdate: one Date,\n// enddate: one Date\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\nabstract sig Language {}\nsig English extends Language {}\nsig Urdu extends Language {}\nsig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n mediumOfInstruction: one Language, \n isReligiousStudies: one Boolean, \n isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// // Constraint 1 & 4\n// fact AcademicYearRules {\n// // Constraint 1 + 4: (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Every semester must belong to some academic year\n// all s: Semester | some ay: AcademicYear | s in ay.semesters\n// }\n\n// // Constraint: 2\n// fact SemesterDurations {\n// Spring.duration = SeventeenWeeks\n// Fall.duration = SeventeenWeeks\n// all s: Summer | s.duration = EightWeeks\n// // every duration must belong to a semester\n// all d: Duration | some s: Semester | d in s.duration\n// }\n\n// // Constraint: 3\n// fact SemesterDates {\n// Spring.startdate = Jan1_\n// Spring.enddate = April30_\n// Summer.startdate = June1_\n// Summer.startdate = July31_\n// Fall.startdate = Aug10_\n// //adding fall enddate would make it stop working ;-;\n// //Fall.enddate = Dec22_ \n \n// // end date must be greater than start date for each semester\n// all s: Semester | s.startdate != s.enddate\n// }\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all disj c1, c2: Course | c1.id != c2.id \n}\n\n// Constraint: 6\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\n\n// Constraint: 7 for medium of instruction in courses\nfact MediumOfInstructionRules {\n all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n all l: Language | some c: Course | l = c.mediumOfInstruction\n}\n\nfact NoOfCoursesConstraint{\n all s: Student | #s.course >= 5 and #s.course <= 6\n}\n\nrun {} for 1 Student but 1 Boolean ", "permalink": "femur-chrome-evolve-pulp", "time": "2024-11-19 18:22:23.294785", "cmd": 1} {"id": 24402, "parent": 24401, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n\n// // Constraint 2\n// // simulating an enum for duration\n// abstract sig Duration {}\n// sig SeventeenWeeks extends Duration {}\n// sig EightWeeks extends Duration {}\n\n// // Constraint 3\n// // simulating an enum for dates\n// abstract sig Date{}\n// sig Jan1_ extends Date{}\n// sig April30_ extends Date{}\n// sig June1_ extends Date{}\n// sig July31_ extends Date{}\n// sig Aug10_ extends Date{}\n// sig Dec22_ extends Date{}\n\n// abstract sig Semester {\n// duration: one Duration,\n// startdate: one Date,\n// enddate: one Date\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\nabstract sig Language {}\nsig English extends Language {}\nsig Urdu extends Language {}\nsig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n mediumOfInstruction: one Language, \n isReligiousStudies: one Boolean, \n isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// // Constraint 1 & 4\n// fact AcademicYearRules {\n// // Constraint 1 + 4: (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Every semester must belong to some academic year\n// all s: Semester | some ay: AcademicYear | s in ay.semesters\n// }\n\n// // Constraint: 2\n// fact SemesterDurations {\n// Spring.duration = SeventeenWeeks\n// Fall.duration = SeventeenWeeks\n// all s: Summer | s.duration = EightWeeks\n// // every duration must belong to a semester\n// all d: Duration | some s: Semester | d in s.duration\n// }\n\n// // Constraint: 3\n// fact SemesterDates {\n// Spring.startdate = Jan1_\n// Spring.enddate = April30_\n// Summer.startdate = June1_\n// Summer.startdate = July31_\n// Fall.startdate = Aug10_\n// //adding fall enddate would make it stop working ;-;\n// //Fall.enddate = Dec22_ \n \n// // end date must be greater than start date for each semester\n// all s: Semester | s.startdate != s.enddate\n// }\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all disj c1, c2: Course | c1.id != c2.id \n}\n\n// Constraint: 6\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\n\n// Constraint: 7 for medium of instruction in courses\nfact MediumOfInstructionRules {\n all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n all l: Language | some c: Course | l = c.mediumOfInstruction\n}\n\nfact NoOfCoursesConstraint{\n all s: Student | #s.course >= 5 and #s.course <= 6\n}\n\nrun {} for 1 Student, 1 Boolean, 6 Course", "permalink": "carat-caddie-raider-galley", "time": "2024-11-19 18:22:44.474817", "cmd": 1} {"id": 24405, "parent": 24404, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n\n// // Constraint 2\n// // simulating an enum for duration\n// abstract sig Duration {}\n// sig SeventeenWeeks extends Duration {}\n// sig EightWeeks extends Duration {}\n\n// // Constraint 3\n// // simulating an enum for dates\n// abstract sig Date{}\n// sig Jan1_ extends Date{}\n// sig April30_ extends Date{}\n// sig June1_ extends Date{}\n// sig July31_ extends Date{}\n// sig Aug10_ extends Date{}\n// sig Dec22_ extends Date{}\n\n// abstract sig Semester {\n// duration: one Duration,\n// startdate: one Date,\n// enddate: one Date\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\nabstract sig Language {}\nsig English extends Language {}\nsig Urdu extends Language {}\nsig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n mediumOfInstruction: one Language, \n isReligiousStudies: one Boolean, \n isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// // Constraint 1 & 4\n// fact AcademicYearRules {\n// // Constraint 1 + 4: (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Every semester must belong to some academic year\n// all s: Semester | some ay: AcademicYear | s in ay.semesters\n// }\n\n// // Constraint: 2\n// fact SemesterDurations {\n// Spring.duration = SeventeenWeeks\n// Fall.duration = SeventeenWeeks\n// all s: Summer | s.duration = EightWeeks\n// // every duration must belong to a semester\n// all d: Duration | some s: Semester | d in s.duration\n// }\n\n// // Constraint: 3\n// fact SemesterDates {\n// Spring.startdate = Jan1_\n// Spring.enddate = April30_\n// Summer.startdate = June1_\n// Summer.startdate = July31_\n// Fall.startdate = Aug10_\n// //adding fall enddate would make it stop working ;-;\n// //Fall.enddate = Dec22_ \n \n// // end date must be greater than start date for each semester\n// all s: Semester | s.startdate != s.enddate\n// }\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all disj c1, c2: Course | c1.id != c2.id \n}\n\n// Constraint: 6\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\n\n// Constraint: 7 for medium of instruction in courses\nfact MediumOfInstructionRules {\n all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n all l: Language | some c: Course | l = c.mediumOfInstruction\n}\n\nfact NoOfCoursesConstraint{\n all s: Student | #s.course >= 5 and #s.course <= 6\n}\n\nrun {} for 1 Student, 1 Boolean, 6 Course, 3 Language", "permalink": "ramrod-chili-duly-kite", "time": "2024-11-19 18:23:37.144906", "cmd": 1} {"id": 24403, "parent": 24402, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n\n// // Constraint 2\n// // simulating an enum for duration\n// abstract sig Duration {}\n// sig SeventeenWeeks extends Duration {}\n// sig EightWeeks extends Duration {}\n\n// // Constraint 3\n// // simulating an enum for dates\n// abstract sig Date{}\n// sig Jan1_ extends Date{}\n// sig April30_ extends Date{}\n// sig June1_ extends Date{}\n// sig July31_ extends Date{}\n// sig Aug10_ extends Date{}\n// sig Dec22_ extends Date{}\n\n// abstract sig Semester {\n// duration: one Duration,\n// startdate: one Date,\n// enddate: one Date\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\nabstract sig Language {}\nsig English extends Language {}\nsig Urdu extends Language {}\nsig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n mediumOfInstruction: one Language, \n isReligiousStudies: one Boolean, \n isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// // Constraint 1 & 4\n// fact AcademicYearRules {\n// // Constraint 1 + 4: (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Every semester must belong to some academic year\n// all s: Semester | some ay: AcademicYear | s in ay.semesters\n// }\n\n// // Constraint: 2\n// fact SemesterDurations {\n// Spring.duration = SeventeenWeeks\n// Fall.duration = SeventeenWeeks\n// all s: Summer | s.duration = EightWeeks\n// // every duration must belong to a semester\n// all d: Duration | some s: Semester | d in s.duration\n// }\n\n// // Constraint: 3\n// fact SemesterDates {\n// Spring.startdate = Jan1_\n// Spring.enddate = April30_\n// Summer.startdate = June1_\n// Summer.startdate = July31_\n// Fall.startdate = Aug10_\n// //adding fall enddate would make it stop working ;-;\n// //Fall.enddate = Dec22_ \n \n// // end date must be greater than start date for each semester\n// all s: Semester | s.startdate != s.enddate\n// }\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all disj c1, c2: Course | c1.id != c2.id \n}\n\n// Constraint: 6\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\n\n// Constraint: 7 for medium of instruction in courses\nfact MediumOfInstructionRules {\n all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n all l: Language | some c: Course | l = c.mediumOfInstruction\n}\n\nfact NoOfCoursesConstraint{\n all s: Student | #s.course >= 5 and #s.course <= 6\n}\n\nrun {} for 1 Student, 1 Boolean, 6 Course, 3 Language", "permalink": "cozily-untold-runny-tables", "time": "2024-11-19 18:22:50.696698", "cmd": 1} {"id": 24404, "parent": 24403, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n\n// // Constraint 2\n// // simulating an enum for duration\n// abstract sig Duration {}\n// sig SeventeenWeeks extends Duration {}\n// sig EightWeeks extends Duration {}\n\n// // Constraint 3\n// // simulating an enum for dates\n// abstract sig Date{}\n// sig Jan1_ extends Date{}\n// sig April30_ extends Date{}\n// sig June1_ extends Date{}\n// sig July31_ extends Date{}\n// sig Aug10_ extends Date{}\n// sig Dec22_ extends Date{}\n\n// abstract sig Semester {\n// duration: one Duration,\n// startdate: one Date,\n// enddate: one Date\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\nabstract sig Language {}\nsig English extends Language {}\nsig Urdu extends Language {}\nsig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n mediumOfInstruction: one Language, \n isReligiousStudies: one Boolean, \n isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// // Constraint 1 & 4\n// fact AcademicYearRules {\n// // Constraint 1 + 4: (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Every semester must belong to some academic year\n// all s: Semester | some ay: AcademicYear | s in ay.semesters\n// }\n\n// // Constraint: 2\n// fact SemesterDurations {\n// Spring.duration = SeventeenWeeks\n// Fall.duration = SeventeenWeeks\n// all s: Summer | s.duration = EightWeeks\n// // every duration must belong to a semester\n// all d: Duration | some s: Semester | d in s.duration\n// }\n\n// // Constraint: 3\n// fact SemesterDates {\n// Spring.startdate = Jan1_\n// Spring.enddate = April30_\n// Summer.startdate = June1_\n// Summer.startdate = July31_\n// Fall.startdate = Aug10_\n// //adding fall enddate would make it stop working ;-;\n// //Fall.enddate = Dec22_ \n \n// // end date must be greater than start date for each semester\n// all s: Semester | s.startdate != s.enddate\n// }\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all disj c1, c2: Course | c1.id != c2.id \n}\n\n// Constraint: 6\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\n\n// Constraint: 7 for medium of instruction in courses\nfact MediumOfInstructionRules {\n all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n all l: Language | some c: Course | l = c.mediumOfInstruction\n}\n\nfact NoOfCoursesConstraint{\n all s: Student | s.course >= 5 and s.course <= 6\n}\n\nrun {} for 1 Student, 1 Boolean, 6 Course, 3 Language", "permalink": "scope-poncho-chunk-enable", "time": "2024-11-19 18:23:30.505526", "cmd": 1} {"id": 24406, "parent": 24405, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n\n// // Constraint 2\n// // simulating an enum for duration\n// abstract sig Duration {}\n// sig SeventeenWeeks extends Duration {}\n// sig EightWeeks extends Duration {}\n\n// // Constraint 3\n// // simulating an enum for dates\n// abstract sig Date{}\n// sig Jan1_ extends Date{}\n// sig April30_ extends Date{}\n// sig June1_ extends Date{}\n// sig July31_ extends Date{}\n// sig Aug10_ extends Date{}\n// sig Dec22_ extends Date{}\n\n// abstract sig Semester {\n// duration: one Duration,\n// startdate: one Date,\n// enddate: one Date\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\nabstract sig Language {}\nsig English extends Language {}\nsig Urdu extends Language {}\nsig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n mediumOfInstruction: one Language, \n isReligiousStudies: one Boolean, \n isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// // Constraint 1 & 4\n// fact AcademicYearRules {\n// // Constraint 1 + 4: (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Every semester must belong to some academic year\n// all s: Semester | some ay: AcademicYear | s in ay.semesters\n// }\n\n// // Constraint: 2\n// fact SemesterDurations {\n// Spring.duration = SeventeenWeeks\n// Fall.duration = SeventeenWeeks\n// all s: Summer | s.duration = EightWeeks\n// // every duration must belong to a semester\n// all d: Duration | some s: Semester | d in s.duration\n// }\n\n// // Constraint: 3\n// fact SemesterDates {\n// Spring.startdate = Jan1_\n// Spring.enddate = April30_\n// Summer.startdate = June1_\n// Summer.startdate = July31_\n// Fall.startdate = Aug10_\n// //adding fall enddate would make it stop working ;-;\n// //Fall.enddate = Dec22_ \n \n// // end date must be greater than start date for each semester\n// all s: Semester | s.startdate != s.enddate\n// }\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all disj c1, c2: Course | c1.id != c2.id \n}\n\n// Constraint: 6\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\n\n// Constraint: 7 for medium of instruction in courses\nfact MediumOfInstructionRules {\n all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n all l: Language | some c: Course | l = c.mediumOfInstruction\n}\n\nfact NoOfCoursesConstraint{\n //all s: Student | #s.course >= 5 and #s.course <= 6\n}\n\nrun {} for 1 Student, 1 Boolean, 6 Course, 3 Language", "permalink": "retail-uphill-gawk-tweak", "time": "2024-11-19 18:23:44.459791", "cmd": 1} {"id": 24407, "parent": 24406, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n\n// // Constraint 2\n// // simulating an enum for duration\n// abstract sig Duration {}\n// sig SeventeenWeeks extends Duration {}\n// sig EightWeeks extends Duration {}\n\n// // Constraint 3\n// // simulating an enum for dates\n// abstract sig Date{}\n// sig Jan1_ extends Date{}\n// sig April30_ extends Date{}\n// sig June1_ extends Date{}\n// sig July31_ extends Date{}\n// sig Aug10_ extends Date{}\n// sig Dec22_ extends Date{}\n\n// abstract sig Semester {\n// duration: one Duration,\n// startdate: one Date,\n// enddate: one Date\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\nabstract sig Language {}\nsig English extends Language {}\nsig Urdu extends Language {}\nsig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n mediumOfInstruction: one Language, \n isReligiousStudies: one Boolean, \n isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// // Constraint 1 & 4\n// fact AcademicYearRules {\n// // Constraint 1 + 4: (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Every semester must belong to some academic year\n// all s: Semester | some ay: AcademicYear | s in ay.semesters\n// }\n\n// // Constraint: 2\n// fact SemesterDurations {\n// Spring.duration = SeventeenWeeks\n// Fall.duration = SeventeenWeeks\n// all s: Summer | s.duration = EightWeeks\n// // every duration must belong to a semester\n// all d: Duration | some s: Semester | d in s.duration\n// }\n\n// // Constraint: 3\n// fact SemesterDates {\n// Spring.startdate = Jan1_\n// Spring.enddate = April30_\n// Summer.startdate = June1_\n// Summer.startdate = July31_\n// Fall.startdate = Aug10_\n// //adding fall enddate would make it stop working ;-;\n// //Fall.enddate = Dec22_ \n \n// // end date must be greater than start date for each semester\n// all s: Semester | s.startdate != s.enddate\n// }\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all disj c1, c2: Course | c1.id != c2.id \n}\n\n// Constraint: 6\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\n\n// Constraint: 7 for medium of instruction in courses\nfact MediumOfInstructionRules {\n all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n all l: Language | some c: Course | l = c.mediumOfInstruction\n}\n\n// Constraint 8\nfact NoOfCoursesConstraint{\n all s: Student | #s.course >= 5 and #s.course <= 6\n}\n\nrun {}", "permalink": "eatery-ladies-ignore-vice", "time": "2024-11-19 18:25:13.301462", "cmd": 1} {"id": 24408, "parent": 24407, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n\n// // Constraint 2\n// // simulating an enum for duration\n// abstract sig Duration {}\n// sig SeventeenWeeks extends Duration {}\n// sig EightWeeks extends Duration {}\n\n// // Constraint 3\n// // simulating an enum for dates\n// abstract sig Date{}\n// sig Jan1_ extends Date{}\n// sig April30_ extends Date{}\n// sig June1_ extends Date{}\n// sig July31_ extends Date{}\n// sig Aug10_ extends Date{}\n// sig Dec22_ extends Date{}\n\n// abstract sig Semester {\n// duration: one Duration,\n// startdate: one Date,\n// enddate: one Date\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\nabstract sig Language {}\nsig English extends Language {}\nsig Urdu extends Language {}\nsig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n mediumOfInstruction: one Language, \n isReligiousStudies: one Boolean, \n isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// // Constraint 1 & 4\n// fact AcademicYearRules {\n// // Constraint 1 + 4: (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Every semester must belong to some academic year\n// all s: Semester | some ay: AcademicYear | s in ay.semesters\n// }\n\n// // Constraint: 2\n// fact SemesterDurations {\n// Spring.duration = SeventeenWeeks\n// Fall.duration = SeventeenWeeks\n// all s: Summer | s.duration = EightWeeks\n// // every duration must belong to a semester\n// all d: Duration | some s: Semester | d in s.duration\n// }\n\n// // Constraint: 3\n// fact SemesterDates {\n// Spring.startdate = Jan1_\n// Spring.enddate = April30_\n// Summer.startdate = June1_\n// Summer.startdate = July31_\n// Fall.startdate = Aug10_\n// //adding fall enddate would make it stop working ;-;\n// //Fall.enddate = Dec22_ \n \n// // end date must be greater than start date for each semester\n// all s: Semester | s.startdate != s.enddate\n// }\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all disj c1, c2: Course | c1.id != c2.id \n}\n\n// Constraint: 6\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\n\n// Constraint: 7 for medium of instruction in courses\nfact MediumOfInstructionRules {\n all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n all l: Language | some c: Course | l = c.mediumOfInstruction\n}\n\n// Constraint 8\n// fact NoOfCoursesConstraint{\n// all s: Student | #s.course >= 5 and #s.course <= 6\n// }\n\nrun {}", "permalink": "facing-dainty-shrubs-icon", "time": "2024-11-19 18:25:26.446615", "cmd": 1} {"id": 24409, "parent": 24408, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n\n// // Constraint 2\n// // simulating an enum for duration\n// abstract sig Duration {}\n// sig SeventeenWeeks extends Duration {}\n// sig EightWeeks extends Duration {}\n\n// // Constraint 3\n// // simulating an enum for dates\n// abstract sig Date{}\n// sig Jan1_ extends Date{}\n// sig April30_ extends Date{}\n// sig June1_ extends Date{}\n// sig July31_ extends Date{}\n// sig Aug10_ extends Date{}\n// sig Dec22_ extends Date{}\n\n// abstract sig Semester {\n// duration: one Duration,\n// startdate: one Date,\n// enddate: one Date\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// abstract sig Boolean {}\n// sig True extends Boolean {}\n// sig False extends Boolean {}\n\n// simulating enum for languages\n// abstract sig Language {}\n// sig English extends Language {}\n// sig Urdu extends Language {}\n// sig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n //mediumOfInstruction: one Language, \n //isReligiousStudies: one Boolean, \n //isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n //above80attendance: one Boolean,\n //eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// // Constraint 1 & 4\n// fact AcademicYearRules {\n// // Constraint 1 + 4: (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Every semester must belong to some academic year\n// all s: Semester | some ay: AcademicYear | s in ay.semesters\n// }\n\n// // Constraint: 2\n// fact SemesterDurations {\n// Spring.duration = SeventeenWeeks\n// Fall.duration = SeventeenWeeks\n// all s: Summer | s.duration = EightWeeks\n// // every duration must belong to a semester\n// all d: Duration | some s: Semester | d in s.duration\n// }\n\n// // Constraint: 3\n// fact SemesterDates {\n// Spring.startdate = Jan1_\n// Spring.enddate = April30_\n// Summer.startdate = June1_\n// Summer.startdate = July31_\n// Fall.startdate = Aug10_\n// //adding fall enddate would make it stop working ;-;\n// //Fall.enddate = Dec22_ \n \n// // end date must be greater than start date for each semester\n// all s: Semester | s.startdate != s.enddate\n// }\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all disj c1, c2: Course | c1.id != c2.id \n}\n\n// Constraint: 6\n// fact AttendanceRules{\n// all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n// all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n// }\n\n\n// Constraint: 7 for medium of instruction in courses\n// fact MediumOfInstructionRules {\n// all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n// all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n// all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n// all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n// all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n// all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n// all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n// all l: Language | some c: Course | l = c.mediumOfInstruction\n// }\n\n// Constraint 8\nfact NoOfCoursesConstraint{\n all s: Student | #s.course >= 5 and #s.course <= 6\n}\n\nrun {}", "permalink": "absurd-yummy-pond-pope", "time": "2024-11-19 18:26:32.591976", "cmd": 1} {"id": 24410, "parent": 24409, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n\n// // Constraint 2\n// // simulating an enum for duration\n// abstract sig Duration {}\n// sig SeventeenWeeks extends Duration {}\n// sig EightWeeks extends Duration {}\n\n// // Constraint 3\n// // simulating an enum for dates\n// abstract sig Date{}\n// sig Jan1_ extends Date{}\n// sig April30_ extends Date{}\n// sig June1_ extends Date{}\n// sig July31_ extends Date{}\n// sig Aug10_ extends Date{}\n// sig Dec22_ extends Date{}\n\n// abstract sig Semester {\n// duration: one Duration,\n// startdate: one Date,\n// enddate: one Date\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// abstract sig Boolean {}\n// sig True extends Boolean {}\n// sig False extends Boolean {}\n\n// simulating enum for languages\n// abstract sig Language {}\n// sig English extends Language {}\n// sig Urdu extends Language {}\n// sig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n //mediumOfInstruction: one Language, \n //isReligiousStudies: one Boolean, \n //isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n //above80attendance: one Boolean,\n //eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// // Constraint 1 & 4\n// fact AcademicYearRules {\n// // Constraint 1 + 4: (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Every semester must belong to some academic year\n// all s: Semester | some ay: AcademicYear | s in ay.semesters\n// }\n\n// // Constraint: 2\n// fact SemesterDurations {\n// Spring.duration = SeventeenWeeks\n// Fall.duration = SeventeenWeeks\n// all s: Summer | s.duration = EightWeeks\n// // every duration must belong to a semester\n// all d: Duration | some s: Semester | d in s.duration\n// }\n\n// // Constraint: 3\n// fact SemesterDates {\n// Spring.startdate = Jan1_\n// Spring.enddate = April30_\n// Summer.startdate = June1_\n// Summer.startdate = July31_\n// Fall.startdate = Aug10_\n// //adding fall enddate would make it stop working ;-;\n// //Fall.enddate = Dec22_ \n \n// // end date must be greater than start date for each semester\n// all s: Semester | s.startdate != s.enddate\n// }\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all disj c1, c2: Course | c1.id != c2.id \n}\n\n// Constraint: 6\n// fact AttendanceRules{\n// all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n// all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n// }\n\n\n// Constraint: 7 for medium of instruction in courses\n// fact MediumOfInstructionRules {\n// all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n// all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n// all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n// all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n// all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n// all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n// all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n// all l: Language | some c: Course | l = c.mediumOfInstruction\n// }\n\n// Constraint 8\nfact NoOfCoursesConstraint{\n all s: Student | #s.course >= 5 and #s.course <= 6\n}\n\nrun {} for 1 Student", "permalink": "sprain-moving-basket-pledge", "time": "2024-11-19 18:26:44.339988", "cmd": 1} {"id": 24411, "parent": 24410, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n\n// // Constraint 2\n// // simulating an enum for duration\n// abstract sig Duration {}\n// sig SeventeenWeeks extends Duration {}\n// sig EightWeeks extends Duration {}\n\n// // Constraint 3\n// // simulating an enum for dates\n// abstract sig Date{}\n// sig Jan1_ extends Date{}\n// sig April30_ extends Date{}\n// sig June1_ extends Date{}\n// sig July31_ extends Date{}\n// sig Aug10_ extends Date{}\n// sig Dec22_ extends Date{}\n\n// abstract sig Semester {\n// duration: one Duration,\n// startdate: one Date,\n// enddate: one Date\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// abstract sig Boolean {}\n// sig True extends Boolean {}\n// sig False extends Boolean {}\n\n// simulating enum for languages\n// abstract sig Language {}\n// sig English extends Language {}\n// sig Urdu extends Language {}\n// sig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n //mediumOfInstruction: one Language, \n //isReligiousStudies: one Boolean, \n //isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n //above80attendance: one Boolean,\n //eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// // Constraint 1 & 4\n// fact AcademicYearRules {\n// // Constraint 1 + 4: (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Every semester must belong to some academic year\n// all s: Semester | some ay: AcademicYear | s in ay.semesters\n// }\n\n// // Constraint: 2\n// fact SemesterDurations {\n// Spring.duration = SeventeenWeeks\n// Fall.duration = SeventeenWeeks\n// all s: Summer | s.duration = EightWeeks\n// // every duration must belong to a semester\n// all d: Duration | some s: Semester | d in s.duration\n// }\n\n// // Constraint: 3\n// fact SemesterDates {\n// Spring.startdate = Jan1_\n// Spring.enddate = April30_\n// Summer.startdate = June1_\n// Summer.startdate = July31_\n// Fall.startdate = Aug10_\n// //adding fall enddate would make it stop working ;-;\n// //Fall.enddate = Dec22_ \n \n// // end date must be greater than start date for each semester\n// all s: Semester | s.startdate != s.enddate\n// }\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all disj c1, c2: Course | c1.id != c2.id \n}\n\n// Constraint: 6\n// fact AttendanceRules{\n// all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n// all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n// }\n\n\n// Constraint: 7 for medium of instruction in courses\n// fact MediumOfInstructionRules {\n// all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n// all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n// all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n// all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n// all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n// all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n// all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n// all l: Language | some c: Course | l = c.mediumOfInstruction\n// }\n\n// Constraint 8\nfact NoOfCoursesConstraint{\n all s: Student | #s.course >= 5 and #s.course <= 6\n}\n\nrun {} for 1 Student 6 Course", "permalink": "cymbal-busboy-impure-shale", "time": "2024-11-19 18:26:48.909156", "cmd": 1} {"id": 24412, "parent": 24411, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n\n// // Constraint 2\n// // simulating an enum for duration\n// abstract sig Duration {}\n// sig SeventeenWeeks extends Duration {}\n// sig EightWeeks extends Duration {}\n\n// // Constraint 3\n// // simulating an enum for dates\n// abstract sig Date{}\n// sig Jan1_ extends Date{}\n// sig April30_ extends Date{}\n// sig June1_ extends Date{}\n// sig July31_ extends Date{}\n// sig Aug10_ extends Date{}\n// sig Dec22_ extends Date{}\n\n// abstract sig Semester {\n// duration: one Duration,\n// startdate: one Date,\n// enddate: one Date\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// abstract sig Boolean {}\n// sig True extends Boolean {}\n// sig False extends Boolean {}\n\n// simulating enum for languages\n// abstract sig Language {}\n// sig English extends Language {}\n// sig Urdu extends Language {}\n// sig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n //mediumOfInstruction: one Language, \n //isReligiousStudies: one Boolean, \n //isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n //above80attendance: one Boolean,\n //eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// // Constraint 1 & 4\n// fact AcademicYearRules {\n// // Constraint 1 + 4: (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Every semester must belong to some academic year\n// all s: Semester | some ay: AcademicYear | s in ay.semesters\n// }\n\n// // Constraint: 2\n// fact SemesterDurations {\n// Spring.duration = SeventeenWeeks\n// Fall.duration = SeventeenWeeks\n// all s: Summer | s.duration = EightWeeks\n// // every duration must belong to a semester\n// all d: Duration | some s: Semester | d in s.duration\n// }\n\n// // Constraint: 3\n// fact SemesterDates {\n// Spring.startdate = Jan1_\n// Spring.enddate = April30_\n// Summer.startdate = June1_\n// Summer.startdate = July31_\n// Fall.startdate = Aug10_\n// //adding fall enddate would make it stop working ;-;\n// //Fall.enddate = Dec22_ \n \n// // end date must be greater than start date for each semester\n// all s: Semester | s.startdate != s.enddate\n// }\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all disj c1, c2: Course | c1.id != c2.id \n}\n\n// Constraint: 6\n// fact AttendanceRules{\n// all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n// all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n// }\n\n\n// Constraint: 7 for medium of instruction in courses\n// fact MediumOfInstructionRules {\n// all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n// all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n// all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n// all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n// all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n// all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n// all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n// all l: Language | some c: Course | l = c.mediumOfInstruction\n// }\n\n// Constraint 8\nfact NoOfCoursesConstraint{\n all s: Student | #s.course >= 5 and #s.course <= 6\n}\n\nrun {} for 1 Student ,6 Course", "permalink": "exodus-wharf-atop-dealer", "time": "2024-11-19 18:26:55.360734", "cmd": 1} {"id": 24415, "parent": 24414, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n\n// // Constraint 2\n// // simulating an enum for duration\n// abstract sig Duration {}\n// sig SeventeenWeeks extends Duration {}\n// sig EightWeeks extends Duration {}\n\n// // Constraint 3\n// // simulating an enum for dates\n// abstract sig Date{}\n// sig Jan1_ extends Date{}\n// sig April30_ extends Date{}\n// sig June1_ extends Date{}\n// sig July31_ extends Date{}\n// sig Aug10_ extends Date{}\n// sig Dec22_ extends Date{}\n\n// abstract sig Semester {\n// duration: one Duration,\n// startdate: one Date,\n// enddate: one Date\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// abstract sig Boolean {}\n// sig True extends Boolean {}\n// sig False extends Boolean {}\n\n// simulating enum for languages\n// abstract sig Language {}\n// sig English extends Language {}\n// sig Urdu extends Language {}\n// sig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n //mediumOfInstruction: one Language, \n //isReligiousStudies: one Boolean, \n //isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n //above80attendance: one Boolean,\n //eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// // Constraint 1 & 4\n// fact AcademicYearRules {\n// // Constraint 1 + 4: (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Every semester must belong to some academic year\n// all s: Semester | some ay: AcademicYear | s in ay.semesters\n// }\n\n// // Constraint: 2\n// fact SemesterDurations {\n// Spring.duration = SeventeenWeeks\n// Fall.duration = SeventeenWeeks\n// all s: Summer | s.duration = EightWeeks\n// // every duration must belong to a semester\n// all d: Duration | some s: Semester | d in s.duration\n// }\n\n// // Constraint: 3\n// fact SemesterDates {\n// Spring.startdate = Jan1_\n// Spring.enddate = April30_\n// Summer.startdate = June1_\n// Summer.startdate = July31_\n// Fall.startdate = Aug10_\n// //adding fall enddate would make it stop working ;-;\n// //Fall.enddate = Dec22_ \n \n// // end date must be greater than start date for each semester\n// all s: Semester | s.startdate != s.enddate\n// }\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all disj c1, c2: Course | c1.id != c2.id \n}\n\n// Constraint: 6\n// fact AttendanceRules{\n// all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n// all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n// }\n\n\n// Constraint: 7 for medium of instruction in courses\n// fact MediumOfInstructionRules {\n// all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n// all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n// all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n// all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n// all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n// all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n// all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n// all l: Language | some c: Course | l = c.mediumOfInstruction\n// }\n\n// Constraint 8\nfact NoOfCoursesConstraint{\n all s: Student | #s.course >= 5 and #s.course <= 6\n}\n\nrun {} for 7", "permalink": "bamboo-theme-clique-gravel", "time": "2024-11-19 18:27:33.869609", "cmd": 1} {"id": 24413, "parent": 24412, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n\n// // Constraint 2\n// // simulating an enum for duration\n// abstract sig Duration {}\n// sig SeventeenWeeks extends Duration {}\n// sig EightWeeks extends Duration {}\n\n// // Constraint 3\n// // simulating an enum for dates\n// abstract sig Date{}\n// sig Jan1_ extends Date{}\n// sig April30_ extends Date{}\n// sig June1_ extends Date{}\n// sig July31_ extends Date{}\n// sig Aug10_ extends Date{}\n// sig Dec22_ extends Date{}\n\n// abstract sig Semester {\n// duration: one Duration,\n// startdate: one Date,\n// enddate: one Date\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// abstract sig Boolean {}\n// sig True extends Boolean {}\n// sig False extends Boolean {}\n\n// simulating enum for languages\n// abstract sig Language {}\n// sig English extends Language {}\n// sig Urdu extends Language {}\n// sig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n //mediumOfInstruction: one Language, \n //isReligiousStudies: one Boolean, \n //isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n //above80attendance: one Boolean,\n //eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// // Constraint 1 & 4\n// fact AcademicYearRules {\n// // Constraint 1 + 4: (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Every semester must belong to some academic year\n// all s: Semester | some ay: AcademicYear | s in ay.semesters\n// }\n\n// // Constraint: 2\n// fact SemesterDurations {\n// Spring.duration = SeventeenWeeks\n// Fall.duration = SeventeenWeeks\n// all s: Summer | s.duration = EightWeeks\n// // every duration must belong to a semester\n// all d: Duration | some s: Semester | d in s.duration\n// }\n\n// // Constraint: 3\n// fact SemesterDates {\n// Spring.startdate = Jan1_\n// Spring.enddate = April30_\n// Summer.startdate = June1_\n// Summer.startdate = July31_\n// Fall.startdate = Aug10_\n// //adding fall enddate would make it stop working ;-;\n// //Fall.enddate = Dec22_ \n \n// // end date must be greater than start date for each semester\n// all s: Semester | s.startdate != s.enddate\n// }\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all disj c1, c2: Course | c1.id != c2.id \n}\n\n// Constraint: 6\n// fact AttendanceRules{\n// all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n// all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n// }\n\n\n// Constraint: 7 for medium of instruction in courses\n// fact MediumOfInstructionRules {\n// all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n// all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n// all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n// all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n// all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n// all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n// all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n// all l: Language | some c: Course | l = c.mediumOfInstruction\n// }\n\n// Constraint 8\nfact NoOfCoursesConstraint{\n all s: Student | #s.course >= 5 and #s.course <= 6\n}\n\nrun {} for 7", "permalink": "wilder-either-kelp-corral", "time": "2024-11-19 18:27:09.377713", "cmd": 1} {"id": 24416, "parent": 24415, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n\n// // Constraint 2\n// // simulating an enum for duration\n// abstract sig Duration {}\n// sig SeventeenWeeks extends Duration {}\n// sig EightWeeks extends Duration {}\n\n// // Constraint 3\n// // simulating an enum for dates\n// abstract sig Date{}\n// sig Jan1_ extends Date{}\n// sig April30_ extends Date{}\n// sig June1_ extends Date{}\n// sig July31_ extends Date{}\n// sig Aug10_ extends Date{}\n// sig Dec22_ extends Date{}\n\n// abstract sig Semester {\n// duration: one Duration,\n// startdate: one Date,\n// enddate: one Date\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// abstract sig Boolean {}\n// sig True extends Boolean {}\n// sig False extends Boolean {}\n\n// simulating enum for languages\n// abstract sig Language {}\n// sig English extends Language {}\n// sig Urdu extends Language {}\n// sig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n //mediumOfInstruction: one Language, \n //isReligiousStudies: one Boolean, \n //isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n //above80attendance: one Boolean,\n //eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// // Constraint 1 & 4\n// fact AcademicYearRules {\n// // Constraint 1 + 4: (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Every semester must belong to some academic year\n// all s: Semester | some ay: AcademicYear | s in ay.semesters\n// }\n\n// // Constraint: 2\n// fact SemesterDurations {\n// Spring.duration = SeventeenWeeks\n// Fall.duration = SeventeenWeeks\n// all s: Summer | s.duration = EightWeeks\n// // every duration must belong to a semester\n// all d: Duration | some s: Semester | d in s.duration\n// }\n\n// // Constraint: 3\n// fact SemesterDates {\n// Spring.startdate = Jan1_\n// Spring.enddate = April30_\n// Summer.startdate = June1_\n// Summer.startdate = July31_\n// Fall.startdate = Aug10_\n// //adding fall enddate would make it stop working ;-;\n// //Fall.enddate = Dec22_ \n \n// // end date must be greater than start date for each semester\n// all s: Semester | s.startdate != s.enddate\n// }\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all disj c1, c2: Course | c1.id != c2.id \n}\n\n// Constraint: 6\n// fact AttendanceRules{\n// all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n// all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n// }\n\n\n// Constraint: 7 for medium of instruction in courses\n// fact MediumOfInstructionRules {\n// all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n// all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n// all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n// all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n// all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n// all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n// all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n// all l: Language | some c: Course | l = c.mediumOfInstruction\n// }\n\n// Constraint 8\nfact NoOfCoursesConstraint{\n all s: Student | #s.course >= 5 and #s.course <= 6\n}\n\nrun {} for 7", "permalink": "daisy-saved-ramp-spew", "time": "2024-11-19 18:30:42.004469", "cmd": 1} {"id": 24414, "parent": 24413, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n\n// // Constraint 2\n// // simulating an enum for duration\n// abstract sig Duration {}\n// sig SeventeenWeeks extends Duration {}\n// sig EightWeeks extends Duration {}\n\n// // Constraint 3\n// // simulating an enum for dates\n// abstract sig Date{}\n// sig Jan1_ extends Date{}\n// sig April30_ extends Date{}\n// sig June1_ extends Date{}\n// sig July31_ extends Date{}\n// sig Aug10_ extends Date{}\n// sig Dec22_ extends Date{}\n\n// abstract sig Semester {\n// duration: one Duration,\n// startdate: one Date,\n// enddate: one Date\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// abstract sig Boolean {}\n// sig True extends Boolean {}\n// sig False extends Boolean {}\n\n// simulating enum for languages\n// abstract sig Language {}\n// sig English extends Language {}\n// sig Urdu extends Language {}\n// sig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n //mediumOfInstruction: one Language, \n //isReligiousStudies: one Boolean, \n //isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n //above80attendance: one Boolean,\n //eligibleToGiveExam: one Boolean,\n course: set Course\n}\n\n// // Constraint 1 & 4\n// fact AcademicYearRules {\n// // Constraint 1 + 4: (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Every semester must belong to some academic year\n// all s: Semester | some ay: AcademicYear | s in ay.semesters\n// }\n\n// // Constraint: 2\n// fact SemesterDurations {\n// Spring.duration = SeventeenWeeks\n// Fall.duration = SeventeenWeeks\n// all s: Summer | s.duration = EightWeeks\n// // every duration must belong to a semester\n// all d: Duration | some s: Semester | d in s.duration\n// }\n\n// // Constraint: 3\n// fact SemesterDates {\n// Spring.startdate = Jan1_\n// Spring.enddate = April30_\n// Summer.startdate = June1_\n// Summer.startdate = July31_\n// Fall.startdate = Aug10_\n// //adding fall enddate would make it stop working ;-;\n// //Fall.enddate = Dec22_ \n \n// // end date must be greater than start date for each semester\n// all s: Semester | s.startdate != s.enddate\n// }\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all disj c1, c2: Course | c1.id != c2.id \n}\n\n// Constraint: 6\n// fact AttendanceRules{\n// all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n// all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n// }\n\n\n// Constraint: 7 for medium of instruction in courses\n// fact MediumOfInstructionRules {\n// all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n// all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n// all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n// all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n// all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n// all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n// all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n// all l: Language | some c: Course | l = c.mediumOfInstruction\n// }\n\n// Constraint 8\nfact NoOfCoursesConstraint{\n all s: Student | #s.course >= 5 and #s.course <= 6\n}\n\nrun {} for 5", "permalink": "clad-could-bamboo-risk", "time": "2024-11-19 18:27:20.266178", "cmd": 1} {"id": 24417, "parent": 24416, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n\n// // Constraint 2\n// // simulating an enum for duration\n// abstract sig Duration {}\n// sig SeventeenWeeks extends Duration {}\n// sig EightWeeks extends Duration {}\n\n// // Constraint 3\n// // simulating an enum for dates\n// abstract sig Date{}\n// sig Jan1_ extends Date{}\n// sig April30_ extends Date{}\n// sig June1_ extends Date{}\n// sig July31_ extends Date{}\n// sig Aug10_ extends Date{}\n// sig Dec22_ extends Date{}\n\n// abstract sig Semester {\n// duration: one Duration,\n// startdate: one Date,\n// enddate: one Date\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\n// abstract sig Boolean {}\n// sig True extends Boolean {}\n// sig False extends Boolean {}\n\n// simulating enum for languages\n// abstract sig Language {}\n// sig English extends Language {}\n// sig Urdu extends Language {}\n// sig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n //mediumOfInstruction: one Language, \n //isReligiousStudies: one Boolean, \n //isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n //above80attendance: one Boolean,\n //eligibleToGiveExam: one Boolean,\n course: set Course,\n fullLoad: one Boolean,\n underScholarship: one Boolean\n}\n\n//Constraint 9\nfact ScholarshipRules {\n all s: Student | s.underScholarship = True implies s.fullLoad = True\n all s: Student | #s.course >= 5 and #s.course <= 6 implies s.fullLoad = True\n}\n\n// // Constraint 1 & 4\n// fact AcademicYearRules {\n// // Constraint 1 + 4: (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Every semester must belong to some academic year\n// all s: Semester | some ay: AcademicYear | s in ay.semesters\n// }\n\n// // Constraint: 2\n// fact SemesterDurations {\n// Spring.duration = SeventeenWeeks\n// Fall.duration = SeventeenWeeks\n// all s: Summer | s.duration = EightWeeks\n// // every duration must belong to a semester\n// all d: Duration | some s: Semester | d in s.duration\n// }\n\n// // Constraint: 3\n// fact SemesterDates {\n// Spring.startdate = Jan1_\n// Spring.enddate = April30_\n// Summer.startdate = June1_\n// Summer.startdate = July31_\n// Fall.startdate = Aug10_\n// //adding fall enddate would make it stop working ;-;\n// //Fall.enddate = Dec22_ \n \n// // end date must be greater than start date for each semester\n// all s: Semester | s.startdate != s.enddate\n// }\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all disj c1, c2: Course | c1.id != c2.id \n}\n\n// Constraint: 6\n// fact AttendanceRules{\n// all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n// all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n// }\n\n\n// Constraint: 7 for medium of instruction in courses\n// fact MediumOfInstructionRules {\n// all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n// all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n// all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n// all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n// all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n// all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n// all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n// all l: Language | some c: Course | l = c.mediumOfInstruction\n// }\n\n// Constraint 8\n// fact NoOfCoursesConstraint{\n// all s: Student | #s.course >= 5 and #s.course <= 6\n// }\n\nrun {} ", "permalink": "nuclei-cut-clad-wharf", "time": "2024-11-19 18:34:41.985960", "cmd": 1} {"id": 24418, "parent": 24417, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n\n// // Constraint 2\n// // simulating an enum for duration\n// abstract sig Duration {}\n// sig SeventeenWeeks extends Duration {}\n// sig EightWeeks extends Duration {}\n\n// // Constraint 3\n// // simulating an enum for dates\n// abstract sig Date{}\n// sig Jan1_ extends Date{}\n// sig April30_ extends Date{}\n// sig June1_ extends Date{}\n// sig July31_ extends Date{}\n// sig Aug10_ extends Date{}\n// sig Dec22_ extends Date{}\n\n// abstract sig Semester {\n// duration: one Duration,\n// startdate: one Date,\n// enddate: one Date\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\n// abstract sig Language {}\n// sig English extends Language {}\n// sig Urdu extends Language {}\n// sig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n //mediumOfInstruction: one Language, \n //isReligiousStudies: one Boolean, \n //isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n //above80attendance: one Boolean,\n //eligibleToGiveExam: one Boolean,\n course: set Course,\n fullLoad: one Boolean,\n underScholarship: one Boolean\n}\n\n//Constraint 9\nfact ScholarshipRules {\n all s: Student | s.underScholarship = True implies s.fullLoad = True\n all s: Student | #s.course >= 5 and #s.course <= 6 implies s.fullLoad = True\n}\n\n// // Constraint 1 & 4\n// fact AcademicYearRules {\n// // Constraint 1 + 4: (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Every semester must belong to some academic year\n// all s: Semester | some ay: AcademicYear | s in ay.semesters\n// }\n\n// // Constraint: 2\n// fact SemesterDurations {\n// Spring.duration = SeventeenWeeks\n// Fall.duration = SeventeenWeeks\n// all s: Summer | s.duration = EightWeeks\n// // every duration must belong to a semester\n// all d: Duration | some s: Semester | d in s.duration\n// }\n\n// // Constraint: 3\n// fact SemesterDates {\n// Spring.startdate = Jan1_\n// Spring.enddate = April30_\n// Summer.startdate = June1_\n// Summer.startdate = July31_\n// Fall.startdate = Aug10_\n// //adding fall enddate would make it stop working ;-;\n// //Fall.enddate = Dec22_ \n \n// // end date must be greater than start date for each semester\n// all s: Semester | s.startdate != s.enddate\n// }\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all disj c1, c2: Course | c1.id != c2.id \n}\n\n// Constraint: 6\n// fact AttendanceRules{\n// all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n// all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n// }\n\n\n// Constraint: 7 for medium of instruction in courses\n// fact MediumOfInstructionRules {\n// all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n// all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n// all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n// all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n// all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n// all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n// all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n// all l: Language | some c: Course | l = c.mediumOfInstruction\n// }\n\n// Constraint 8\n// fact NoOfCoursesConstraint{\n// all s: Student | #s.course >= 5 and #s.course <= 6\n// }\n\nrun {} ", "permalink": "specks-lumber-plod-pointy", "time": "2024-11-19 18:34:53.498893", "cmd": 1} {"id": 24419, "parent": 24418, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n\n// // Constraint 2\n// // simulating an enum for duration\n// abstract sig Duration {}\n// sig SeventeenWeeks extends Duration {}\n// sig EightWeeks extends Duration {}\n\n// // Constraint 3\n// // simulating an enum for dates\n// abstract sig Date{}\n// sig Jan1_ extends Date{}\n// sig April30_ extends Date{}\n// sig June1_ extends Date{}\n// sig July31_ extends Date{}\n// sig Aug10_ extends Date{}\n// sig Dec22_ extends Date{}\n\n// abstract sig Semester {\n// duration: one Duration,\n// startdate: one Date,\n// enddate: one Date\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\n// abstract sig Language {}\n// sig English extends Language {}\n// sig Urdu extends Language {}\n// sig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n //mediumOfInstruction: one Language, \n //isReligiousStudies: one Boolean, \n //isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n //above80attendance: one Boolean,\n //eligibleToGiveExam: one Boolean,\n course: set Course,\n fullLoad: one Boolean,\n underScholarship: one Boolean\n}\n\n//Constraint 9\nfact ScholarshipRules {\n all s: Student | s.underScholarship = True implies s.fullLoad = True\n //does not work well with integers thats why using fullLoad enum\n //all s: Student | #s.course >= 5 and #s.course <= 6 implies s.fullLoad = True\n}\n\n// // Constraint 1 & 4\n// fact AcademicYearRules {\n// // Constraint 1 + 4: (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Every semester must belong to some academic year\n// all s: Semester | some ay: AcademicYear | s in ay.semesters\n// }\n\n// // Constraint: 2\n// fact SemesterDurations {\n// Spring.duration = SeventeenWeeks\n// Fall.duration = SeventeenWeeks\n// all s: Summer | s.duration = EightWeeks\n// // every duration must belong to a semester\n// all d: Duration | some s: Semester | d in s.duration\n// }\n\n// // Constraint: 3\n// fact SemesterDates {\n// Spring.startdate = Jan1_\n// Spring.enddate = April30_\n// Summer.startdate = June1_\n// Summer.startdate = July31_\n// Fall.startdate = Aug10_\n// //adding fall enddate would make it stop working ;-;\n// //Fall.enddate = Dec22_ \n \n// // end date must be greater than start date for each semester\n// all s: Semester | s.startdate != s.enddate\n// }\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all disj c1, c2: Course | c1.id != c2.id \n}\n\n// Constraint: 6\n// fact AttendanceRules{\n// all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n// all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n// }\n\n\n// Constraint: 7 for medium of instruction in courses\n// fact MediumOfInstructionRules {\n// all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n// all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n// all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n// all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n// all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n// all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n// all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n// all l: Language | some c: Course | l = c.mediumOfInstruction\n// }\n\n// Constraint 8\n// fact NoOfCoursesConstraint{\n// all s: Student | #s.course >= 5 and #s.course <= 6\n// }\n\nrun {} ", "permalink": "bucked-opt-jury-muzzle", "time": "2024-11-19 18:35:33.762426", "cmd": 1} {"id": 24420, "parent": 24376, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\n//enum Bool {True, False}\n//enum Numbers {SevenTeen, Eight, ElevenThousand}\n//enum Month {Jan, June, August}\n//enum Language {Urdu, English, Other}\nenum DegreeProgram {CS, SE, CY, DS, EE}\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { \n //semesters: some Semester \n degreesOffered: some DegreeProgram\n}\n\n// // *** Semester ***\n// abstract sig Semester {\n// duration: one Numbers,\n// startMonth: one Month,\n// isStartDateGreaterThanEndDate: one Bool,\n// courses: some Course\n// registered: some Student\n// }\n// one sig Spring, Fall extends Semester {}\n// lone sig Summer extends Semester {}\n\n// *** Course ***\n// abstract sig Course {\n// mediumOfInstruction: one Language,\n// isMandatoryForNonFastMS: one Bool,\n// preRequisite: set Course,\n// }\n// sig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\n// sig AppliedProgramming extends GeneralCourse {}\n\n// *** Student ***\nsig Student {\n rollNumber: one Int,\n degree: one DegreeProgram //This handles constraint 16\n}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\n// fact AcademicYearConstraints{\n// all ay: AcademicYear | {\n// //Number of semesters constraint\n// #ay.semesters >= 2 and #ay.semesters <=3\n\n// //Mandatory Semesters in the academic year\n// one sp: Spring | sp in ay.semesters\n// one fl: Fall | fl in ay.semesters\n\n// //Optional summer semester\n// lone su: Summer | su in ay.semesters\n// }\n// }\n\n// //If there is a thrid semester then that semester is Summers\n// assert AcademicYearSummerConstraint {\n// all ay: AcademicYear | {\n// #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n// }\n// }\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\n// fact CourseMediumOfConstructionConstraints {\n// all c: Course | {\n// (c in GeneralCourse) implies c.mediumOfInstruction = English\n// (c in ReligiousStudies) implies ((c.mediumOfInstruction = Urdu) or (c.mediumOfInstruction = English))\n// (c in LanguageCourse) implies c.mediumOfInstruction = Other\n// }\n// }\n// *** Course Constraints *** //\n\n// *** Student Constraints *** //\n//Student roll number uniqueness constraint (5 and 10)\nfact StudentRollNumConstraint {\n all s1, s2: Student | s1 != s2\n}\n//For all Students, students can only apply to one degree program offered in an academic year\nassert StudentDegreeProgramConstraint {\n all s: Student | some ay: AcademicYear | s.degree in ay.degreesOffered\n}\n// *** Student Constraints *** //\n\nrun {} for 3", "permalink": "pluck-come-edgy-crib", "time": "2024-11-19 18:37:10.449981", "cmd": 1} {"id": 24421, "parent": 24419, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n\n// // Constraint 2\n// // simulating an enum for duration\n// abstract sig Duration {}\n// sig SeventeenWeeks extends Duration {}\n// sig EightWeeks extends Duration {}\n\n// // Constraint 3\n// // simulating an enum for dates\n// abstract sig Date{}\n// sig Jan1_ extends Date{}\n// sig April30_ extends Date{}\n// sig June1_ extends Date{}\n// sig July31_ extends Date{}\n// sig Aug10_ extends Date{}\n// sig Dec22_ extends Date{}\n\n// abstract sig Semester {\n// duration: one Duration,\n// startdate: one Date,\n// enddate: one Date\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\n// abstract sig Language {}\n// sig English extends Language {}\n// sig Urdu extends Language {}\n// sig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n //mediumOfInstruction: one Language, \n //isReligiousStudies: one Boolean, \n //isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n //above80attendance: one Boolean,\n //eligibleToGiveExam: one Boolean,\n course: set Course,\n fullLoad: one Boolean,\n underScholarship: one Boolean\n}\n\nfact ForceScholarship {\n all s: Student | s.underScholarship = True\n}\n\n\n//Constraint 9\nfact ScholarshipRules {\n all s: Student | s.underScholarship = True implies s.fullLoad = True\n //does not work well with integers thats why using fullLoad enum\n //all s: Student | #s.course >= 5 and #s.course <= 6 implies s.fullLoad = True\n}\n\n// // Constraint 1 & 4\n// fact AcademicYearRules {\n// // Constraint 1 + 4: (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Every semester must belong to some academic year\n// all s: Semester | some ay: AcademicYear | s in ay.semesters\n// }\n\n// // Constraint: 2\n// fact SemesterDurations {\n// Spring.duration = SeventeenWeeks\n// Fall.duration = SeventeenWeeks\n// all s: Summer | s.duration = EightWeeks\n// // every duration must belong to a semester\n// all d: Duration | some s: Semester | d in s.duration\n// }\n\n// // Constraint: 3\n// fact SemesterDates {\n// Spring.startdate = Jan1_\n// Spring.enddate = April30_\n// Summer.startdate = June1_\n// Summer.startdate = July31_\n// Fall.startdate = Aug10_\n// //adding fall enddate would make it stop working ;-;\n// //Fall.enddate = Dec22_ \n \n// // end date must be greater than start date for each semester\n// all s: Semester | s.startdate != s.enddate\n// }\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all disj c1, c2: Course | c1.id != c2.id \n}\n\n// Constraint: 6\n// fact AttendanceRules{\n// all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n// all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n// }\n\n\n// Constraint: 7 for medium of instruction in courses\n// fact MediumOfInstructionRules {\n// all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n// all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n// all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n// all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n// all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n// all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n// all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n// all l: Language | some c: Course | l = c.mediumOfInstruction\n// }\n\n// Constraint 8\n// fact NoOfCoursesConstraint{\n// all s: Student | #s.course >= 5 and #s.course <= 6\n// }\n\nrun {} ", "permalink": "smile-evil-tamper-uneasy", "time": "2024-11-19 18:37:21.461551", "cmd": 1} {"id": 24423, "parent": 24422, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\n//enum Bool {True, False}\n//enum Numbers {SevenTeen, Eight, ElevenThousand}\n//enum Month {Jan, June, August}\n//enum Language {Urdu, English, Other}\nenum DegreeProgram {CS, SE, CY, DS, EE}\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { \n //semesters: some Semester \n degreesOffered: some DegreeProgram\n}\n\n// // *** Semester ***\n// abstract sig Semester {\n// duration: one Numbers,\n// startMonth: one Month,\n// isStartDateGreaterThanEndDate: one Bool,\n// courses: some Course\n// registered: some Student\n// }\n// one sig Spring, Fall extends Semester {}\n// lone sig Summer extends Semester {}\n\n// *** Course ***\n// abstract sig Course {\n// mediumOfInstruction: one Language,\n// isMandatoryForNonFastMS: one Bool,\n// preRequisite: set Course,\n// }\n// sig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\n// sig AppliedProgramming extends GeneralCourse {}\n\n// *** Student ***\nsome sig Student {\n rollNumber: one Int,\n degree: one DegreeProgram //This handles constraint 16\n}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\n// fact AcademicYearConstraints{\n// all ay: AcademicYear | {\n// //Number of semesters constraint\n// #ay.semesters >= 2 and #ay.semesters <=3\n\n// //Mandatory Semesters in the academic year\n// one sp: Spring | sp in ay.semesters\n// one fl: Fall | fl in ay.semesters\n\n// //Optional summer semester\n// lone su: Summer | su in ay.semesters\n// }\n// }\n\n// //If there is a thrid semester then that semester is Summers\n// assert AcademicYearSummerConstraint {\n// all ay: AcademicYear | {\n// #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n// }\n// }\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\n// fact CourseMediumOfConstructionConstraints {\n// all c: Course | {\n// (c in GeneralCourse) implies c.mediumOfInstruction = English\n// (c in ReligiousStudies) implies ((c.mediumOfInstruction = Urdu) or (c.mediumOfInstruction = English))\n// (c in LanguageCourse) implies c.mediumOfInstruction = Other\n// }\n// }\n// *** Course Constraints *** //\n\n// *** Student Constraints *** //\n//Student roll number uniqueness constraint (5 and 10)\nfact StudentRollNumConstraint {\n all s1, s2: Student | s1 != s2\n}\n//For all Students, students can only apply to one degree program offered in an academic year\nassert StudentDegreeProgramConstraint {\n all s: Student | some ay: AcademicYear | s.degree in ay.degreesOffered\n}\n// *** Student Constraints *** //\n\nrun {} for 3", "permalink": "stoop-expire-rope-lapel", "time": "2024-11-19 18:37:41.627256", "cmd": 1} {"id": 24422, "parent": 24420, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\n//enum Bool {True, False}\n//enum Numbers {SevenTeen, Eight, ElevenThousand}\n//enum Month {Jan, June, August}\n//enum Language {Urdu, English, Other}\nenum DegreeProgram {CS, SE, CY, DS, EE}\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { \n //semesters: some Semester \n degreesOffered: some DegreeProgram\n}\n\n// // *** Semester ***\n// abstract sig Semester {\n// duration: one Numbers,\n// startMonth: one Month,\n// isStartDateGreaterThanEndDate: one Bool,\n// courses: some Course\n// registered: some Student\n// }\n// one sig Spring, Fall extends Semester {}\n// lone sig Summer extends Semester {}\n\n// *** Course ***\n// abstract sig Course {\n// mediumOfInstruction: one Language,\n// isMandatoryForNonFastMS: one Bool,\n// preRequisite: set Course,\n// }\n// sig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\n// sig AppliedProgramming extends GeneralCourse {}\n\n// *** Student ***\nsome sig Student {\n rollNumber: one Int,\n degree: one DegreeProgram //This handles constraint 16\n}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\n// fact AcademicYearConstraints{\n// all ay: AcademicYear | {\n// //Number of semesters constraint\n// #ay.semesters >= 2 and #ay.semesters <=3\n\n// //Mandatory Semesters in the academic year\n// one sp: Spring | sp in ay.semesters\n// one fl: Fall | fl in ay.semesters\n\n// //Optional summer semester\n// lone su: Summer | su in ay.semesters\n// }\n// }\n\n// //If there is a thrid semester then that semester is Summers\n// assert AcademicYearSummerConstraint {\n// all ay: AcademicYear | {\n// #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n// }\n// }\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\n// fact CourseMediumOfConstructionConstraints {\n// all c: Course | {\n// (c in GeneralCourse) implies c.mediumOfInstruction = English\n// (c in ReligiousStudies) implies ((c.mediumOfInstruction = Urdu) or (c.mediumOfInstruction = English))\n// (c in LanguageCourse) implies c.mediumOfInstruction = Other\n// }\n// }\n// *** Course Constraints *** //\n\n// *** Student Constraints *** //\n//Student roll number uniqueness constraint (5 and 10)\nfact StudentRollNumConstraint {\n all s1, s2: Student | s1 != s2\n}\n//For all Students, students can only apply to one degree program offered in an academic year\nassert StudentDegreeProgramConstraint {\n all s: Student | some ay: AcademicYear | s.degree in ay.degreesOffered\n}\n// *** Student Constraints *** //\n\nrun {} for 3", "permalink": "swan-caviar-swivel-quench", "time": "2024-11-19 18:37:40.128461", "cmd": 1} {"id": 24424, "parent": 24421, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n\n// // Constraint 2\n// // simulating an enum for duration\n// abstract sig Duration {}\n// sig SeventeenWeeks extends Duration {}\n// sig EightWeeks extends Duration {}\n\n// // Constraint 3\n// // simulating an enum for dates\n// abstract sig Date{}\n// sig Jan1_ extends Date{}\n// sig April30_ extends Date{}\n// sig June1_ extends Date{}\n// sig July31_ extends Date{}\n// sig Aug10_ extends Date{}\n// sig Dec22_ extends Date{}\n\n// abstract sig Semester {\n// duration: one Duration,\n// startdate: one Date,\n// enddate: one Date\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\n// abstract sig Language {}\n// sig English extends Language {}\n// sig Urdu extends Language {}\n// sig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n //mediumOfInstruction: one Language, \n //isReligiousStudies: one Boolean, \n //isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n //above80attendance: one Boolean,\n //eligibleToGiveExam: one Boolean,\n course: set Course,\n fullLoad: one Boolean,\n underScholarship: one Boolean\n}\n\n\n//Constraint 9\nfact ScholarshipRules {\n all s: Student | s.underScholarship = True implies s.fullLoad = True\n //does not work well with integers thats why using fullLoad enum\n //all s: Student | #s.course >= 5 and #s.course <= 6 implies s.fullLoad = True\n}\n\n// // Constraint 1 & 4\n// fact AcademicYearRules {\n// // Constraint 1 + 4: (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Every semester must belong to some academic year\n// all s: Semester | some ay: AcademicYear | s in ay.semesters\n// }\n\n// // Constraint: 2\n// fact SemesterDurations {\n// Spring.duration = SeventeenWeeks\n// Fall.duration = SeventeenWeeks\n// all s: Summer | s.duration = EightWeeks\n// // every duration must belong to a semester\n// all d: Duration | some s: Semester | d in s.duration\n// }\n\n// // Constraint: 3\n// fact SemesterDates {\n// Spring.startdate = Jan1_\n// Spring.enddate = April30_\n// Summer.startdate = June1_\n// Summer.startdate = July31_\n// Fall.startdate = Aug10_\n// //adding fall enddate would make it stop working ;-;\n// //Fall.enddate = Dec22_ \n \n// // end date must be greater than start date for each semester\n// all s: Semester | s.startdate != s.enddate\n// }\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all disj c1, c2: Course | c1.id != c2.id \n}\n\n// Constraint: 6\n// fact AttendanceRules{\n// all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n// all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n// }\n\n\n// Constraint: 7 for medium of instruction in courses\n// fact MediumOfInstructionRules {\n// all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n// all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n// all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n// all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n// all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n// all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n// all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n// all l: Language | some c: Course | l = c.mediumOfInstruction\n// }\n\n// Constraint 8\n// fact NoOfCoursesConstraint{\n// all s: Student | #s.course >= 5 and #s.course <= 6\n// }\n\nrun {} 7", "permalink": "exact-dosage-kiln-runway", "time": "2024-11-19 18:37:58.454573", "cmd": 1} {"id": 24425, "parent": 24423, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\n//enum Bool {True, False}\n//enum Numbers {SevenTeen, Eight, ElevenThousand}\n//enum Month {Jan, June, August}\n//enum Language {Urdu, English, Other}\nenum DegreeProgram {CS, SE, CY, DS, EE}\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { \n //semesters: some Semester \n degreesOffered: some DegreeProgram\n}\n\n// // *** Semester ***\n// abstract sig Semester {\n// duration: one Numbers,\n// startMonth: one Month,\n// isStartDateGreaterThanEndDate: one Bool,\n// courses: some Course\n// registered: some Student\n// }\n// one sig Spring, Fall extends Semester {}\n// lone sig Summer extends Semester {}\n\n// *** Course ***\n// abstract sig Course {\n// mediumOfInstruction: one Language,\n// isMandatoryForNonFastMS: one Bool,\n// preRequisite: set Course,\n// }\n// sig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\n// sig AppliedProgramming extends GeneralCourse {}\n\n// *** Student ***\nsig Student {\n rollNumber: one Int,\n degree: one DegreeProgram //This handles constraint 16\n}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\n// fact AcademicYearConstraints{\n// all ay: AcademicYear | {\n// //Number of semesters constraint\n// #ay.semesters >= 2 and #ay.semesters <=3\n\n// //Mandatory Semesters in the academic year\n// one sp: Spring | sp in ay.semesters\n// one fl: Fall | fl in ay.semesters\n\n// //Optional summer semester\n// lone su: Summer | su in ay.semesters\n// }\n// }\n\n// //If there is a thrid semester then that semester is Summers\n// assert AcademicYearSummerConstraint {\n// all ay: AcademicYear | {\n// #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n// }\n// }\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\n// fact CourseMediumOfConstructionConstraints {\n// all c: Course | {\n// (c in GeneralCourse) implies c.mediumOfInstruction = English\n// (c in ReligiousStudies) implies ((c.mediumOfInstruction = Urdu) or (c.mediumOfInstruction = English))\n// (c in LanguageCourse) implies c.mediumOfInstruction = Other\n// }\n// }\n// *** Course Constraints *** //\n\n// *** Student Constraints *** //\n//Student roll number uniqueness constraint (5 and 10)\nfact StudentRollNumConstraint {\n all s1, s2: Student | s1 != s2\n}\n//For all Students, students can only apply to one degree program offered in an academic year\n// assert StudentDegreeProgramConstraint {\n// all s: Student | some ay: AcademicYear | s.degree in ay.degreesOffered\n// }\n// *** Student Constraints *** //\n\nrun {} for 3", "permalink": "rind-baton-babied-resume", "time": "2024-11-19 18:37:59.754932", "cmd": 1} {"id": 24426, "parent": 24424, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n\n// // Constraint 2\n// // simulating an enum for duration\n// abstract sig Duration {}\n// sig SeventeenWeeks extends Duration {}\n// sig EightWeeks extends Duration {}\n\n// // Constraint 3\n// // simulating an enum for dates\n// abstract sig Date{}\n// sig Jan1_ extends Date{}\n// sig April30_ extends Date{}\n// sig June1_ extends Date{}\n// sig July31_ extends Date{}\n// sig Aug10_ extends Date{}\n// sig Dec22_ extends Date{}\n\n// abstract sig Semester {\n// duration: one Duration,\n// startdate: one Date,\n// enddate: one Date\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\n// abstract sig Language {}\n// sig English extends Language {}\n// sig Urdu extends Language {}\n// sig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n //mediumOfInstruction: one Language, \n //isReligiousStudies: one Boolean, \n //isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n //above80attendance: one Boolean,\n //eligibleToGiveExam: one Boolean,\n course: set Course,\n fullLoad: one Boolean,\n underScholarship: one Boolean\n}\n\n\n//Constraint 9\nfact ScholarshipRules {\n all s: Student | s.underScholarship = True implies s.fullLoad = True\n //does not work well with integers thats why using fullLoad enum\n //all s: Student | #s.course >= 5 and #s.course <= 6 implies s.fullLoad = True\n}\n\n// // Constraint 1 & 4\n// fact AcademicYearRules {\n// // Constraint 1 + 4: (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Every semester must belong to some academic year\n// all s: Semester | some ay: AcademicYear | s in ay.semesters\n// }\n\n// // Constraint: 2\n// fact SemesterDurations {\n// Spring.duration = SeventeenWeeks\n// Fall.duration = SeventeenWeeks\n// all s: Summer | s.duration = EightWeeks\n// // every duration must belong to a semester\n// all d: Duration | some s: Semester | d in s.duration\n// }\n\n// // Constraint: 3\n// fact SemesterDates {\n// Spring.startdate = Jan1_\n// Spring.enddate = April30_\n// Summer.startdate = June1_\n// Summer.startdate = July31_\n// Fall.startdate = Aug10_\n// //adding fall enddate would make it stop working ;-;\n// //Fall.enddate = Dec22_ \n \n// // end date must be greater than start date for each semester\n// all s: Semester | s.startdate != s.enddate\n// }\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all disj c1, c2: Course | c1.id != c2.id \n}\n\n// Constraint: 6\n// fact AttendanceRules{\n// all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n// all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n// }\n\n\n// Constraint: 7 for medium of instruction in courses\n// fact MediumOfInstructionRules {\n// all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n// all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n// all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n// all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n// all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n// all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n// all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n// all l: Language | some c: Course | l = c.mediumOfInstruction\n// }\n\n// Constraint 8\n// fact NoOfCoursesConstraint{\n// all s: Student | #s.course >= 5 and #s.course <= 6\n// }\n\nrun {} for 7", "permalink": "lapped-chill-shell-punk", "time": "2024-11-19 18:38:06.746583", "cmd": 1} {"id": 24427, "parent": 24426, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n\n// // Constraint 2\n// // simulating an enum for duration\n// abstract sig Duration {}\n// sig SeventeenWeeks extends Duration {}\n// sig EightWeeks extends Duration {}\n\n// // Constraint 3\n// // simulating an enum for dates\n// abstract sig Date{}\n// sig Jan1_ extends Date{}\n// sig April30_ extends Date{}\n// sig June1_ extends Date{}\n// sig July31_ extends Date{}\n// sig Aug10_ extends Date{}\n// sig Dec22_ extends Date{}\n\n// abstract sig Semester {\n// duration: one Duration,\n// startdate: one Date,\n// enddate: one Date\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\n// abstract sig Language {}\n// sig English extends Language {}\n// sig Urdu extends Language {}\n// sig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n //mediumOfInstruction: one Language, \n //isReligiousStudies: one Boolean, \n //isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n //above80attendance: one Boolean,\n //eligibleToGiveExam: one Boolean,\n course: set Course,\n fullLoad: one Boolean,\n underScholarship: one Boolean\n}\n\n\n//Constraint 9\nfact ScholarshipRules {\n all s: Student | s.underScholarship = True implies s.fullLoad = True\n //does not work well with integers thats why using fullLoad enum\n //all s: Student | #s.course >= 5 and #s.course <= 6 implies s.fullLoad = True\n}\n\n// // Constraint 1 & 4\n// fact AcademicYearRules {\n// // Constraint 1 + 4: (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Every semester must belong to some academic year\n// all s: Semester | some ay: AcademicYear | s in ay.semesters\n// }\n\n// // Constraint: 2\n// fact SemesterDurations {\n// Spring.duration = SeventeenWeeks\n// Fall.duration = SeventeenWeeks\n// all s: Summer | s.duration = EightWeeks\n// // every duration must belong to a semester\n// all d: Duration | some s: Semester | d in s.duration\n// }\n\n// // Constraint: 3\n// fact SemesterDates {\n// Spring.startdate = Jan1_\n// Spring.enddate = April30_\n// Summer.startdate = June1_\n// Summer.startdate = July31_\n// Fall.startdate = Aug10_\n// //adding fall enddate would make it stop working ;-;\n// //Fall.enddate = Dec22_ \n \n// // end date must be greater than start date for each semester\n// all s: Semester | s.startdate != s.enddate\n// }\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all disj c1, c2: Course | c1.id != c2.id \n}\n\n// Constraint: 6\n// fact AttendanceRules{\n// all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n// all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n// }\n\n\n// Constraint: 7 for medium of instruction in courses\n// fact MediumOfInstructionRules {\n// all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n// all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n// all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n// all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n// all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n// all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n// all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n// all l: Language | some c: Course | l = c.mediumOfInstruction\n// }\n\n// Constraint 8\n// fact NoOfCoursesConstraint{\n// all s: Student | #s.course >= 5 and #s.course <= 6\n// }\n\nrun {} ", "permalink": "doodle-both-shale-poncho", "time": "2024-11-19 18:38:15.061438", "cmd": 1} {"id": 24428, "parent": 24425, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\n//enum Bool {True, False}\n//enum Numbers {SevenTeen, Eight, ElevenThousand}\n//enum Month {Jan, June, August}\n//enum Language {Urdu, English, Other}\nenum DegreeProgram {CS, SE, CY, DS, EE}\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { \n //semesters: some Semester \n degreesOffered: some DegreeProgram\n}\n\n// // *** Semester ***\n// abstract sig Semester {\n// duration: one Numbers,\n// startMonth: one Month,\n// isStartDateGreaterThanEndDate: one Bool,\n// courses: some Course\n// registered: some Student\n// }\n// one sig Spring, Fall extends Semester {}\n// lone sig Summer extends Semester {}\n\n// *** Course ***\n// abstract sig Course {\n// mediumOfInstruction: one Language,\n// isMandatoryForNonFastMS: one Bool,\n// preRequisite: set Course,\n// }\n// sig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\n// sig AppliedProgramming extends GeneralCourse {}\n\n// *** Student ***\nsig Student {\n rollNumber: one Int,\n degree: one DegreeProgram //This handles constraint 16\n}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\n// fact AcademicYearConstraints{\n// all ay: AcademicYear | {\n// //Number of semesters constraint\n// #ay.semesters >= 2 and #ay.semesters <=3\n\n// //Mandatory Semesters in the academic year\n// one sp: Spring | sp in ay.semesters\n// one fl: Fall | fl in ay.semesters\n\n// //Optional summer semester\n// lone su: Summer | su in ay.semesters\n// }\n// }\n\n// //If there is a thrid semester then that semester is Summers\n// assert AcademicYearSummerConstraint {\n// all ay: AcademicYear | {\n// #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n// }\n// }\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\n// fact CourseMediumOfConstructionConstraints {\n// all c: Course | {\n// (c in GeneralCourse) implies c.mediumOfInstruction = English\n// (c in ReligiousStudies) implies ((c.mediumOfInstruction = Urdu) or (c.mediumOfInstruction = English))\n// (c in LanguageCourse) implies c.mediumOfInstruction = Other\n// }\n// }\n// *** Course Constraints *** //\n\n// *** Student Constraints *** //\n//Student roll number uniqueness constraint (5 and 10)\nfact StudentRollNumConstraint {\n all s1, s2: Student | s1.rollNumber != s2.rollNumber\n}\n//For all Students, students can only apply to one degree program offered in an academic year\n// assert StudentDegreeProgramConstraint {\n// all s: Student | some ay: AcademicYear | s.degree in ay.degreesOffered\n// }\n// *** Student Constraints *** //\n\nrun {} for 3", "permalink": "doable-slam-ramble-energy", "time": "2024-11-19 18:38:21.472847", "cmd": 1} {"id": 24429, "parent": 24428, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\n//enum Bool {True, False}\n//enum Numbers {SevenTeen, Eight, ElevenThousand}\n//enum Month {Jan, June, August}\n//enum Language {Urdu, English, Other}\nenum DegreeProgram {CS, SE, CY, DS, EE}\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { \n semesters: some Semester \n degreesOffered: some DegreeProgram\n}\n\n// *** Semester ***\nabstract sig Semester {\n duration: one Numbers,\n startMonth: one Month,\n isStartDateGreaterThanEndDate: one Bool,\n courses: some Course\n registered: some Student\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\n// abstract sig Course {\n// mediumOfInstruction: one Language,\n// isMandatoryForNonFastMS: one Bool,\n// preRequisite: set Course,\n// }\n// sig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\n// sig AppliedProgramming extends GeneralCourse {}\n\n// *** Student ***\nsig Student {\n rollNumber: one Int,\n degree: one DegreeProgram //This handles constraint 16\n}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\n// fact CourseMediumOfConstructionConstraints {\n// all c: Course | {\n// (c in GeneralCourse) implies c.mediumOfInstruction = English\n// (c in ReligiousStudies) implies ((c.mediumOfInstruction = Urdu) or (c.mediumOfInstruction = English))\n// (c in LanguageCourse) implies c.mediumOfInstruction = Other\n// }\n// }\n// *** Course Constraints *** //\n\n// *** Student Constraints *** //\n//Student roll number uniqueness constraint (5 and 10)\nfact StudentRollNumConstraint {\n all s1, s2: Student | s1.rollNumber != s2.rollNumber\n}\n//For all Students, students can only apply to one degree program offered in an academic year\n// assert StudentDegreeProgramConstraint {\n// all s: Student | some ay: AcademicYear | s.degree in ay.degreesOffered\n// }\n// *** Student Constraints *** //\n\nrun {} for 5", "permalink": "cape-gallon-clique-crock", "time": "2024-11-19 18:39:35.072445", "cmd": 1} {"id": 24430, "parent": 24429, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\n//enum Bool {True, False}\n//enum Numbers {SevenTeen, Eight, ElevenThousand}\n//enum Month {Jan, June, August}\n//enum Language {Urdu, English, Other}\nenum DegreeProgram {CS, SE, CY, DS, EE}\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { \n semesters: some Semester, \n degreesOffered: some DegreeProgram\n}\n\n// *** Semester ***\nabstract sig Semester {\n duration: one Numbers,\n startMonth: one Month,\n isStartDateGreaterThanEndDate: one Bool,\n courses: some Course\n registered: some Student\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\n// abstract sig Course {\n// mediumOfInstruction: one Language,\n// isMandatoryForNonFastMS: one Bool,\n// preRequisite: set Course,\n// }\n// sig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\n// sig AppliedProgramming extends GeneralCourse {}\n\n// *** Student ***\nsig Student {\n rollNumber: one Int,\n degree: one DegreeProgram //This handles constraint 16\n}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\n// fact CourseMediumOfConstructionConstraints {\n// all c: Course | {\n// (c in GeneralCourse) implies c.mediumOfInstruction = English\n// (c in ReligiousStudies) implies ((c.mediumOfInstruction = Urdu) or (c.mediumOfInstruction = English))\n// (c in LanguageCourse) implies c.mediumOfInstruction = Other\n// }\n// }\n// *** Course Constraints *** //\n\n// *** Student Constraints *** //\n//Student roll number uniqueness constraint (5 and 10)\nfact StudentRollNumConstraint {\n all s1, s2: Student | s1.rollNumber != s2.rollNumber\n}\n//For all Students, students can only apply to one degree program offered in an academic year\n// assert StudentDegreeProgramConstraint {\n// all s: Student | some ay: AcademicYear | s.degree in ay.degreesOffered\n// }\n// *** Student Constraints *** //\n\nrun {} for 5", "permalink": "winter-sitcom-clone-size", "time": "2024-11-19 18:39:45.970837", "cmd": 1} {"id": 24431, "parent": 24430, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\n//enum Bool {True, False}\n//enum Numbers {SevenTeen, Eight, ElevenThousand}\n//enum Month {Jan, June, August}\n//enum Language {Urdu, English, Other}\nenum DegreeProgram {CS, SE, CY, DS, EE}\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { \n semesters: some Semester, \n degreesOffered: some DegreeProgram\n}\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n // courses: some Course,\n registered: some Student\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\n// abstract sig Course {\n// mediumOfInstruction: one Language,\n// isMandatoryForNonFastMS: one Bool,\n// preRequisite: set Course,\n// }\n// sig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\n// sig AppliedProgramming extends GeneralCourse {}\n\n// *** Student ***\nsig Student {\n rollNumber: one Int,\n degree: one DegreeProgram //This handles constraint 16\n}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\n// fact CourseMediumOfConstructionConstraints {\n// all c: Course | {\n// (c in GeneralCourse) implies c.mediumOfInstruction = English\n// (c in ReligiousStudies) implies ((c.mediumOfInstruction = Urdu) or (c.mediumOfInstruction = English))\n// (c in LanguageCourse) implies c.mediumOfInstruction = Other\n// }\n// }\n// *** Course Constraints *** //\n\n// *** Student Constraints *** //\n//Student roll number uniqueness constraint (5 and 10)\nfact StudentRollNumConstraint {\n all s1, s2: Student | s1.rollNumber != s2.rollNumber\n}\n//For all Students, students can only apply to one degree program offered in an academic year\n// assert StudentDegreeProgramConstraint {\n// all s: Student | some ay: AcademicYear | s.degree in ay.degreesOffered\n// }\n// *** Student Constraints *** //\n\nrun {} for 5", "permalink": "scurvy-gab-wind-shove", "time": "2024-11-19 18:40:01.671957", "cmd": 1} {"id": 24432, "parent": 24427, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n\n// // Constraint 2\n// // simulating an enum for duration\n// abstract sig Duration {}\n// sig SeventeenWeeks extends Duration {}\n// sig EightWeeks extends Duration {}\n\n// // Constraint 3\n// // simulating an enum for dates\n// abstract sig Date{}\n// sig Jan1_ extends Date{}\n// sig April30_ extends Date{}\n// sig June1_ extends Date{}\n// sig July31_ extends Date{}\n// sig Aug10_ extends Date{}\n// sig Dec22_ extends Date{}\n\n// abstract sig Semester {\n// duration: one Duration,\n// startdate: one Date,\n// enddate: one Date\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\n// abstract sig Language {}\n// sig English extends Language {}\n// sig Urdu extends Language {}\n// sig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n //mediumOfInstruction: one Language, \n //isReligiousStudies: one Boolean, \n //isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n //above80attendance: one Boolean,\n //eligibleToGiveExam: one Boolean,\n course: set Course,\n fullLoad: one Boolean,\n underScholarship: one Boolean,\n financialAid: one Boolean\n}\n\n\n//Constraint 9\nfact ScholarshipRules {\n all s: Student | s.underScholarship = True or s.financialAid implies s.fullLoad = True\n //does not work well with integers thats why using fullLoad enum\n //all s: Student | #s.course >= 5 and #s.course <= 6 implies s.fullLoad = True\n}\n\n// // Constraint 1 & 4\n// fact AcademicYearRules {\n// // Constraint 1 + 4: (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Every semester must belong to some academic year\n// all s: Semester | some ay: AcademicYear | s in ay.semesters\n// }\n\n// // Constraint: 2\n// fact SemesterDurations {\n// Spring.duration = SeventeenWeeks\n// Fall.duration = SeventeenWeeks\n// all s: Summer | s.duration = EightWeeks\n// // every duration must belong to a semester\n// all d: Duration | some s: Semester | d in s.duration\n// }\n\n// // Constraint: 3\n// fact SemesterDates {\n// Spring.startdate = Jan1_\n// Spring.enddate = April30_\n// Summer.startdate = June1_\n// Summer.startdate = July31_\n// Fall.startdate = Aug10_\n// //adding fall enddate would make it stop working ;-;\n// //Fall.enddate = Dec22_ \n \n// // end date must be greater than start date for each semester\n// all s: Semester | s.startdate != s.enddate\n// }\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all disj c1, c2: Course | c1.id != c2.id \n}\n\n// Constraint: 6\n// fact AttendanceRules{\n// all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n// all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n// }\n\n\n// Constraint: 7 for medium of instruction in courses\n// fact MediumOfInstructionRules {\n// all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n// all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n// all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n// all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n// all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n// all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n// all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n// all l: Language | some c: Course | l = c.mediumOfInstruction\n// }\n\n// Constraint 8\n// fact NoOfCoursesConstraint{\n// all s: Student | #s.course >= 5 and #s.course <= 6\n// }\n\nrun {} ", "permalink": "twitch-even-snore-valley", "time": "2024-11-19 18:40:23.633027", "cmd": 1} {"id": 24433, "parent": 24432, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n\n// // Constraint 2\n// // simulating an enum for duration\n// abstract sig Duration {}\n// sig SeventeenWeeks extends Duration {}\n// sig EightWeeks extends Duration {}\n\n// // Constraint 3\n// // simulating an enum for dates\n// abstract sig Date{}\n// sig Jan1_ extends Date{}\n// sig April30_ extends Date{}\n// sig June1_ extends Date{}\n// sig July31_ extends Date{}\n// sig Aug10_ extends Date{}\n// sig Dec22_ extends Date{}\n\n// abstract sig Semester {\n// duration: one Duration,\n// startdate: one Date,\n// enddate: one Date\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\n// abstract sig Language {}\n// sig English extends Language {}\n// sig Urdu extends Language {}\n// sig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n //mediumOfInstruction: one Language, \n //isReligiousStudies: one Boolean, \n //isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n //above80attendance: one Boolean,\n //eligibleToGiveExam: one Boolean,\n course: set Course,\n fullLoad: one Boolean,\n underScholarship: one Boolean,\n financialAid: one Boolean\n}\n\n\n//Constraint 9\nfact ScholarshipRules {\n all s: Student | s.underScholarship = True or s.financialAid = True implies s.fullLoad = True\n //does not work well with integers thats why using fullLoad enum\n //all s: Student | #s.course >= 5 and #s.course <= 6 implies s.fullLoad = True\n}\n\n// // Constraint 1 & 4\n// fact AcademicYearRules {\n// // Constraint 1 + 4: (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Every semester must belong to some academic year\n// all s: Semester | some ay: AcademicYear | s in ay.semesters\n// }\n\n// // Constraint: 2\n// fact SemesterDurations {\n// Spring.duration = SeventeenWeeks\n// Fall.duration = SeventeenWeeks\n// all s: Summer | s.duration = EightWeeks\n// // every duration must belong to a semester\n// all d: Duration | some s: Semester | d in s.duration\n// }\n\n// // Constraint: 3\n// fact SemesterDates {\n// Spring.startdate = Jan1_\n// Spring.enddate = April30_\n// Summer.startdate = June1_\n// Summer.startdate = July31_\n// Fall.startdate = Aug10_\n// //adding fall enddate would make it stop working ;-;\n// //Fall.enddate = Dec22_ \n \n// // end date must be greater than start date for each semester\n// all s: Semester | s.startdate != s.enddate\n// }\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all disj c1, c2: Course | c1.id != c2.id \n}\n\n// Constraint: 6\n// fact AttendanceRules{\n// all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n// all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n// }\n\n\n// Constraint: 7 for medium of instruction in courses\n// fact MediumOfInstructionRules {\n// all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n// all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n// all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n// all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n// all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n// all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n// all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n// all l: Language | some c: Course | l = c.mediumOfInstruction\n// }\n\n// Constraint 8\n// fact NoOfCoursesConstraint{\n// all s: Student | #s.course >= 5 and #s.course <= 6\n// }\n\nrun {} ", "permalink": "fetal-tweed-poking-iguana", "time": "2024-11-19 18:40:40.133730", "cmd": 1} {"id": 24441, "parent": 24433, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\n// sig AcademicYear {\n// semesters: set Semester\n// }\n\n// // Constraint 2\n// // simulating an enum for duration\n// abstract sig Duration {}\n// sig SeventeenWeeks extends Duration {}\n// sig EightWeeks extends Duration {}\n\n// // Constraint 3\n// // simulating an enum for dates\n// abstract sig Date{}\n// sig Jan1_ extends Date{}\n// sig April30_ extends Date{}\n// sig June1_ extends Date{}\n// sig July31_ extends Date{}\n// sig Aug10_ extends Date{}\n// sig Dec22_ extends Date{}\n\n// abstract sig Semester {\n// duration: one Duration,\n// startdate: one Date,\n// enddate: one Date\n// }\n// one sig Spring extends Semester {}\n// one sig Fall extends Semester {}\n// lone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\n// abstract sig Language {}\n// sig English extends Language {}\n// sig Urdu extends Language {}\n// sig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n //mediumOfInstruction: one Language, \n //isReligiousStudies: one Boolean, \n //isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n //above80attendance: one Boolean,\n //eligibleToGiveExam: one Boolean,\n course: set Course,\n fullLoad: one Boolean,\n underScholarship: one Boolean,\n financialAid: one Boolean\n}\n\n\n//Constraint 9\nfact ScholarshipRules {\n all s: Student | s.underScholarship = True or s.financialAid = True implies s.fullLoad = True\n //does not work well with integers thats why using fullLoad enum\n //all s: Student | #s.course >= 5 and #s.course <= 6 implies s.fullLoad = True\n}\n\n// // Constraint 1 & 4\n// fact AcademicYearRules {\n// // Constraint 1 + 4: (summer[optional] + Fall + spring)\n// all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n// // Every semester must belong to some academic year\n// all s: Semester | some ay: AcademicYear | s in ay.semesters\n// }\n\n// // Constraint: 2\n// fact SemesterDurations {\n// Spring.duration = SeventeenWeeks\n// Fall.duration = SeventeenWeeks\n// all s: Summer | s.duration = EightWeeks\n// // every duration must belong to a semester\n// all d: Duration | some s: Semester | d in s.duration\n// }\n\n// // Constraint: 3\n// fact SemesterDates {\n// Spring.startdate = Jan1_\n// Spring.enddate = April30_\n// Summer.startdate = June1_\n// Summer.startdate = July31_\n// Fall.startdate = Aug10_\n// //adding fall enddate would make it stop working ;-;\n// //Fall.enddate = Dec22_ \n \n// // end date must be greater than start date for each semester\n// all s: Semester | s.startdate != s.enddate\n// }\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all disj c1, c2: Course | c1.id != c2.id \n}\n\n// Constraint: 6\n// fact AttendanceRules{\n// all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n// all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n// }\n\n\n// Constraint: 7 for medium of instruction in courses\n// fact MediumOfInstructionRules {\n// all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n// all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n// all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n// all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n// all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n// all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n// all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n// all l: Language | some c: Course | l = c.mediumOfInstruction\n// }\n\n// Constraint 8\n// fact NoOfCoursesConstraint{\n// all s: Student | #s.course >= 5 and #s.course <= 6\n// }\n\nrun {} ", "permalink": "poker-dill-basket-waltz", "time": "2024-11-19 18:43:45.022782", "cmd": 1} {"id": 24434, "parent": 24431, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\n//enum Bool {True, False}\n//enum Numbers {SevenTeen, Eight, ElevenThousand}\n//enum Month {Jan, June, August}\n//enum Language {Urdu, English, Other}\nenum DegreeProgram {CS, SE, CY, DS, EE}\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { \n semesters: some Semester, \n}\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n // courses: some Course,\n registered: some Student\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\n// abstract sig Course {\n// mediumOfInstruction: one Language,\n// isMandatoryForNonFastMS: one Bool,\n// preRequisite: set Course,\n// }\n// sig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\n// sig AppliedProgramming extends GeneralCourse {}\n\n// *** Student ***\nsig Student {\n rollNumber: one Int,\n degree: one DegreeProgram //This handles constraint 16\n}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\n// fact CourseMediumOfConstructionConstraints {\n// all c: Course | {\n// (c in GeneralCourse) implies c.mediumOfInstruction = English\n// (c in ReligiousStudies) implies ((c.mediumOfInstruction = Urdu) or (c.mediumOfInstruction = English))\n// (c in LanguageCourse) implies c.mediumOfInstruction = Other\n// }\n// }\n// *** Course Constraints *** //\n\n// *** Student Constraints *** //\n//Student roll number uniqueness constraint (5 and 10)\nfact StudentRollNumConstraint {\n all s1, s2: Student | s1.rollNumber != s2.rollNumber\n}\n\n//For all Students, students can only apply to one degree program offered in an academic year\n// assert StudentDegreeProgramConstraint {\n// all s: Student | some ay: AcademicYear | s.degree in ay.degreesOffered\n// }\n// *** Student Constraints *** //\n\nrun {} for 5", "permalink": "giblet-error-skies-float", "time": "2024-11-19 18:40:45.701904", "cmd": 1} {"id": 24435, "parent": 24434, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\n//enum Bool {True, False}\n//enum Numbers {SevenTeen, Eight, ElevenThousand}\n//enum Month {Jan, June, August}\n//enum Language {Urdu, English, Other}\nenum DegreeProgram {CS, SE, CY, DS, EE}\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { \n semesters: some Semester, \n}\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n // courses: some Course,\n registered: some Student\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\n// abstract sig Course {\n// mediumOfInstruction: one Language,\n// isMandatoryForNonFastMS: one Bool,\n// preRequisite: set Course,\n// }\n// sig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\n// sig AppliedProgramming extends GeneralCourse {}\n\n// *** Student ***\nsig Student {\n rollNumber: one Int,\n degree: one DegreeProgram //This handles constraint 16\n}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\n// fact CourseMediumOfConstructionConstraints {\n// all c: Course | {\n// (c in GeneralCourse) implies c.mediumOfInstruction = English\n// (c in ReligiousStudies) implies ((c.mediumOfInstruction = Urdu) or (c.mediumOfInstruction = English))\n// (c in LanguageCourse) implies c.mediumOfInstruction = Other\n// }\n// }\n// *** Course Constraints *** //\n\n// *** Student Constraints *** //\n//Student roll number uniqueness constraint (5 and 10)\n// fact StudentRollNumConstraint {\n// all s1, s2: Student | s1.rollNumber != s2.rollNumber\n// }\n\n//For all Students, students can only apply to one degree program offered in an academic year\n// assert StudentDegreeProgramConstraint {\n// all s: Student | some ay: AcademicYear | s.degree in ay.degreesOffered\n// }\n// *** Student Constraints *** //\n\nrun {} for 5", "permalink": "raisin-senior-perish-manila", "time": "2024-11-19 18:40:57.637816", "cmd": 1} {"id": 24436, "parent": null, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\nsig Course {\n id: one Int, \n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n //above80attendance: one Boolean,\n //eligibleToGiveExam: one Boolean,\n course: set Course,\n fullLoad: one Boolean,\n underScholarship: one Boolean,\n financialAid: one Boolean\n}\n\n\n//Constraint 9\nfact ScholarshipRules {\n all s: Student | s.underScholarship = True or s.financialAid = True implies s.fullLoad = True\n //does not work well with integers thats why using fullLoad enum\n //all s: Student | #s.course >= 5 and #s.course <= 6 implies s.fullLoad = True\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all disj c1, c2: Course | c1.id != c2.id \n}\n\nrun {} ", "permalink": "bubble-roman-tartar-marine", "time": "2024-11-19 18:41:34.229995", "cmd": 1} {"id": 24437, "parent": 24435, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\n//enum Bool {True, False}\n//enum Numbers {SevenTeen, Eight, ElevenThousand}\n//enum Month {Jan, June, August}\n//enum Language {Urdu, English, Other}\nenum DegreeProgram {CS, SE, CY, DS, EE}\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { \n semesters: some Semester, \n}\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n // courses: some Course,\n registered: some Student\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\n// abstract sig Course {\n// mediumOfInstruction: one Language,\n// isMandatoryForNonFastMS: one Bool,\n// preRequisite: set Course,\n// }\n// sig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\n// sig AppliedProgramming extends GeneralCourse {}\n\n// *** Student ***\nsig Student {\n rollNumber: one Int,\n degree: one DegreeProgram //This handles constraint 16\n}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\n// fact CourseMediumOfConstructionConstraints {\n// all c: Course | {\n// (c in GeneralCourse) implies c.mediumOfInstruction = English\n// (c in ReligiousStudies) implies ((c.mediumOfInstruction = Urdu) or (c.mediumOfInstruction = English))\n// (c in LanguageCourse) implies c.mediumOfInstruction = Other\n// }\n// }\n// *** Course Constraints *** //\n\n// *** Student Constraints *** //\n//Student roll number uniqueness constraint (5 and 10)\nfact StudentRollNumConstraint {\n all s1, s2:Student | s1.rollNumber != s2.rollNumber\n}\n\n//For all Students, students can only apply to one degree program offered in an academic year\n// assert StudentDegreeProgramConstraint {\n// all s: Student | some ay: AcademicYear | s.degree in ay.degreesOffered\n// }\n// *** Student Constraints *** //\n\nrun {} for 5", "permalink": "axis-canopy-aged-blush", "time": "2024-11-19 18:41:46.660630", "cmd": 1} {"id": 24438, "parent": 24436, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\nsig Course {\n id: one Int, \n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n //rollNumber: one Int,\n //above80attendance: one Boolean,\n //eligibleToGiveExam: one Boolean,\n course: set Course,\n fullLoad: one Boolean,\n underScholarship: one Boolean,\n financialAid: one Boolean\n}\n\n\n//Constraint 9\nfact ScholarshipRules {\n all s: Student | s.underScholarship = True or s.financialAid = True implies s.fullLoad = True\n //does not work well with integers thats why using fullLoad enum\n //all s: Student | #s.course >= 5 and #s.course <= 6 implies s.fullLoad = True\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n //all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all disj c1, c2: Course | c1.id != c2.id \n}\n\nrun {} ", "permalink": "gloss-hankie-draw-pushy", "time": "2024-11-19 18:42:01.469964", "cmd": 1} {"id": 24439, "parent": 24438, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\nsig Course {\n id: one Int, \n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n //rollNumber: one Int,\n //above80attendance: one Boolean,\n //eligibleToGiveExam: one Boolean,\n course: set Course,\n fullLoad: one Boolean,\n underScholarship: one Boolean,\n financialAid: one Boolean\n}\n\n\n//Constraint 9\nfact ScholarshipRules {\n all s: Student | s.underScholarship = True or s.financialAid = True implies s.fullLoad = True\n all s: Student | s.financialAid = True implies s.fullLoad = True\n //does not work well with integers thats why using fullLoad enum\n //all s: Student | #s.course >= 5 and #s.course <= 6 implies s.fullLoad = True\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n //all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all disj c1, c2: Course | c1.id != c2.id \n}\n\nrun {} ", "permalink": "boxer-cavity-surfer-lucid", "time": "2024-11-19 18:42:41.014650", "cmd": 1} {"id": 24542, "parent": 24439, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\nsig Course {\n id: one Int, \n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n //rollNumber: one Int,\n //above80attendance: one Boolean,\n //eligibleToGiveExam: one Boolean,\n course: set Course,\n fullLoad: one Boolean,\n underScholarship: one Boolean,\n financialAid: one Boolean\n}\n\n\n//Constraint 9\nfact ScholarshipRules {\n all s: Student | s.underScholarship = True or s.financialAid = True implies s.fullLoad = True\n all s: Student | s.financialAid = True implies s.fullLoad = True\n //does not work well with integers thats why using fullLoad enum\n //all s: Student | #s.course >= 5 and #s.course <= 6 implies s.fullLoad = True\n}\n\nfact StudentRules {\n // Conatraint: 5 [unique roll no]\n //all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all disj c1, c2: Course | c1.id != c2.id \n}\n\nrun {} ", "permalink": "tweak-ended-retype-sierra", "time": "2024-11-20 17:33:17.684740", "cmd": 1} {"id": 24444, "parent": 24443, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\n//enum Bool {True, False}\n//enum Numbers {SevenTeen, Eight, ElevenThousand}\n//enum Month {Jan, June, August}\n//enum Language {Urdu, English, Other}\nenum DegreeProgram {CS, SE, CY, DS, EE}\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { \n semesters: some Semester, \n}\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n // courses: some Course,\n registered: some Student\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\n// abstract sig Course {\n// mediumOfInstruction: one Language,\n// isMandatoryForNonFastMS: one Bool,\n// preRequisite: set Course,\n// }\n// sig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\n// sig AppliedProgramming extends GeneralCourse {}\n\n// *** Student ***\nsig Student {\n rollNumber: one Int,\n degree: one DegreeProgram //This handles constraint 16\n}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\n// fact CourseMediumOfConstructionConstraints {\n// all c: Course | {\n// (c in GeneralCourse) implies c.mediumOfInstruction = English\n// (c in ReligiousStudies) implies ((c.mediumOfInstruction = Urdu) or (c.mediumOfInstruction = English))\n// (c in LanguageCourse) implies c.mediumOfInstruction = Other\n// }\n// }\n// *** Course Constraints *** //\n\n// *** Student Constraints *** //\n//Student roll number uniqueness constraint (5 and 10)\nfact StudentRollNumConstraint {\n all disj s1, s2:Student | s1.rollNumber != s2.rollNumber\n}\n\n//For all Students, students can only apply to one degree program offered in an academic year\n// assert StudentDegreeProgramConstraint {\n// all s: Student | some ay: AcademicYear | s.degree in ay.degreesOffered\n// }\n// *** Student Constraints *** //\n\nrun {} for 5", "permalink": "ramrod-mummy-whoops-amused", "time": "2024-11-19 18:47:06.941180", "cmd": 1} {"id": 24440, "parent": 24437, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\n//enum Bool {True, False}\n//enum Numbers {SevenTeen, Eight, ElevenThousand}\n//enum Month {Jan, June, August}\n//enum Language {Urdu, English, Other}\nenum DegreeProgram {CS, SE, CY, DS, EE}\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { \n semesters: some Semester, \n}\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n // courses: some Course,\n registered: some Student\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\n// abstract sig Course {\n// mediumOfInstruction: one Language,\n// isMandatoryForNonFastMS: one Bool,\n// preRequisite: set Course,\n// }\n// sig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\n// sig AppliedProgramming extends GeneralCourse {}\n\n// *** Student ***\nsig Student {\n rollNumber: one Int,\n degree: one DegreeProgram //This handles constraint 16\n}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\n// fact CourseMediumOfConstructionConstraints {\n// all c: Course | {\n// (c in GeneralCourse) implies c.mediumOfInstruction = English\n// (c in ReligiousStudies) implies ((c.mediumOfInstruction = Urdu) or (c.mediumOfInstruction = English))\n// (c in LanguageCourse) implies c.mediumOfInstruction = Other\n// }\n// }\n// *** Course Constraints *** //\n\n// *** Student Constraints *** //\n//Student roll number uniqueness constraint (5 and 10)\nfact StudentRollNumConstraint {\n all disj s1, s2:Student | s1.rollNumber != s2.rollNumber\n}\n\n//For all Students, students can only apply to one degree program offered in an academic year\n// assert StudentDegreeProgramConstraint {\n// all s: Student | some ay: AcademicYear | s.degree in ay.degreesOffered\n// }\n// *** Student Constraints *** //\n\nrun {} for 5", "permalink": "waggle-sled-aged-pep", "time": "2024-11-19 18:42:58.287856", "cmd": 1} {"id": 24442, "parent": 24440, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\n//enum Bool {True, False}\n//enum Numbers {SevenTeen, Eight, ElevenThousand}\n//enum Month {Jan, June, August}\n//enum Language {Urdu, English, Other}\nenum DegreeProgram {CS, SE, CY, DS, EE}\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { \n semesters: some Semester, \n}\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n // courses: some Course,\n registered: some Student\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\n// abstract sig Course {\n// mediumOfInstruction: one Language,\n// isMandatoryForNonFastMS: one Bool,\n// preRequisite: set Course,\n// }\n// sig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\n// sig AppliedProgramming extends GeneralCourse {}\n\n// *** Student ***\nsig Student {\n rollNumber: one Int,\n degree: one DegreeProgram //This handles constraint 16\n}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\n// fact CourseMediumOfConstructionConstraints {\n// all c: Course | {\n// (c in GeneralCourse) implies c.mediumOfInstruction = English\n// (c in ReligiousStudies) implies ((c.mediumOfInstruction = Urdu) or (c.mediumOfInstruction = English))\n// (c in LanguageCourse) implies c.mediumOfInstruction = Other\n// }\n// }\n// *** Course Constraints *** //\n\n// *** Student Constraints *** //\n//Student roll number uniqueness constraint (5 and 10)\nfact StudentRollNumConstraint {\n all disj s1, s2:Student | s1.rollNumber != s2.rollNumber\n}\n\n//For all Students, students can only apply to one degree program offered in an academic year\n// assert StudentDegreeProgramConstraint {\n// all s: Student | some ay: AcademicYear | s.degree in ay.degreesOffered\n// }\n// *** Student Constraints *** //\n\nrun {} for 5", "permalink": "unholy-cattle-lung-moving", "time": "2024-11-19 18:44:21.658156", "cmd": 1} {"id": 24451, "parent": 24444, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\n//enum Bool {True, False}\n//enum Numbers {SevenTeen, Eight, ElevenThousand}\n//enum Month {Jan, June, August}\n//enum Language {Urdu, English, Other}\nenum DegreeProgram {CS, SE, CY, DS, EE}\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { \n semesters: some Semester, \n}\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n // courses: some Course,\n registered: some Student\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\n// abstract sig Course {\n// mediumOfInstruction: one Language,\n// isMandatoryForNonFastMS: one Bool,\n// preRequisite: set Course,\n// }\n// sig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\n// sig AppliedProgramming extends GeneralCourse {}\n\n// *** Student ***\nsig Student {\n rollNumber: one Int,\n degree: one DegreeProgram //This handles constraint 16\n}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\n// fact CourseMediumOfConstructionConstraints {\n// all c: Course | {\n// (c in GeneralCourse) implies c.mediumOfInstruction = English\n// (c in ReligiousStudies) implies ((c.mediumOfInstruction = Urdu) or (c.mediumOfInstruction = English))\n// (c in LanguageCourse) implies c.mediumOfInstruction = Other\n// }\n// }\n// *** Course Constraints *** //\n\n// *** Student Constraints *** //\n//Student roll number uniqueness constraint (5 and 10)\nfact StudentRollNumConstraint {\n all disj s1, s2:Student | s1.rollNumber != s2.rollNumber\n}\n\n//For all Students, students can only apply to one degree program offered in an academic year\n// assert StudentDegreeProgramConstraint {\n// all s: Student | some ay: AcademicYear | s.degree in ay.degreesOffered\n// }\n// *** Student Constraints *** //\n\nrun {} for 5", "permalink": "derby-drench-shorts-switch", "time": "2024-11-20 00:48:30.523582", "cmd": 1} {"id": 24452, "parent": 24451, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\n//enum Bool {True, False}\n//enum Numbers {SevenTeen, Eight, ElevenThousand}\n//enum Month {Jan, June, August}\n//enum Language {Urdu, English, Other}\nenum DegreeProgram {CS, SE, CY, DS, EE}\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { \n semesters: some Semester, \n}\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n // courses: some Course,\n registered: some Student\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\n// abstract sig Course {\n// mediumOfInstruction: one Language,\n// isMandatoryForNonFastMS: one Bool,\n// preRequisite: set Course,\n// }\n// sig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\n// sig AppliedProgramming extends GeneralCourse {}\n\n// *** Student ***\nsig Student {\n rollNumber: one Int,\n degree: one DegreeProgram //This handles constraint 16\n}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\n// fact CourseMediumOfConstructionConstraints {\n// all c: Course | {\n// (c in GeneralCourse) implies c.mediumOfInstruction = English\n// (c in ReligiousStudies) implies ((c.mediumOfInstruction = Urdu) or (c.mediumOfInstruction = English))\n// (c in LanguageCourse) implies c.mediumOfInstruction = Other\n// }\n// }\n// *** Course Constraints *** //\n\n// *** Student Constraints *** //\n//Student roll number uniqueness constraint (5 and 10)\nfact StudentRollNumConstraint {\n all disj s1, s2:Student | s1.rollNumber != s2.rollNumber\n}\n\n//For all Students, students can only apply to one degree program offered in an academic year\nassert StudentDegreeProgramConstraint {\n all s: Student | some ay: AcademicYear | s.degree in ay.degreesOffered\n}\n// *** Student Constraints *** //\n\nrun {} for 5", "permalink": "spool-mop-safari-unfold", "time": "2024-11-20 00:48:38.863121", "cmd": 1} {"id": 24443, "parent": 24442, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\n//enum Bool {True, False}\n//enum Numbers {SevenTeen, Eight, ElevenThousand}\n//enum Month {Jan, June, August}\n//enum Language {Urdu, English, Other}\nenum DegreeProgram {CS, SE, CY, DS, EE}\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { \n semesters: some Semester, \n}\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n // courses: some Course,\n registered: some Student\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\n// abstract sig Course {\n// mediumOfInstruction: one Language,\n// isMandatoryForNonFastMS: one Bool,\n// preRequisite: set Course,\n// }\n// sig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\n// sig AppliedProgramming extends GeneralCourse {}\n\n// *** Student ***\nsig Student {\n rollNumber: one Int,\n degree: one DegreeProgram //This handles constraint 16\n}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\n// fact CourseMediumOfConstructionConstraints {\n// all c: Course | {\n// (c in GeneralCourse) implies c.mediumOfInstruction = English\n// (c in ReligiousStudies) implies ((c.mediumOfInstruction = Urdu) or (c.mediumOfInstruction = English))\n// (c in LanguageCourse) implies c.mediumOfInstruction = Other\n// }\n// }\n// *** Course Constraints *** //\n\n// *** Student Constraints *** //\n//Student roll number uniqueness constraint (5 and 10)\nfact StudentRollNumConstraint {\n all disj s1, s2:Student | s1.rollNumber != s2.rollNumber\n}\n\n//For all Students, students can only apply to one degree program offered in an academic year\nassert StudentDegreeProgramConstraint {\n all s: Student | some ay: AcademicYear | s.degree in ay.degreesOffered\n}\n// *** Student Constraints *** //\n\nrun {} for 5", "permalink": "kitty-gave-charm-primal", "time": "2024-11-19 18:47:02.530713", "cmd": 1} {"id": 24445, "parent": 24441, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\nabstract sig Language {}\nsig English extends Language {}\nsig Urdu extends Language {}\nsig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n mediumOfInstruction: one Language, \n isReligiousStudies: one Boolean, \n isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean,\n course: set Course,\n fullLoad: one Boolean,\n underScholarship: one Boolean,\n financialAid: one Boolean\n}\n\n\n//Constraint 9\nfact ScholarshipRules {\n all s: Student | s.underScholarship = True or s.financialAid = True implies s.fullLoad = True\n //does not work well with integers thats why using fullLoad enum\n //all s: Student | #s.course >= 5 and #s.course <= 6 implies s.fullLoad = True\n}\n\n// Constraint 1 & 4\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nfact StudentRules {\n // Conatraint: 5 & 10 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all disj c1, c2: Course | c1.id != c2.id \n}\n\n// Constraint: 6\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\n\n// Constraint: 7 for medium of instruction in courses\nfact MediumOfInstructionRules {\n all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n all l: Language | some c: Course | l = c.mediumOfInstruction\n}\n\n//Constraint 8\nfact NoOfCoursesConstraint{\n all s: Student | #s.course >= 5 and #s.course <= 6\n}\n\nrun {} ", "permalink": "rocky-bust-spool-avert", "time": "2024-11-19 18:51:48.886560", "cmd": 1} {"id": 24446, "parent": null, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\nabstract sig Language {}\nsig English extends Language {}\nsig Urdu extends Language {}\nsig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n mediumOfInstruction: one Language, \n isReligiousStudies: one Boolean, \n isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean,\n course: set Course,\n fullLoad: one Boolean,\n underScholarship: one Boolean,\n financialAid: one Boolean\n}\n\n// Constraint 1 & 4\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nfact StudentRules {\n // Conatraint: 5 & 10 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all disj c1, c2: Course | c1.id != c2.id \n}\n\n// Constraint: 6\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\n\n// Constraint: 7 for medium of instruction in courses\nfact MediumOfInstructionRules {\n all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n all l: Language | some c: Course | l = c.mediumOfInstruction\n}\n\n//Constraint 8\nfact NoOfCoursesConstraint{\n all s: Student | #s.course >= 5 and #s.course <= 6\n}\n\n//Constraint 9\nfact ScholarshipRules {\n all s: Student | s.underScholarship = True or s.financialAid = True implies s.fullLoad = True\n //does not work well with integers thats why using fullLoad enum\n //all s: Student | #s.course >= 5 and #s.course <= 6 implies s.fullLoad = True\n}\n\nrun {} ", "permalink": "poison-cargo-cycle-remark", "time": "2024-11-19 18:53:59.686614", "cmd": 1} {"id": 24556, "parent": 24445, "code": "// Name: Syeda Fatima Kazmi\n// Roll No: anonymized\n// Section: SE - Q\n// Formal Methods - Assignment 4\n\nsig AcademicYear {\n semesters: set Semester\n}\n\n// Constraint 2\n// simulating an enum for duration\nabstract sig Duration {}\nsig SeventeenWeeks extends Duration {}\nsig EightWeeks extends Duration {}\n\n// Constraint 3\n// simulating an enum for dates\nabstract sig Date{}\nsig Jan1_ extends Date{}\nsig April30_ extends Date{}\nsig June1_ extends Date{}\nsig July31_ extends Date{}\nsig Aug10_ extends Date{}\nsig Dec22_ extends Date{}\n\nabstract sig Semester {\n duration: one Duration,\n startdate: one Date,\n enddate: one Date\n}\none sig Spring extends Semester {}\none sig Fall extends Semester {}\nlone sig Summer extends Semester {} \n\nabstract sig Boolean {}\nsig True extends Boolean {}\nsig False extends Boolean {}\n\n// simulating enum for languages\nabstract sig Language {}\nsig English extends Language {}\nsig Urdu extends Language {}\nsig OtherLanguage extends Language {}\n\nsig Course {\n id: one Int, \n mediumOfInstruction: one Language, \n isReligiousStudies: one Boolean, \n isLanguageCourse: one Boolean // to check if the course is a language course besides english\n}\n\nsig Student {\n //making rollnumber int because alloy cannot handle strings\n rollNumber: one Int,\n above80attendance: one Boolean,\n eligibleToGiveExam: one Boolean,\n course: set Course,\n fullLoad: one Boolean,\n underScholarship: one Boolean,\n financialAid: one Boolean\n}\n\n// Constraint 1 & 4\nfact AcademicYearRules {\n // Constraint 1 + 4: (summer[optional] + Fall + spring)\n all ay: AcademicYear | #ay.semesters >= 2 and #ay.semesters <= 3 \n // Every semester must belong to some academic year\n all s: Semester | some ay: AcademicYear | s in ay.semesters\n}\n\n// Constraint: 2\nfact SemesterDurations {\n Spring.duration = SeventeenWeeks\n Fall.duration = SeventeenWeeks\n all s: Summer | s.duration = EightWeeks\n // every duration must belong to a semester\n all d: Duration | some s: Semester | d in s.duration\n}\n\n// Constraint: 3\nfact SemesterDates {\n Spring.startdate = Jan1_\n Spring.enddate = April30_\n Summer.startdate = June1_\n Summer.startdate = July31_\n Fall.startdate = Aug10_\n //adding fall enddate would make it stop working ;-;\n //Fall.enddate = Dec22_ \n \n // end date must be greater than start date for each semester\n all s: Semester | s.startdate != s.enddate\n}\n\nfact StudentRules {\n // Conatraint: 5 & 10 [unique roll no]\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber \n all disj c1, c2: Course | c1.id != c2.id \n}\n\n// Constraint: 6\nfact AttendanceRules{\n all s: Student | s.above80attendance = True implies s.eligibleToGiveExam = True\n all s: Student | s.above80attendance = False implies s.eligibleToGiveExam = False\n}\n\n\n// Constraint: 7 for medium of instruction in courses\nfact MediumOfInstructionRules {\n all c: Course | c.mediumOfInstruction = Urdu implies c.isReligiousStudies = True and c.isLanguageCourse = False\n all c: Course | c.mediumOfInstruction = OtherLanguage implies c.isLanguageCourse = True and c.isReligiousStudies = False\n all c: Course | c.mediumOfInstruction = English implies c.isLanguageCourse = False\n\n all c: Course | c.isReligiousStudies = True implies c.isLanguageCourse = False and c.mediumOfInstruction != OtherLanguage\n all c: Course | c.isReligiousStudies = False implies c.mediumOfInstruction != Urdu\n all c: Course | c.isLanguageCourse = True implies c.isReligiousStudies = False and c.mediumOfInstruction = OtherLanguage\n all c: Course | c.isLanguageCourse = False implies c.mediumOfInstruction != OtherLanguage\n\n all l: Language | some c: Course | l = c.mediumOfInstruction\n}\n\n//Constraint 8\nfact NoOfCoursesConstraint{\n all s: Student | #s.course >= 5 and #s.course <= 6\n}\n\n//Constraint 9\nfact ScholarshipRules {\n all s: Student | s.underScholarship = True or s.financialAid = True implies s.fullLoad = True\n //does not work well with integers thats why using fullLoad enum\n //all s: Student | #s.course >= 5 and #s.course <= 6 implies s.fullLoad = True\n}\n\nrun {} ", "permalink": "dining-porous-strut-marlin", "time": "2024-11-20 17:42:50.272485", "cmd": 1} {"id": 24449, "parent": 24448, "code": "// Signatures\nsig AcademicYear {\n semesters: set Semester\n}\n\nabstract sig Semester {\n name: one String,\n duration: one Int,\n startDate: one Int,\n endDate: one Int\n}\n\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\nsig Student {\n rollNumber: one Int,\n attendance: one Int,\n scholarships: set Scholarship,\n courses: set Course,\n isInWarning: one Bool,\n semestersFreezed: set Semester\n}\n\nsig Scholarship {\n type: one String\n}\n\nsig Course {\n name: one String,\n creditHours: one Int,\n preRequisite: lone Course,\n isRepeat: one Bool\n}\n\nsig Grade {\n value: one String\n}\n\n// Facts\nfact AcademicYearConstraints {\n all y: AcademicYear | \n #y.semesters >= 2 && #y.semesters <= 3\n}\n\nfact SemesterConstraints {\n all s: Semester |\n (s.name = \"Spring\" || s.name = \"Fall\") => s.duration = 17 &&\n (s.name = \"Summer\") => s.duration = 8 &&\n s.startDate < s.endDate\n}\n\nfact UniqueRollNumbers {\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber\n}\n\nfact AttendanceRules {\n all s: Student | s.attendance >= 80\n}\n\nfact CourseConstraints {\n all c: Course | \n all s: Student | c in s.courses =>\n (c.preRequisite in s.courses) &&\n (s.courses.creditHours >= 15 && s.courses.creditHours <= 18)\n}\n\nfact FreezingRules {\n all s: Student | #s.semestersFreezed <= 2\n}\n\nfact ScholarshipRules {\n all s: Student |\n s.scholarships.type = \"FAST\" =>\n s.isInWarning => no s.scholarships\n}\n\nfact SummerSemesterRules {\n all sem: Semester |\n sem.name = \"Summer\" =>\n (all c: Course | c.isRepeat) &&\n (#sem.courses <= 2) &&\n (#sem.students >= 10)\n}\n\nfact CreditExemptionRules {\n all g: Grade |\n g.value in [\"C\", \"B-\"] =>\n some Course\n}\n\n// Assertions\nassert ValidateSemesterDates {\n all s: Semester | s.startDate < s.endDate\n}\n\nassert ValidateAttendance {\n all s: Student | s.attendance >= 80\n}\n\nassert ValidateScholarships {\n all s: Student |\n s.scholarships.type = \"FAST\" =>\n s.isInWarning => no s.scholarships\n}\n\n// Run Commands\nrun {\n some y: AcademicYear |\n #y.semesters >= 2 && #y.semesters <= 3\n} for 1 AcademicYear, 3 Semester\n\nrun {\n all s: Semester |\n (s.name = \"Spring\" || s.name = \"Fall\") => s.duration = 17 &&\n (s.name = \"Summer\") => s.duration = 8 &&\n s.startDate < s.endDate\n} for 3 Semester\n\nrun {\n all disj s1, s2: Student | s1.rollNumber != s2.rollNumber\n} for 5 Student\n\nrun {\n all s: Student | s.attendance >= 80\n} for 5 Student\n\nrun {\n all c: Course |\n all s: Student | c in s.courses =>\n (c.preRequisite in s.courses) &&\n (s.courses.creditHours >= 15 && s.courses.creditHours <= 18)\n} for 5 Student, 10 Course\n\nrun {\n all s: Student | #s.semestersFreezed <= 2\n} for 5 Student, 3 Semester\n\nrun {\n all s: Student |\n s.scholarships.type = \"FAST\" =>\n s.isInWarning => no s.scholarships\n} for 5 Student, 3 Scholarship\n\nrun {\n all sem: Semester |\n sem.name = \"Summer\" =>\n (all c: Course | c.isRepeat) &&\n (#sem.courses <= 2) &&\n (#sem.students >= 10)\n} for 1 Semester, 10 Student, 5 Course\n\nrun {\n all g: Grade |\n g.value in [\"C\", \"B-\"] =>\n some Course\n} for 10 Grade, 10 Course", "permalink": "nature-remark-tweet-defuse", "time": "2024-11-19 19:28:31.712894", "cmd": 1} {"id": 24453, "parent": 24452, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\n//enum Bool {True, False}\n//enum Numbers {SevenTeen, Eight, ElevenThousand}\n//enum Month {Jan, June, August}\n//enum Language {Urdu, English, Other}\nenum DegreeProgram {CS, SE, CY, DS, EE}\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { \n semesters: some Semester, \n degreesOffered: some DegreeProgram\n}\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n // courses: some Course,\n registered: some Student\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\n// abstract sig Course {\n// mediumOfInstruction: one Language,\n// isMandatoryForNonFastMS: one Bool,\n// preRequisite: set Course,\n// }\n// sig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\n// sig AppliedProgramming extends GeneralCourse {}\n\n// *** Student ***\nsig Student {\n rollNumber: one Int,\n degree: one DegreeProgram //This handles constraint 16\n}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n #ay.semesters = 3 implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\n// fact CourseMediumOfConstructionConstraints {\n// all c: Course | {\n// (c in GeneralCourse) implies c.mediumOfInstruction = English\n// (c in ReligiousStudies) implies ((c.mediumOfInstruction = Urdu) or (c.mediumOfInstruction = English))\n// (c in LanguageCourse) implies c.mediumOfInstruction = Other\n// }\n// }\n// *** Course Constraints *** //\n\n// *** Student Constraints *** //\n//Student roll number uniqueness constraint (5 and 10)\nfact StudentRollNumConstraint {\n all disj s1, s2:Student | s1.rollNumber != s2.rollNumber\n}\n\n//For all Students, students can only apply to one degree program offered in an academic year\nassert StudentDegreeProgramConstraint {\n all s: Student | some ay: AcademicYear | s.degree in ay.degreesOffered\n}\n// *** Student Constraints *** //\n\nrun {} for 5", "permalink": "chair-smile-civic-jigsaw", "time": "2024-11-20 00:49:03.178853", "cmd": 1} {"id": 24454, "parent": 24453, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\n//enum Bool {True, False}\n//enum Numbers {SevenTeen, Eight, ElevenThousand}\n//enum Month {Jan, June, August}\n//enum Language {Urdu, English, Other}\nenum DegreeProgram {CS, SE, CY, DS, EE}\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { \n semesters: some Semester, \n degreesOffered: some DegreeProgram\n}\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n // courses: some Course,\n registered: some Student\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\n// abstract sig Course {\n// mediumOfInstruction: one Language,\n// isMandatoryForNonFastMS: one Bool,\n// preRequisite: set Course,\n// }\n// sig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\n// sig AppliedProgramming extends GeneralCourse {}\n\n// *** Student ***\nsig Student {\n rollNumber: one Int,\n degree: one DegreeProgram //This handles constraint 16\n}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n (#ay.semesters = 3) implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\n// fact CourseMediumOfConstructionConstraints {\n// all c: Course | {\n// (c in GeneralCourse) implies c.mediumOfInstruction = English\n// (c in ReligiousStudies) implies ((c.mediumOfInstruction = Urdu) or (c.mediumOfInstruction = English))\n// (c in LanguageCourse) implies c.mediumOfInstruction = Other\n// }\n// }\n// *** Course Constraints *** //\n\n// *** Student Constraints *** //\n//Student roll number uniqueness constraint (5 10, 16)\nfact StudentRollNumConstraint {\n all disj s1, s2:Student | s1.rollNumber != s2.rollNumber\n}\n\n//For all Students, students can only apply to one degree program offered in an academic year\nassert StudentDegreeProgramConstraint {\n all s: Student | some ay: AcademicYear | s.degree in ay.degreesOffered\n}\n// *** Student Constraints *** //\n\nrun {} for 5", "permalink": "tiring-attach-daisy-posing", "time": "2024-11-20 00:55:03.276066", "cmd": 1} {"id": 24455, "parent": 24454, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\nenum Bool {True, False}\n//enum Numbers {SevenTeen, Eight, ElevenThousand}\n//enum Month {Jan, June, August}\n//enum Language {Urdu, English, Other}\nenum DegreeProgram {CS, SE, CY, DS, EE}\nenum FinancialAidType { ICT, HEC, FAST, Other}\nenum AidStatus { Active, Canceled }\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { \n semesters: some Semester, \n degreesOffered: some DegreeProgram\n}\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n // courses: some Course,\n registered: some Student\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\nsig Course {\n mediumOfInstruction: one Language,\n isMandatoryForNonFastMS: one Bool,\n preRequisite: set Course,\n}\nsig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\nsig AppliedProgramming extends GeneralCourse {}\n\n// *** Student ***\nsig Student {\n rollNumber: one Int,\n degree: one DegreeProgram \n isFastian: one Bool\n}\n\n// *** Financial Aid ***\nsig FinancialAid {\n type: one FinancialAidType\n status: one AidStatus\n}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n (#ay.semesters = 3) implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\n// fact CourseMediumOfConstructionConstraints {\n// all c: Course | {\n// (c in GeneralCourse) implies c.mediumOfInstruction = English\n// (c in ReligiousStudies) implies ((c.mediumOfInstruction = Urdu) or (c.mediumOfInstruction = English))\n// (c in LanguageCourse) implies c.mediumOfInstruction = Other\n// }\n// }\n// *** Course Constraints *** //\n\n// *** Student Constraints *** //\n//Student roll number uniqueness constraint (5 10, 16)\nfact StudentRollNumConstraint {\n all disj s1, s2:Student | s1.rollNumber != s2.rollNumber\n}\n\n//For all Students, students can only apply to one degree program offered in an academic year\nassert StudentDegreeProgramConstraint {\n all s: Student | some ay: AcademicYear | s.degree in ay.degreesOffered\n}\n// *** Student Constraints *** //\n\nrun {} for 5", "permalink": "siding-nature-sauna-entrap", "time": "2024-11-20 01:06:44.501482", "cmd": 1} {"id": 24456, "parent": 24455, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\nenum Bool {True, False}\n//enum Numbers {SevenTeen, Eight, ElevenThousand}\n//enum Month {Jan, June, August}\n//enum Language {Urdu, English, Other}\nenum DegreeProgram {CS, SE, CY, DS, EE}\nenum FinancialAidType { ICT, HEC, FAST, Other}\nenum AidStatus { Active, Canceled }\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { \n semesters: some Semester, \n degreesOffered: some DegreeProgram\n}\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n // courses: some Course,\n registered: some Student\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\nsig Course {\n mediumOfInstruction: one Language,\n isMandatoryForNonFastMS: one Bool,\n preRequisite: set Course,\n}\nsig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\nsig AppliedProgramming extends GeneralCourse {}\n\n// *** Student ***\nsig Student {\n rollNumber: one Int,\n degree: one DegreeProgram, \n isFastian: one Bool\n}\n\n// *** Financial Aid ***\nsig FinancialAid {\n type: one FinancialAidType\n status: one AidStatus\n}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n (#ay.semesters = 3) implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\n// fact CourseMediumOfConstructionConstraints {\n// all c: Course | {\n// (c in GeneralCourse) implies c.mediumOfInstruction = English\n// (c in ReligiousStudies) implies ((c.mediumOfInstruction = Urdu) or (c.mediumOfInstruction = English))\n// (c in LanguageCourse) implies c.mediumOfInstruction = Other\n// }\n// }\n// *** Course Constraints *** //\n\n// *** Student Constraints *** //\n//Student roll number uniqueness constraint (5 10, 16)\nfact StudentRollNumConstraint {\n all disj s1, s2:Student | s1.rollNumber != s2.rollNumber\n}\n\n//For all Students, students can only apply to one degree program offered in an academic year\nassert StudentDegreeProgramConstraint {\n all s: Student | some ay: AcademicYear | s.degree in ay.degreesOffered\n}\n// *** Student Constraints *** //\n\nrun {} for 5", "permalink": "slaw-throng-primp-quilt", "time": "2024-11-20 01:06:51.297413", "cmd": 1} {"id": 24457, "parent": 24456, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\nenum Bool {True, False}\n//enum Numbers {SevenTeen, Eight, ElevenThousand}\n//enum Month {Jan, June, August}\n//enum Language {Urdu, English, Other}\nenum DegreeProgram {CS, SE, CY, DS, EE}\nenum FinancialAidType { ICT, HEC, FAST, Other}\nenum AidStatus { Active, Canceled }\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { \n semesters: some Semester, \n degreesOffered: some DegreeProgram\n}\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n // courses: some Course,\n registered: some Student\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\nsig Course {\n mediumOfInstruction: one Language,\n isMandatoryForNonFastMS: one Bool,\n preRequisite: set Course,\n}\nsig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\nsig AppliedProgramming extends GeneralCourse {}\n\n// *** Student ***\nsig Student {\n rollNumber: one Int,\n degree: one DegreeProgram, \n isFastian: one Bool\n}\n\n// *** Financial Aid ***\nsig FinancialAid {\n type: one FinancialAidType,\n status: one AidStatus\n}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n (#ay.semesters = 3) implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\n// fact CourseMediumOfConstructionConstraints {\n// all c: Course | {\n// (c in GeneralCourse) implies c.mediumOfInstruction = English\n// (c in ReligiousStudies) implies ((c.mediumOfInstruction = Urdu) or (c.mediumOfInstruction = English))\n// (c in LanguageCourse) implies c.mediumOfInstruction = Other\n// }\n// }\n// *** Course Constraints *** //\n\n// *** Student Constraints *** //\n//Student roll number uniqueness constraint (5 10, 16)\nfact StudentRollNumConstraint {\n all disj s1, s2:Student | s1.rollNumber != s2.rollNumber\n}\n\n//For all Students, students can only apply to one degree program offered in an academic year\nassert StudentDegreeProgramConstraint {\n all s: Student | some ay: AcademicYear | s.degree in ay.degreesOffered\n}\n// *** Student Constraints *** //\n\nrun {} for 5", "permalink": "lucid-anemia-knoll-savage", "time": "2024-11-20 01:06:59.087125", "cmd": 1} {"id": 24458, "parent": 24457, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\nenum Bool {True, False}\n//enum Numbers {SevenTeen, Eight, ElevenThousand}\n//enum Month {Jan, June, August}\nenum Language {Urdu, English, Other}\nenum DegreeProgram {CS, SE, CY, DS, EE}\nenum FinancialAidType { ICT, HEC, FAST, Other}\nenum AidStatus { Active, Canceled }\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { \n semesters: some Semester, \n degreesOffered: some DegreeProgram\n}\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n // courses: some Course,\n registered: some Student\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\nsig Course {\n mediumOfInstruction: one Language,\n isMandatoryForNonFastMS: one Bool,\n preRequisite: set Course,\n}\nsig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\nsig AppliedProgramming extends GeneralCourse {}\n\n// *** Student ***\nsig Student {\n rollNumber: one Int,\n degree: one DegreeProgram, \n isFastian: one Bool\n}\n\n// *** Financial Aid ***\nsig FinancialAid {\n type: one FinancialAidType,\n status: one AidStatus\n}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n (#ay.semesters = 3) implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\n// fact CourseMediumOfConstructionConstraints {\n// all c: Course | {\n// (c in GeneralCourse) implies c.mediumOfInstruction = English\n// (c in ReligiousStudies) implies ((c.mediumOfInstruction = Urdu) or (c.mediumOfInstruction = English))\n// (c in LanguageCourse) implies c.mediumOfInstruction = Other\n// }\n// }\n// *** Course Constraints *** //\n\n// *** Student Constraints *** //\n//Student roll number uniqueness constraint (5 10, 16)\nfact StudentRollNumConstraint {\n all disj s1, s2:Student | s1.rollNumber != s2.rollNumber\n}\n\n//For all Students, students can only apply to one degree program offered in an academic year\nassert StudentDegreeProgramConstraint {\n all s: Student | some ay: AcademicYear | s.degree in ay.degreesOffered\n}\n// *** Student Constraints *** //\n\nrun {} for 5", "permalink": "silver-aids-shield-fetch", "time": "2024-11-20 01:07:14.567883", "cmd": 1} {"id": 24459, "parent": 24458, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\nenum Bool {True, False}\n//enum Numbers {SevenTeen, Eight, ElevenThousand}\n//enum Month {Jan, June, August}\nenum Language {Urdu, English, Other}\nenum DegreeProgram {CS, SE, CY, DS, EE}\nenum FinancialAidType { ICT, HEC, FAST, AnyOther}\nenum AidStatus { Active, Canceled }\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { \n semesters: some Semester, \n degreesOffered: some DegreeProgram\n}\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n // courses: some Course,\n registered: some Student\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\nsig Course {\n mediumOfInstruction: one Language,\n isMandatoryForNonFastMS: one Bool,\n preRequisite: set Course,\n}\nsig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\nsig AppliedProgramming extends GeneralCourse {}\n\n// *** Student ***\nsig Student {\n rollNumber: one Int,\n degree: one DegreeProgram, \n isFastian: one Bool\n}\n\n// *** Financial Aid ***\nsig FinancialAid {\n type: one FinancialAidType,\n status: one AidStatus\n}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n (#ay.semesters = 3) implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\n// fact CourseMediumOfConstructionConstraints {\n// all c: Course | {\n// (c in GeneralCourse) implies c.mediumOfInstruction = English\n// (c in ReligiousStudies) implies ((c.mediumOfInstruction = Urdu) or (c.mediumOfInstruction = English))\n// (c in LanguageCourse) implies c.mediumOfInstruction = Other\n// }\n// }\n// *** Course Constraints *** //\n\n// *** Student Constraints *** //\n//Student roll number uniqueness constraint (5 10, 16)\nfact StudentRollNumConstraint {\n all disj s1, s2:Student | s1.rollNumber != s2.rollNumber\n}\n\n//For all Students, students can only apply to one degree program offered in an academic year\nassert StudentDegreeProgramConstraint {\n all s: Student | some ay: AcademicYear | s.degree in ay.degreesOffered\n}\n// *** Student Constraints *** //\n\nrun {} for 5", "permalink": "volley-strive-gender-pep", "time": "2024-11-20 01:07:26.135124", "cmd": 1} {"id": 24460, "parent": 24459, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\nenum Bool {True, False}\n//enum Numbers {SevenTeen, Eight, ElevenThousand}\n//enum Month {Jan, June, August}\n//enum Language {Urdu, English, Other}\nenum DegreeProgram {CS, SE, CY, DS, EE}\nenum FinancialAidType { ICT, HEC, FAST, AnyOther}\nenum AidStatus { Active, Canceled }\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { \n semesters: some Semester, \n degreesOffered: some DegreeProgram\n}\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n // courses: some Course,\n registered: some Student\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\n// sig Course {\n// //mediumOfInstruction: one Language,\n// isMandatoryForNonFastMS: one Bool,\n// preRequisite: set Course,\n// }\n// sig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\n// sig AppliedProgramming extends GeneralCourse {}\n\n// *** Student ***\nsig Student {\n rollNumber: one Int,\n degree: one DegreeProgram, \n isFastian: one Bool,\n registered: some Course,\n financialAid: lone FinancialAid,\n gotAcademicWarning: one Bool,\n isFeePaid: one Bool,\n areDuesCleared: one Bool\n\n}\n\n// *** Financial Aid ***\nsig FinancialAid {\n type: one FinancialAidType,\n status: one AidStatus\n}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n (#ay.semesters = 3) implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\n// fact CourseMediumOfConstructionConstraints {\n// all c: Course | {\n// (c in GeneralCourse) implies c.mediumOfInstruction = English\n// (c in ReligiousStudies) implies ((c.mediumOfInstruction = Urdu) or (c.mediumOfInstruction = English))\n// (c in LanguageCourse) implies c.mediumOfInstruction = Other\n// }\n// }\n// *** Course Constraints *** //\n\n// *** Student Constraints *** //\n//Student roll number uniqueness constraint (5 10, 16)\nfact StudentRollNumConstraint {\n all disj s1, s2:Student | s1.rollNumber != s2.rollNumber\n}\n\n//For all Students, students can only apply to one degree program offered in an academic year\nassert StudentDegreeProgramConstraint {\n all s: Student | some ay: AcademicYear | s.degree in ay.degreesOffered\n}\n// *** Student Constraints *** //\n\nrun {} for 5", "permalink": "knoll-rocket-awning-dose", "time": "2024-11-20 01:10:58.444969", "cmd": 1} {"id": 24461, "parent": 24460, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\nenum Bool {True, False}\n//enum Numbers {SevenTeen, Eight, ElevenThousand}\n//enum Month {Jan, June, August}\n//enum Language {Urdu, English, Other}\nenum DegreeProgram {CS, SE, CY, DS, EE}\nenum FinancialAidType { ICT, HEC, FAST, AnyOther}\nenum AidStatus { Active, Canceled }\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { \n semesters: some Semester, \n degreesOffered: some DegreeProgram\n}\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n // courses: some Course,\n registered: some Student\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\n// sig Course {\n// //mediumOfInstruction: one Language,\n// isMandatoryForNonFastMS: one Bool,\n// preRequisite: set Course,\n// }\n// sig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\n// sig AppliedProgramming extends GeneralCourse {}\n\n// *** Student ***\nsig Student {\n rollNumber: one Int,\n degree: one DegreeProgram, \n isFastian: one Bool,\n //registered: some Course,\n financialAid: lone FinancialAid,\n gotAcademicWarning: one Bool,\n isFeePaid: one Bool,\n areDuesCleared: one Bool\n\n}\n\n// *** Financial Aid ***\nsig FinancialAid {\n type: one FinancialAidType,\n status: one AidStatus\n}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n (#ay.semesters = 3) implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\n// fact CourseMediumOfConstructionConstraints {\n// all c: Course | {\n// (c in GeneralCourse) implies c.mediumOfInstruction = English\n// (c in ReligiousStudies) implies ((c.mediumOfInstruction = Urdu) or (c.mediumOfInstruction = English))\n// (c in LanguageCourse) implies c.mediumOfInstruction = Other\n// }\n// }\n// *** Course Constraints *** //\n\n// *** Student Constraints *** //\n//Student roll number uniqueness constraint (5 10, 16)\nfact StudentRollNumConstraint {\n all disj s1, s2:Student | s1.rollNumber != s2.rollNumber\n}\n\n//For all Students, students can only apply to one degree program offered in an academic year\nassert StudentDegreeProgramConstraint {\n all s: Student | some ay: AcademicYear | s.degree in ay.degreesOffered\n}\n// *** Student Constraints *** //\n\nrun {} for 5", "permalink": "jimmy-expose-brook-heave", "time": "2024-11-20 01:11:05.670045", "cmd": 1} {"id": 24462, "parent": 24461, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\nenum Bool {True, False}\n//enum Numbers {SevenTeen, Eight, ElevenThousand}\n//enum Month {Jan, June, August}\n//enum Language {Urdu, English, Other}\nenum DegreeProgram {CS, SE, CY, DS, EE}\nenum FinancialAidType { ICT, HEC, FAST, AnyOther}\nenum AidStatus { Active, Canceled }\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { \n semesters: some Semester, \n degreesOffered: some DegreeProgram\n}\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n // courses: some Course,\n registered: some Student\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\n// sig Course {\n// //mediumOfInstruction: one Language,\n// isMandatoryForNonFastMS: one Bool,\n// preRequisite: set Course,\n// }\n// sig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\n// sig AppliedProgramming extends GeneralCourse {}\n\n// *** Student ***\nsig Student {\n rollNumber: one Int,\n degree: one DegreeProgram, \n isFastian: one Bool,\n registered: some Course,\n financialAid: lone FinancialAid,\n gotAcademicWarning: one Bool,\n isFeePaid: one Bool,\n areDuesCleared: one Bool\n}\n\n// *** Financial Aid ***\nsig FinancialAid {\n type: one FinancialAidType,\n status: one AidStatus\n}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n (#ay.semesters = 3) implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\n// fact CourseMediumOfConstructionConstraints {\n// all c: Course | {\n// (c in GeneralCourse) implies c.mediumOfInstruction = English\n// (c in ReligiousStudies) implies ((c.mediumOfInstruction = Urdu) or (c.mediumOfInstruction = English))\n// (c in LanguageCourse) implies c.mediumOfInstruction = Other\n// }\n// }\n// *** Course Constraints *** //\n\n// *** Student Constraints *** //\n//Student roll number uniqueness constraint (5 10, 16)\nfact StudentRollNumConstraint {\n all disj s1, s2:Student | s1.rollNumber != s2.rollNumber\n}\n\n//For all Students, students can only apply to one degree program offered in an academic year\nassert StudentDegreeProgramConstraint {\n all s: Student | some ay: AcademicYear | s.degree in ay.degreesOffered\n}\n// *** Student Constraints *** //\n\n// *** Financial Constraints (9 and 11) *** //\nfact FinancialAidConstraints {\n all st: Student | {\n //Taking Full Load on Financial Aid\n (this.financialAid.status = Active) implies #this.registered >= 5\n }\n\n}\n\n\n// *** Financial Constraints *** //\n\n\nrun {} for 8", "permalink": "doily-serve-dig-recall", "time": "2024-11-20 01:16:32.282726", "cmd": 1} {"id": 24463, "parent": 24462, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\nenum Bool {True, False}\n//enum Numbers {SevenTeen, Eight, ElevenThousand}\n//enum Month {Jan, June, August}\n//enum Language {Urdu, English, Other}\nenum DegreeProgram {CS, SE, CY, DS, EE}\nenum FinancialAidType { ICT, HEC, FAST, AnyOther}\nenum AidStatus { Active, Canceled }\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { \n semesters: some Semester, \n degreesOffered: some DegreeProgram\n}\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n // courses: some Course,\n registered: some Student\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\nsig Course {\n //mediumOfInstruction: one Language,\n //isMandatoryForNonFastMS: one Bool,\n //preRequisite: set Course,\n}\nsig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\nsig AppliedProgramming extends GeneralCourse {}\n\n// *** Student ***\nsig Student {\n rollNumber: one Int,\n degree: one DegreeProgram, \n isFastian: one Bool,\n registered: some Course,\n financialAid: lone FinancialAid,\n gotAcademicWarning: one Bool,\n isFeePaid: one Bool,\n areDuesCleared: one Bool\n}\n\n// *** Financial Aid ***\nsig FinancialAid {\n type: one FinancialAidType,\n status: one AidStatus\n}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n (#ay.semesters = 3) implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\n// fact CourseMediumOfConstructionConstraints {\n// all c: Course | {\n// (c in GeneralCourse) implies c.mediumOfInstruction = English\n// (c in ReligiousStudies) implies ((c.mediumOfInstruction = Urdu) or (c.mediumOfInstruction = English))\n// (c in LanguageCourse) implies c.mediumOfInstruction = Other\n// }\n// }\n// *** Course Constraints *** //\n\n// *** Student Constraints *** //\n//Student roll number uniqueness constraint (5 10, 16)\nfact StudentRollNumConstraint {\n all disj s1, s2:Student | s1.rollNumber != s2.rollNumber\n}\n\n//For all Students, students can only apply to one degree program offered in an academic year\nassert StudentDegreeProgramConstraint {\n all s: Student | some ay: AcademicYear | s.degree in ay.degreesOffered\n}\n// *** Student Constraints *** //\n\n// *** Financial Constraints (9 and 11) *** //\nfact FinancialAidConstraints {\n all st: Student | {\n //Taking Full Load on Financial Aid\n (this.financialAid.status = Active) implies #this.registered >= 5\n }\n\n}\n\n\n// *** Financial Constraints *** //\n\n\nrun {} for 8", "permalink": "rug-state-grove-roping", "time": "2024-11-20 01:16:55.008667", "cmd": 1} {"id": 24464, "parent": 24463, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\nenum Bool {True, False}\n//enum Numbers {SevenTeen, Eight, ElevenThousand}\n//enum Month {Jan, June, August}\n//enum Language {Urdu, English, Other}\nenum DegreeProgram {CS, SE, CY, DS, EE}\nenum FinancialAidType { ICT, HEC, FAST, AnyOther}\nenum AidStatus { Active, Canceled }\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { \n semesters: some Semester, \n degreesOffered: some DegreeProgram\n}\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n // courses: some Course,\n registered: some Student\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\nsig Course {\n //mediumOfInstruction: one Language,\n //isMandatoryForNonFastMS: one Bool,\n //preRequisite: set Course,\n}\nsig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\nsig AppliedProgramming extends GeneralCourse {}\n\n// *** Student ***\nsig Student {\n rollNumber: one Int,\n degree: one DegreeProgram, \n isFastian: one Bool,\n registered: some Course,\n financialAid: lone FinancialAid,\n gotAcademicWarning: one Bool,\n isFeePaid: one Bool,\n areDuesCleared: one Bool\n}\n\n// *** Financial Aid ***\nsig FinancialAid {\n type: one FinancialAidType,\n status: one AidStatus\n}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n (#ay.semesters = 3) implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\n// fact CourseMediumOfConstructionConstraints {\n// all c: Course | {\n// (c in GeneralCourse) implies c.mediumOfInstruction = English\n// (c in ReligiousStudies) implies ((c.mediumOfInstruction = Urdu) or (c.mediumOfInstruction = English))\n// (c in LanguageCourse) implies c.mediumOfInstruction = Other\n// }\n// }\n// *** Course Constraints *** //\n\n// *** Student Constraints *** //\n//Student roll number uniqueness constraint (5 10, 16)\nfact StudentRollNumConstraint {\n all disj s1, s2:Student | s1.rollNumber != s2.rollNumber\n}\n\n//For all Students, students can only apply to one degree program offered in an academic year\nassert StudentDegreeProgramConstraint {\n all s: Student | some ay: AcademicYear | s.degree in ay.degreesOffered\n}\n// *** Student Constraints *** //\n\n// *** Financial Constraints (9 and 11) *** //\nfact FinancialAidConstraints {\n all st: Student | {\n //Taking Full Load on Financial Aid\n (s.financialAid.status = Active) implies #s.registered >= 5\n }\n\n}\n\n\n// *** Financial Constraints *** //\n\n\nrun {} for 8", "permalink": "cupped-purse-eats-matron", "time": "2024-11-20 01:17:06.344297", "cmd": 1} {"id": 24465, "parent": 24464, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\nenum Bool {True, False}\n//enum Numbers {SevenTeen, Eight, ElevenThousand}\n//enum Month {Jan, June, August}\n//enum Language {Urdu, English, Other}\nenum DegreeProgram {CS, SE, CY, DS, EE}\nenum FinancialAidType { ICT, HEC, FAST, AnyOther}\nenum AidStatus { Active, Canceled }\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { \n semesters: some Semester, \n degreesOffered: some DegreeProgram\n}\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n // courses: some Course,\n registered: some Student\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\nsig Course {\n //mediumOfInstruction: one Language,\n //isMandatoryForNonFastMS: one Bool,\n //preRequisite: set Course,\n}\nsig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\nsig AppliedProgramming extends GeneralCourse {}\n\n// *** Student ***\nsig Student {\n rollNumber: one Int,\n degree: one DegreeProgram, \n isFastian: one Bool,\n registered: some Course,\n financialAid: lone FinancialAid,\n gotAcademicWarning: one Bool,\n isFeePaid: one Bool,\n areDuesCleared: one Bool\n}\n\n// *** Financial Aid ***\nsig FinancialAid {\n type: one FinancialAidType,\n status: one AidStatus\n}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n (#ay.semesters = 3) implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\n// fact CourseMediumOfConstructionConstraints {\n// all c: Course | {\n// (c in GeneralCourse) implies c.mediumOfInstruction = English\n// (c in ReligiousStudies) implies ((c.mediumOfInstruction = Urdu) or (c.mediumOfInstruction = English))\n// (c in LanguageCourse) implies c.mediumOfInstruction = Other\n// }\n// }\n// *** Course Constraints *** //\n\n// *** Student Constraints *** //\n//Student roll number uniqueness constraint (5 10, 16)\nfact StudentRollNumConstraint {\n all disj s1, s2:Student | s1.rollNumber != s2.rollNumber\n}\n\n//For all Students, students can only apply to one degree program offered in an academic year\nassert StudentDegreeProgramConstraint {\n all s: Student | some ay: AcademicYear | s.degree in ay.degreesOffered\n}\n// *** Student Constraints *** //\n\n// *** Financial Constraints (9 and 11) *** //\nfact FinancialAidConstraints {\n all s: Student | {\n //Taking Full Load on Financial Aid\n (s.financialAid.status = Active) implies #s.registered >= 5\n }\n\n}\n\n\n// *** Financial Constraints *** //\n\n\nrun {} for 8", "permalink": "gladly-motor-sierra-smoky", "time": "2024-11-20 01:17:11.886217", "cmd": 1} {"id": 24466, "parent": 24465, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\nenum Bool {True, False}\n//enum Numbers {SevenTeen, Eight, ElevenThousand}\n//enum Month {Jan, June, August}\n//enum Language {Urdu, English, Other}\nenum DegreeProgram {CS, SE, CY, DS, EE}\nenum FinancialAidType { ICT, HEC, FAST, AnyOther}\nenum AidStatus { Active, Canceled, None }\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { \n semesters: some Semester, \n degreesOffered: some DegreeProgram\n}\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n // courses: some Course,\n registered: some Student\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\nsig Course {\n //mediumOfInstruction: one Language,\n //isMandatoryForNonFastMS: one Bool,\n //preRequisite: set Course,\n}\nsig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\nsig AppliedProgramming extends GeneralCourse {}\n\n// *** Student ***\nsig Student {\n rollNumber: one Int,\n degree: one DegreeProgram, \n isFastian: one Bool,\n registered: some Course,\n financialAid: lone FinancialAid,\n gotAcademicWarning: one Bool,\n isFeePaid: one Bool,\n areDuesCleared: one Bool\n}\n\n// *** Financial Aid ***\nsig FinancialAid {\n type: one FinancialAidType,\n status: one AidStatus\n}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n (#ay.semesters = 3) implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\n// fact CourseMediumOfConstructionConstraints {\n// all c: Course | {\n// (c in GeneralCourse) implies c.mediumOfInstruction = English\n// (c in ReligiousStudies) implies ((c.mediumOfInstruction = Urdu) or (c.mediumOfInstruction = English))\n// (c in LanguageCourse) implies c.mediumOfInstruction = Other\n// }\n// }\n// *** Course Constraints *** //\n\n// *** Student Constraints *** //\n//Student roll number uniqueness constraint (5 10, 16)\nfact StudentRollNumConstraint {\n all disj s1, s2:Student | s1.rollNumber != s2.rollNumber\n}\n\n//For all Students, students can only apply to one degree program offered in an academic year\nassert StudentDegreeProgramConstraint {\n all s: Student | some ay: AcademicYear | s.degree in ay.degreesOffered\n}\n// *** Student Constraints *** //\n\n// *** Financial Constraints (9 and 11) *** //\nfact FinancialAidConstraints {\n all s: Student | {\n //Taking Full Load on Financial Aid\n (s.financialAid.status = Active) implies #s.registered >= 5\n }\n\n}\n\n\n// *** Financial Constraints *** //\n\n\nrun {} for 8", "permalink": "racing-steam-oxygen-tree", "time": "2024-11-20 01:17:59.745155", "cmd": 1} {"id": 24467, "parent": 24466, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\nenum Bool {True, False}\n//enum Numbers {SevenTeen, Eight, ElevenThousand}\n//enum Month {Jan, June, August}\n//enum Language {Urdu, English, Other}\nenum DegreeProgram {CS, SE, CY, DS, EE}\nenum FinancialAidType { ICT, HEC, FAST, AnyOther}\nenum AidStatus { Active, Canceled, None }\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { \n semesters: some Semester, \n degreesOffered: some DegreeProgram\n}\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n // courses: some Course,\n registered: some Student\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\nsig Course {\n //mediumOfInstruction: one Language,\n //isMandatoryForNonFastMS: one Bool,\n //preRequisite: set Course,\n}\nsig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\n//sig AppliedProgramming extends GeneralCourse {}\n\n// *** Student ***\nsig Student {\n rollNumber: one Int,\n degree: one DegreeProgram, \n //isFastian: one Bool,\n registered: some Course,\n financialAid: lone FinancialAid,\n //gotAcademicWarning: one Bool,\n //isFeePaid: one Bool,\n //areDuesCleared: one Bool\n}\n\n// *** Financial Aid ***\nsig FinancialAid {\n type: one FinancialAidType,\n status: one AidStatus\n}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n (#ay.semesters = 3) implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\n// fact CourseMediumOfConstructionConstraints {\n// all c: Course | {\n// (c in GeneralCourse) implies c.mediumOfInstruction = English\n// (c in ReligiousStudies) implies ((c.mediumOfInstruction = Urdu) or (c.mediumOfInstruction = English))\n// (c in LanguageCourse) implies c.mediumOfInstruction = Other\n// }\n// }\n// *** Course Constraints *** //\n\n// *** Student Constraints *** //\n//Student roll number uniqueness constraint (5 10, 16)\nfact StudentRollNumConstraint {\n all disj s1, s2:Student | s1.rollNumber != s2.rollNumber\n}\n\n//For all Students, students can only apply to one degree program offered in an academic year\nassert StudentDegreeProgramConstraint {\n all s: Student | some ay: AcademicYear | s.degree in ay.degreesOffered\n}\n// *** Student Constraints *** //\n\n// *** Financial Constraints (9 and 11) *** //\nfact FinancialAidConstraints {\n all s: Student | {\n //Taking Full Load on Financial Aid\n (s.financialAid.status = Active) implies #s.registered >= 5\n }\n\n}\n\n\n// *** Financial Constraints *** //\n\n\nrun {} for 8", "permalink": "paced-thing-batch-cocoa", "time": "2024-11-20 01:18:36.621626", "cmd": 1} {"id": 24468, "parent": 24467, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\nenum Bool {True, False}\n//enum Numbers {SevenTeen, Eight, ElevenThousand}\n//enum Month {Jan, June, August}\n//enum Language {Urdu, English, Other}\nenum DegreeProgram {CS, SE, CY, DS, EE}\nenum FinancialAidType { ICT, HEC, FAST, AnyOther}\nenum AidStatus { Active, Canceled, None }\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { \n semesters: some Semester, \n degreesOffered: some DegreeProgram\n}\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n // courses: some Course,\n registered: some Student\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\nsig Course {\n //mediumOfInstruction: one Language,\n //isMandatoryForNonFastMS: one Bool,\n //preRequisite: set Course,\n}\nsig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\n//sig AppliedProgramming extends GeneralCourse {}\n\n// *** Student ***\nsig Student {\n rollNumber: one Int,\n degree: one DegreeProgram, \n //isFastian: one Bool,\n registered: some Course,\n financialAid: lone FinancialAid,\n //gotAcademicWarning: one Bool,\n //isFeePaid: one Bool,\n //areDuesCleared: one Bool\n}\n\n// *** Financial Aid ***\nsig FinancialAid {\n type: one FinancialAidType,\n status: one AidStatus\n}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n (#ay.semesters = 3) implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\n// fact CourseMediumOfConstructionConstraints {\n// all c: Course | {\n// (c in GeneralCourse) implies c.mediumOfInstruction = English\n// (c in ReligiousStudies) implies ((c.mediumOfInstruction = Urdu) or (c.mediumOfInstruction = English))\n// (c in LanguageCourse) implies c.mediumOfInstruction = Other\n// }\n// }\n// *** Course Constraints *** //\n\n// *** Student Constraints *** //\n//Student roll number uniqueness constraint (5 10, 16)\nfact StudentRollNumConstraint {\n all disj s1, s2:Student | s1.rollNumber != s2.rollNumber\n}\n\n//For all Students, students can only apply to one degree program offered in an academic year\nassert StudentDegreeProgramConstraint {\n all s: Student | some ay: AcademicYear | s.degree in ay.degreesOffered\n}\n// *** Student Constraints *** //\n\n// *** Financial Constraints (9 and 11) *** //\nfact FinancialAidConstraints {\n all s: Student | {\n //Taking Full Load on Financial Aid\n (s.financialAid.status = Active) implies #s.registered >= 5\n }\n\n}\n\n\n// *** Financial Constraints *** //\n\n\nrun {} for 16", "permalink": "falcon-talon-spoils-taco", "time": "2024-11-20 01:20:08.857991", "cmd": 1} {"id": 24469, "parent": 24468, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\nenum Bool {True, False}\n//enum Numbers {SevenTeen, Eight, ElevenThousand}\n//enum Month {Jan, June, August}\n//enum Language {Urdu, English, Other}\nenum DegreeProgram {CS, SE, CY, DS, EE}\nenum FinancialAidType { ICT, HEC, FAST, AnyOther}\nenum AidStatus { Active, Canceled, None }\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { \n semesters: some Semester, \n degreesOffered: some DegreeProgram\n}\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n // courses: some Course,\n registered: some Student\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\n// sig Course {\n// //mediumOfInstruction: one Language,\n// //isMandatoryForNonFastMS: one Bool,\n// //preRequisite: set Course,\n// }\nsig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\n//sig AppliedProgramming extends GeneralCourse {}\n\n// *** Student ***\nsig Student {\n rollNumber: one Int,\n degree: one DegreeProgram, \n //isFastian: one Bool,\n //registered: some Course,\n hasTakenFullLoad: one Bool\n financialAid: lone FinancialAid,\n //gotAcademicWarning: one Bool,\n //isFeePaid: one Bool,\n //areDuesCleared: one Bool\n}\n\n// *** Financial Aid ***\nsig FinancialAid {\n type: one FinancialAidType,\n status: one AidStatus\n}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n (#ay.semesters = 3) implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\n// fact CourseMediumOfConstructionConstraints {\n// all c: Course | {\n// (c in GeneralCourse) implies c.mediumOfInstruction = English\n// (c in ReligiousStudies) implies ((c.mediumOfInstruction = Urdu) or (c.mediumOfInstruction = English))\n// (c in LanguageCourse) implies c.mediumOfInstruction = Other\n// }\n// }\n// *** Course Constraints *** //\n\n// *** Student Constraints *** //\n//Student roll number uniqueness constraint (5 10, 16)\nfact StudentRollNumConstraint {\n all disj s1, s2:Student | s1.rollNumber != s2.rollNumber\n}\n\n//For all Students, students can only apply to one degree program offered in an academic year\nassert StudentDegreeProgramConstraint {\n all s: Student | some ay: AcademicYear | s.degree in ay.degreesOffered\n}\n// *** Student Constraints *** //\n\n// *** Financial Constraints (9 and 11) *** //\nfact FinancialAidConstraints {\n all s: Student | {\n //Taking Full Load on Financial Aid\n (s.financialAid.status = Active) implies #s.registered >= 5\n }\n\n}\n\n\n// *** Financial Constraints *** //\n\n\nrun {} for 5", "permalink": "slurp-twice-spent-replay", "time": "2024-11-20 01:22:40.601780", "cmd": 1} {"id": 24470, "parent": 24469, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\nenum Bool {True, False}\n//enum Numbers {SevenTeen, Eight, ElevenThousand}\n//enum Month {Jan, June, August}\n//enum Language {Urdu, English, Other}\nenum DegreeProgram {CS, SE, CY, DS, EE}\nenum FinancialAidType { ICT, HEC, FAST, AnyOther}\nenum AidStatus { Active, Canceled, None }\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { \n semesters: some Semester, \n degreesOffered: some DegreeProgram\n}\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n // courses: some Course,\n registered: some Student\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\n// sig Course {\n// //mediumOfInstruction: one Language,\n// //isMandatoryForNonFastMS: one Bool,\n// //preRequisite: set Course,\n// }\nsig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\n//sig AppliedProgramming extends GeneralCourse {}\n\n// *** Student ***\nsig Student {\n rollNumber: one Int,\n degree: one DegreeProgram, \n //isFastian: one Bool,\n //registered: some Course,\n hasTakenFullLoad: one Bool,\n financialAid: lone FinancialAid,\n //gotAcademicWarning: one Bool,\n //isFeePaid: one Bool,\n //areDuesCleared: one Bool\n}\n\n// *** Financial Aid ***\nsig FinancialAid {\n type: one FinancialAidType,\n status: one AidStatus\n}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n (#ay.semesters = 3) implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\n// fact CourseMediumOfConstructionConstraints {\n// all c: Course | {\n// (c in GeneralCourse) implies c.mediumOfInstruction = English\n// (c in ReligiousStudies) implies ((c.mediumOfInstruction = Urdu) or (c.mediumOfInstruction = English))\n// (c in LanguageCourse) implies c.mediumOfInstruction = Other\n// }\n// }\n// *** Course Constraints *** //\n\n// *** Student Constraints *** //\n//Student roll number uniqueness constraint (5 10, 16)\nfact StudentRollNumConstraint {\n all disj s1, s2:Student | s1.rollNumber != s2.rollNumber\n}\n\n//For all Students, students can only apply to one degree program offered in an academic year\nassert StudentDegreeProgramConstraint {\n all s: Student | some ay: AcademicYear | s.degree in ay.degreesOffered\n}\n// *** Student Constraints *** //\n\n// *** Financial Constraints (9 and 11) *** //\nfact FinancialAidConstraints {\n all s: Student | {\n //Taking Full Load on Financial Aid\n (s.financialAid.status = Active) implies #s.registered >= 5\n }\n\n}\n\n\n// *** Financial Constraints *** //\n\n\nrun {} for 5", "permalink": "many-hermit-sermon-watch", "time": "2024-11-20 01:22:48.087702", "cmd": 1} {"id": 24471, "parent": 24470, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\nenum Bool {True, False}\n//enum Numbers {SevenTeen, Eight, ElevenThousand}\n//enum Month {Jan, June, August}\n//enum Language {Urdu, English, Other}\nenum DegreeProgram {CS, SE, CY, DS, EE}\nenum FinancialAidType { ICT, HEC, FAST, AnyOther}\nenum AidStatus { Active, Canceled, None }\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { \n semesters: some Semester, \n degreesOffered: some DegreeProgram\n}\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n // courses: some Course,\n registered: some Student\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\n// sig Course {\n// //mediumOfInstruction: one Language,\n// //isMandatoryForNonFastMS: one Bool,\n// //preRequisite: set Course,\n// }\n// sig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\n//sig AppliedProgramming extends GeneralCourse {}\n\n// *** Student ***\nsig Student {\n rollNumber: one Int,\n degree: one DegreeProgram, \n //isFastian: one Bool,\n //registered: some Course,\n hasTakenFullLoad: one Bool,\n financialAid: lone FinancialAid,\n //gotAcademicWarning: one Bool,\n //isFeePaid: one Bool,\n //areDuesCleared: one Bool\n}\n\n// *** Financial Aid ***\nsig FinancialAid {\n type: one FinancialAidType,\n status: one AidStatus\n}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n (#ay.semesters = 3) implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\n// fact CourseMediumOfConstructionConstraints {\n// all c: Course | {\n// (c in GeneralCourse) implies c.mediumOfInstruction = English\n// (c in ReligiousStudies) implies ((c.mediumOfInstruction = Urdu) or (c.mediumOfInstruction = English))\n// (c in LanguageCourse) implies c.mediumOfInstruction = Other\n// }\n// }\n// *** Course Constraints *** //\n\n// *** Student Constraints *** //\n//Student roll number uniqueness constraint (5 10, 16)\nfact StudentRollNumConstraint {\n all disj s1, s2:Student | s1.rollNumber != s2.rollNumber\n}\n\n//For all Students, students can only apply to one degree program offered in an academic year\nassert StudentDegreeProgramConstraint {\n all s: Student | some ay: AcademicYear | s.degree in ay.degreesOffered\n}\n// *** Student Constraints *** //\n\n// *** Financial Constraints (9 and 11) *** //\nfact FinancialAidConstraints {\n all s: Student | {\n //Taking Full Load on Financial Aid\n (s.financialAid.status = Active) implies #s.registered >= 5\n }\n\n}\n\n\n// *** Financial Constraints *** //\n\n\nrun {} for 5", "permalink": "swell-lurch-sublet-pummel", "time": "2024-11-20 01:22:57.176726", "cmd": 1} {"id": 24472, "parent": 24471, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\nenum Bool {True, False}\n//enum Numbers {SevenTeen, Eight, ElevenThousand}\n//enum Month {Jan, June, August}\n//enum Language {Urdu, English, Other}\nenum DegreeProgram {CS, SE, CY, DS, EE}\nenum FinancialAidType { ICT, HEC, FAST, AnyOther}\nenum AidStatus { Active, Canceled, None }\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { \n semesters: some Semester, \n degreesOffered: some DegreeProgram\n}\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n // courses: some Course,\n registered: some Student\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\n// sig Course {\n// //mediumOfInstruction: one Language,\n// //isMandatoryForNonFastMS: one Bool,\n// //preRequisite: set Course,\n// }\n// sig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\n//sig AppliedProgramming extends GeneralCourse {}\n\n// *** Student ***\nsig Student {\n rollNumber: one Int,\n degree: one DegreeProgram, \n //isFastian: one Bool,\n //registered: some Course,\n hasTakenFullLoad: one Bool,\n financialAid: lone FinancialAid,\n //gotAcademicWarning: one Bool,\n //isFeePaid: one Bool,\n //areDuesCleared: one Bool\n}\n\n// *** Financial Aid ***\nsig FinancialAid {\n type: one FinancialAidType,\n status: one AidStatus\n}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n (#ay.semesters = 3) implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\n// fact CourseMediumOfConstructionConstraints {\n// all c: Course | {\n// (c in GeneralCourse) implies c.mediumOfInstruction = English\n// (c in ReligiousStudies) implies ((c.mediumOfInstruction = Urdu) or (c.mediumOfInstruction = English))\n// (c in LanguageCourse) implies c.mediumOfInstruction = Other\n// }\n// }\n// *** Course Constraints *** //\n\n// *** Student Constraints *** //\n//Student roll number uniqueness constraint (5 10, 16)\nfact StudentRollNumConstraint {\n all disj s1, s2:Student | s1.rollNumber != s2.rollNumber\n}\n\n//For all Students, students can only apply to one degree program offered in an academic year\nassert StudentDegreeProgramConstraint {\n all s: Student | some ay: AcademicYear | s.degree in ay.degreesOffered\n}\n// *** Student Constraints *** //\n\n// *** Financial Constraints (9 and 11) *** //\nfact FinancialAidConstraints {\n all s: Student | {\n //Taking Full Load on Financial Aid\n (s.financialAid.status = Active) implies s.hasTakenFullLoad = True\n }\n\n}\n\n\n// *** Financial Constraints *** //\n\n\nrun {} for 5", "permalink": "gander-cymbal-unruly-veal", "time": "2024-11-20 01:23:40.487534", "cmd": 1} {"id": 24473, "parent": 24472, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\nenum Bool {True, False}\n//enum Numbers {SevenTeen, Eight, ElevenThousand}\n//enum Month {Jan, June, August}\n//enum Language {Urdu, English, Other}\nenum DegreeProgram {CS, SE, CY, DS, EE}\nenum FinancialAidType { ICT, HEC, FAST, AnyOther}\nenum AidStatus { Active, Canceled, None }\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { \n semesters: some Semester, \n degreesOffered: some DegreeProgram\n}\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n // courses: some Course,\n registered: some Student\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\n// sig Course {\n// //mediumOfInstruction: one Language,\n// //isMandatoryForNonFastMS: one Bool,\n// //preRequisite: set Course,\n// }\n// sig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\n//sig AppliedProgramming extends GeneralCourse {}\n\n// *** Student ***\nsig Student {\n rollNumber: one Int,\n degree: one DegreeProgram, \n //isFastian: one Bool,\n //registered: some Course,\n hasTakenFullLoad: one Bool,\n financialAid: lone FinancialAid,\n gotAcademicWarning: one Bool,\n //isFeePaid: one Bool,\n //areDuesCleared: one Bool\n}\n\n// *** Financial Aid ***\nsig FinancialAid {\n type: one FinancialAidType,\n status: one AidStatus\n}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Summers\nassert AcademicYearSummerConstraint {\n all ay: AcademicYear | {\n (#ay.semesters = 3) implies some su: Summer | su in ay.semesters\n }\n}\n// *** Academic Year Constraints *** //\n\n// *** Semester Constraints (2 and 3) *** //\n// fact SemesterDatesConstraint {\n// all s: Semester | {\n// //Start end date constraint\n// s.isStartDateGreaterThanEndDate = True\n\n// //Duration Constraints\n// (s in Spring or s in Fall) implies s.duration = SevenTeen\n// (s in Summer) implies s.duration = Eight\n\n// //Start Month Constraints\n// (s in Spring) implies s.startMonth = Jan\n// (s in Fall) implies s.startMonth = August\n// (s in Summer) implies s.startMonth = June\n// }\n// }\n// *** Semester Constraints *** //\n\n// *** Course Constraints (7) *** //\n// fact CourseMediumOfConstructionConstraints {\n// all c: Course | {\n// (c in GeneralCourse) implies c.mediumOfInstruction = English\n// (c in ReligiousStudies) implies ((c.mediumOfInstruction = Urdu) or (c.mediumOfInstruction = English))\n// (c in LanguageCourse) implies c.mediumOfInstruction = Other\n// }\n// }\n// *** Course Constraints *** //\n\n// *** Student Constraints *** //\n//Student roll number uniqueness constraint (5 10, 16)\nfact StudentRollNumConstraint {\n all disj s1, s2:Student | s1.rollNumber != s2.rollNumber\n}\n\n//For all Students, students can only apply to one degree program offered in an academic year\nassert StudentDegreeProgramConstraint {\n all s: Student | some ay: AcademicYear | s.degree in ay.degreesOffered\n}\n// *** Student Constraints *** //\n\n// *** Financial Constraints (9 and 11) *** //\nfact FinancialAidConstraints {\n all s: Student | {\n //Taking Full Load on Financial Aid\n (s.financialAid.status = Active) implies s.hasTakenFullLoad = True\n (s.gotAcademicWarning = True) implies s.financialAid.status = Canceled\n }\n\n}\n\n\n// *** Financial Constraints *** //\n\n\nrun {} for 5", "permalink": "lasso-spiffy-chute-frolic", "time": "2024-11-20 01:29:29.395165", "cmd": 1} {"id": 24474, "parent": 24473, "code": "//Anum Batool (anonymized)\n\n// ***** Enums ***** //\nenum Bool {True, False}\n//enum Numbers {SevenTeen, Eight, ElevenThousand}\n//enum Month {Jan, June, August}\n//enum Language {Urdu, English, Other}\nenum DegreeProgram {CS, SE, CY, DS, EE}\nenum FinancialAidType { ICT, HEC, FAST, AnyOther, Self}\nenum AidStatus { Active, Canceled, None }\n\n// ***** Signatures ***** //\n// *** Academic Year ***\nsig AcademicYear { \n semesters: some Semester, \n degreesOffered: some DegreeProgram\n}\n\n// *** Semester ***\nabstract sig Semester {\n // duration: one Numbers,\n // startMonth: one Month,\n // isStartDateGreaterThanEndDate: one Bool,\n // courses: some Course,\n registered: some Student\n}\none sig Spring, Fall extends Semester {}\nlone sig Summer extends Semester {}\n\n// *** Course ***\n// sig Course {\n// //mediumOfInstruction: one Language,\n// //isMandatoryForNonFastMS: one Bool,\n// //preRequisite: set Course,\n// }\n// sig GeneralCourse, ReligiousStudies, LanguageCourse extends Course {}\n//sig AppliedProgramming extends GeneralCourse {}\n\n// *** Student ***\nsig Student {\n rollNumber: one Int,\n degree: one DegreeProgram, \n //isFastian: one Bool,\n //registered: some Course,\n hasTakenFullLoad: one Bool,\n financialAid: lone FinancialAid,\n gotAcademicWarning: one Bool,\n //isFeePaid: one Bool,\n //areDuesCleared: one Bool\n}\n\n// *** Financial Aid ***\nsig FinancialAid {\n type: one FinancialAidType,\n status: one AidStatus\n}\n\n// ***** Facts and Assertions ***** //\n// *** Academic Year Constraints (1 and 4) *** //\nfact AcademicYearConstraints{\n all ay: AcademicYear | {\n //Number of semesters constraint\n #ay.semesters >= 2 and #ay.semesters <=3\n\n //Mandatory Semesters in the academic year\n one sp: Spring | sp in ay.semesters\n one fl: Fall | fl in ay.semesters\n\n //Optional summer semester\n lone su: Summer | su in ay.semesters\n }\n}\n\n//If there is a thrid semester then that semester is Sum