-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrequirements.json
More file actions
202 lines (202 loc) · 7.67 KB
/
requirements.json
File metadata and controls
202 lines (202 loc) · 7.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
[
{
"example": "Photo sharing social network",
"model": "sig User { follows : set User, sees : set Photo, posts : set Photo, suggested : set User } sig Influencer extends User {} sig Photo { date : one Day } sig Ad extends Photo {} sig Day {}",
"id": "x3JXgWhJ3uti5Dzxz",
"requirements": [
{
"description": "Every photo is posted by one user",
"pred":"this/inv1"
},
{
"description": "Users cannot follow themselves",
"pred":"this/inv2"
},
{
"description": "Users can see ads posted by everyone, but only see non ads posted by followed users",
"pred":"this/inv3"
},
{
"description": "If a user posts an ad then all its posts should be labeled as ads",
"pred":"this/inv4"
},
{
"description": "Influencers are followed by everyone else",
"pred":"this/inv5"
},
{
"description": "Influencers post every day",
"pred":"this/inv6"
},
{
"description": "Suggested are other users followed by followed users, but not yet followed",
"pred":"this/inv7"
},
{
"description": "A user only sees ads from followed or suggested users",
"pred":"this/inv8"
}
]
},
{
"example": "Production line",
"model": "sig Workstation { workers : set Worker, succ : set Workstation } one sig begin, end in Workstation {} sig Worker {} sig Human, Robot extends Worker {} abstract sig Product { parts : set Product } sig Material extends Product {} sig Component extends Product { workstation : set Workstation } sig Dangerous in Product {}",
"id": "dyj49tEp7j6aWAQQX",
"requirements": [
{
"description": "Workers are either human or robots",
"pred":"this/inv1"
},
{
"description": "Every workstation has workers and every worker works in one workstation",
"pred":"this/inv2"
},
{
"description": "Every component is assembled in one workstation",
"pred":"this/inv3"
},
{
"description": "Components must have parts and materials have no parts",
"pred":"this/inv4"
},
{
"description": "Humans and robots cannot work together",
"pred":"this/inv5"
},
{
"description": "Components cannot be their own parts",
"pred":"this/inv6"
},
{
"description": "Components built of dangerous parts are also dangerous",
"pred":"this/inv7"
},
{
"description": "Dangerous components cannot be assembled by humans",
"pred":"this/inv8"
},
{
"description": "The workstations form a single line between begin and end",
"pred":"this/inv9"
},
{
"description": "The parts of a component must be assembled before it in the production line",
"pred":"this/inv10"
}
]
},
{
"example": "Train station",
"model": "sig Track { succs : set Track, signals : set Signal } sig Junction, Entry, Exit in Track {} sig Signal {} sig Semaphore, Speed extends Signal {}",
"id": "cXPP9QBPTYgTX6WJ6",
"requirements": [
{
"description": "The station has at least one entry and one exit",
"pred": "this/inv1"
},
{
"description": "Signals belong to one track",
"pred": "this/inv2"
},
{
"description": "Exit tracks are those without successor",
"pred": "this/inv3"
},
{
"description": "Entry tracks are those without predecessors",
"pred": "this/inv4"
},
{
"description": "Junctions are the tracks with more than one predecessor",
"pred": "this/inv5"
},
{
"description": "Entry tracks must have a speed signal",
"pred": "this/inv6"
},
{
"description": "The station has no cycles",
"pred": "this/inv7"
},
{
"description": "It should be possible to reach every exit from every entry",
"pred": "this/inv8"
},
{
"description": "Tracks not followed by junctions do not have semaphores",
"pred": "this/inv9"
},
{
"description": "Every track before a junction has a semaphore",
"pred": "this/inv10"
}
]
},
{
"example": "Courses",
"model": "open util/ordering[Grade] sig Person { teaches : set Course, enrolled : set Course, projects : set Project } sig Professor,Student in Person {} sig Course { projects : set Project, grades : Person -> Grade } sig Project {} sig Grade {}",
"id": "iP5JL36afv5KbDKP6",
"requirements": [
{
"description": "Only students can be enrolled in courses",
"pred": "this/inv1"
},
{
"description": "Only professors can teach courses",
"pred": "this/inv2"
},
{
"description": "Courses must have teachers",
"pred": "this/inv3"
},
{
"description": "Projects are proposed by one course",
"pred": "this/inv4"
},
{
"description": "Only students work on projects and projects must have someone working on them",
"pred": "this/inv5"
},
{
"description": "Students only work on projects of courses they are enrolled in",
"pred": "this/inv6"
},
{
"description": "Students work on at most one project per course",
"pred": "this/inv7"
},
{
"description": "A professor cannot teach herself",
"pred": "this/inv8"
},
{
"description": "A professor cannot teach colleagues",
"pred": "this/inv9"
},
{
"description": "Only students have grades",
"pred": "this/inv10"
},
{
"description": "Students only have grades in courses they are enrolled",
"pred": "this/inv11"
},
{
"description": "Students have at most one grade per course",
"pred": "this/inv12"
},
{
"description": "A student with the highest mark in a course must have worked on a project on that course",
"pred": "this/inv13"
},
{
"description": "A student cannot work with the same student in different projects",
"pred": "this/inv14"
},
{
"description": "Students working on the same project in a course cannot have marks differing by more than one unit",
"pred": "this/inv15"
}
]
}
]