Repository navigation
Expand file tree
/
Copy pathall_partial_examples.als
More file actions
192 lines (145 loc) · 8.01 KB
/
Copy pathall_partial_examples.als
File metadata and controls
192 lines (145 loc) · 8.01 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
//open evolution
open model
open addReferenceDef
open addValueDef
open copyValueDef
open changeValueDefToKind
open merge
open moveValueDef
open split
open addKind
open remKind
//1
pred addReference_with_no_record[rd : Reference, disj k1, k2 : Class, disj s1, s2 : State]{
k1.instances = none and addReference[rd, k1, k2, s1, s2]
}
run addReference_with_no_record for 3 but exactly 2 State, 2 Class
pred addReference_with_one_record[rd : Reference, disj k1, k2 : Class, disj s1, s2 : State]{
#k1.instances = 1 and addReference[rd, k1, k2, s1, s2]
}
run addReference_with_one_record for 4 but exactly 2 State, 2 Class
pred addReference_on_other_with_no_record[rd : Reference, disj k1, k2, k3 : Class, disj s1, s2 : State]{
rd.reference = k3.name and #k1.instances = 0 and addReference[rd, k1, k2, s1, s2]
}
run addReference_on_other_with_no_record for 4 but exactly 2 State, 3 Class
pred addReference_on_other_with_some_record[rd : Reference, disj k1, k2, k3 : Class, disj s1, s2 : State]{
rd.reference = k3.name and #k1.instances > 0 and addReference[rd, k1, k2, s1, s2]
}
run addReference_on_other_with_some_record for 4 but exactly 2 State, 3 Class
//5
pred addValue_with_no_record[vd : Property, disj k1, k2 : Class, disj s1, s2 : State]{
k1.instances = none and addProperty[vd, k1, k2, s1, s2]
}
run addValue_with_no_record for 3 but exactly 2 State, 2 Class
pred addValue_with_no_record_but_reference[vd : Property, disj k1, k2 : Class, disj s1, s2 : State]{
k1.instances = none and one ref : Reference | ref in k1.structure.elems and addProperty[vd, k1, k2, s1, s2]
}
run addValue_with_no_record_but_reference for 3 but exactly 2 State, 3 Class
pred addValue_with_no_record_but_reference_on_self[rd: Reference, vd : Property, disj k1, k2 : Class, disj s1, s2 : State]{
k1.instances = none
and rd.reference = k1.name
and rd in k1.structure.elems
and addProperty[vd, k1, k2, s1, s2]
}
run addValue_with_no_record_but_reference_on_self for 3 but exactly 2 State, 2 Class
pred addValue_with_one_record[vd : Property, disj k1, k2 : Class, disj s1, s2 : State]{
#k1.instances = 1 and addProperty[vd, k1, k2, s1, s2]
}
run addValue_with_one_record for 5 but exactly 2 State, 2 Class, 0 Reference
pred addValue_with_one_record_and_reference_on_self[rd: Reference, vd : Property, disj k1, k2 : Class, disj s1, s2 : State]{
#k1.instances = 1
and rd.reference = k1.name
and rd in k1.structure.elems
and addProperty[vd, k1, k2, s1, s2]
}
run addValue_with_one_record_and_reference_on_self for 5 but exactly 2 State, 2 Class
//10
pred addValue_with_one_record_and_reference_on_self_from_other[rd: Reference, vd : Property, disj k1, k2, k3 : Class, disj s1, s2 : State]{
#k1.instances = 1
and rd.reference = k1.name
and rd in k3.structure.elems
and k3 in s1.classes
and addProperty[vd, k1, k2, s1, s2]
}
run addValue_with_one_record_and_reference_on_self_from_other for 4 but exactly 2 State
pred copyProperty_no_record[vd : Property, disj k1, k2, k3 : Class, disj s1, s2 : State]{
#k1.instances = 0 and #k2.instances = 0 and copyProperty[vd, k1, k2, k3, s1, s2]
}
run copyProperty_no_record for 3 but exactly 2 State, 3 Class
pred copyProperty_no_record_in_target[vd : Property, disj k1, k2, k3 : Class, disj s1, s2 : State]{
#k2.instances = 0 and copyProperty[vd, k1, k2, k3, s1, s2]
}
run copyProperty_no_record_in_target for 3 but exactly 2 State, 3 Class
pred copyProperty_one_record_in_target[vd : Property, disj k1, k2, k3 : Class, disj s1, s2 : State]{
#k2.instances = 1 and copyProperty[vd, k1, k2, k3, s1, s2]
}
run copyProperty_one_record_in_target for 6 but exactly 2 State, 3 Class
pred changePropertyToClass_no_instances[vd : Property, disj k1, k2, k3 : Class, disj s1, s2 : State]{
#k1.instances = 0 and changePropertyToClass[vd, k1, k2, k3, s1, s2]
}
run changePropertyToClass_no_instances for 3 but exactly 2 State, 3 Class
//15
pred changePropertyToClass_one_record[vd : Property, disj k1, k2, k3 : Class, disj s1, s2 : State]{
#k1.instances = 1 and changePropertyToClass[vd, k1, k2, k3, s1, s2]
}
run changePropertyToClass_one_record for 3 but exactly 2 State, 3 Class
pred merge_with_no_record_no_ref[disj k1, k2, k3 : Class, disj s1, s2 : State]{
#k1.instances = 0 and #k2.instances = 0 and merge[k1, k2, k3, s1, s2]
}
run merge_with_no_record_no_ref for 3 but exactly 3 Class, 2 State, 0 Reference
pred merge_with_no_record[disj k1, k2, k3 : Class, disj s1, s2 : State]{
#k1.instances = 0 and #k2.instances = 0 and merge[k1, k2, k3, s1, s2]
}
run merge_with_no_record for 3 but exactly 3 Class, 2 State
pred merge_with_record_in_one[disj k1, k2, k3 : Class, disj s1, s2 : State]{
#k1.instances = 1 and #k2.instances = 0 and merge[k1, k2, k3, s1, s2]
}
run merge_with_record_in_one for 3 but exactly 3 Class, 2 State
pred merge_with_record_in_both[disj k1, k2, k3 : Class, disj s1, s2 : State]{
#k1.instances = 1 and #k2.instances = 1 and merge[k1, k2, k3, s1, s2]
}
run merge_with_record_in_both for 3 but exactly 3 Class, 2 State
pred merge_with_record_and_values_in_both[disj k1, k2, k3 : Class, disj s1, s2 : State]{
#k1.instances.items.values = 1 and #k2.instances.items.values = 1 and merge[k1, k2, k3, s1, s2]
}
run merge_with_record_and_values_in_both for 3 but exactly 3 Class, 2 State
pred merge_with_no_record_and_reference[disj k1, k2, k3 : Class, disj s1, s2 : State, rd : Reference]{
#k1.instances = 0 and #k2.instances = 0 and rd.reference = k2.name and rd in k2.structure.elems and merge[k1, k2, k3, s1, s2]
}
run merge_with_no_record_and_reference for 3 but exactly 3 Class, 2 State
pred merge_with_no_record_and_reference2[disj k1, k2, k3 : Class, disj s1, s2 : State, rd : Reference]{
#k1.instances = 0 and #k2.instances = 0 and rd.reference = k2.name and rd in k1.structure.elems and merge[k1, k2, k3, s1, s2]
}
run merge_with_no_record_and_reference2 for 3 but exactly 3 Class, 2 State
pred merge_with_no_record_and_reference_in_other[disj k, k1, k2, k3 : Class, disj s1, s2 : State, rd : Reference]{
#k.instances = 0 and #k1.instances = 0 and #k2.instances = 0 and rd.reference = k2.name and rd in k.structure.elems and k in s1.classes and merge[k1, k2, k3, s1, s2]
}
run merge_with_no_record_and_reference_in_other for 3 but exactly 5 Class, 2 State
pred merge_with_no_record_and_no_reference_in_other[disj k, k1, k2, k3 : Class, disj s1, s2 : State]{
#k.instances = 0 and #k1.instances = 0 and #k2.instances = 0 and k in s1.classes and merge[k1, k2, k3, s1, s2]
}
run merge_with_no_record_and_no_reference_in_other for 3 but exactly 4 Class, 2 State, 0 Reference
pred moveProperty_no_record[vd : Property, disj k1, k2, k3, k4 : Class, disj s1, s2 : State]{
#k1.instances = 0 and #k2.instances = 0 and (k1.structure.elems & k2.structure.elems) = none and moveProperty[vd, k1, k2, k3, k4, s1, s2]
}
run moveProperty_no_record for 3 but exactly 2 State, 4 Class
pred moveProperty_one_record_in_both[vd : Property, disj k1, k2, k3, k4 : Class, disj s1, s2 : State]{
#k1.instances = 1 and #k2.instances = 1 and (k1.structure.elems & k2.structure.elems) = none and moveProperty[vd, k1, k2, k3, k4, s1, s2]
}
run moveProperty_one_record_in_both for 4 but exactly 2 State, 4 Class
pred moveProperty_one_record_in_target_only[vd : Property, disj k1, k2, k3, k4 : Class, disj s1, s2 : State]{
#k1.instances = 0 and #k2.instances = 1 and (k1.structure.elems & k2.structure.elems) = none and moveProperty[vd, k1, k2, k3, k4, s1, s2]
}
run moveProperty_one_record_in_target_only for 4 but exactly 2 State, 4 Class
pred split_with_two_value_defs[disj k1, k2, k3 : Class, disj s1, s2 : State, vd : Property ]{
#k1.structure.elems = 2 and splitStructure[vd, k1, k2, k3, s1, s2]
}
run split_with_two_value_defs for 4 but exactly 2 State, 3 Class
pred split_with_one_record[disj k1, k2, k3 : Class, disj s1, s2 : State, vd : Property ]{
#k1.instances = 1 and splitStructure[vd, k1, k2, k3, s1, s2]
}
run split_with_one_record for 3 but exactly 2 State, 3 Class
pred split_with_no_record[disj k1, k2, k3 : Class, disj s1, s2 : State, vd : Property ]{
#k1.instances = 0 and splitStructure[vd, k1, k2, k3, s1, s2]
}
run split_with_no_record for 3 but exactly 2 State, 3 Class